Java 8 ECFieldF2m - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 ECFieldF2m class.

This code example shows how to use the following methods:getM, getMidTermsOfReductionPolynomial
            return curve;
        } 
        else 
        { 
            ECFieldF2m fieldF2m = (ECFieldF2m)field;
            int m = fieldF2m.getM();
            int ks[] = ECUtil.convertMidTerms(fieldF2m.getMidTermsOfReductionPolynomial());
            return new ECCurve.F2m(m, ks[0], ks[1], ks[2], a, b); 
        } 
    } 
 
    public static ECParameterSpec convertSpec(
        EllipticCurve ellipticCurve,
        org.bouncycastle.jce.spec.ECParameterSpec spec)
    { 
        if (spec instanceof ECNamedCurveParameterSpec)
        { 
            return new ECNamedCurveSpec( 
                ((ECNamedCurveParameterSpec)spec).getName(),
                ellipticCurve,
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getM, getMidTermsOfReductionPolynomial
            return new ECCurve.Fp(((ECFieldFp)field).getP(), a, b);
        } 
        else 
        { 
            ECFieldF2m fieldF2m = (ECFieldF2m)field;
            int m = fieldF2m.getM();
            int ks[] = ECUtil.convertMidTerms(fieldF2m.getMidTermsOfReductionPolynomial());
            return new ECCurve.F2m(m, ks[0], ks[1], ks[2], a, b); 
        } 
    } 
 
    public static ECParameterSpec convertSpec(
        EllipticCurve ellipticCurve,
        org.bouncycastle.jce.spec.ECParameterSpec spec)
    { 
        if (spec instanceof ECNamedCurveParameterSpec)
        { 
            return new ECNamedCurveSpec( 
                ((ECNamedCurveParameterSpec)spec).getName(),
                ellipticCurve,
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getM, getMidTermsOfReductionPolynomial
            return new ECCurve.Fp(((ECFieldFp)field).getP(), a, b);
        } 
        else 
        { 
            ECFieldF2m fieldF2m = (ECFieldF2m)field;
            int m = fieldF2m.getM();
            int ks[] = ECUtil.convertMidTerms(fieldF2m.getMidTermsOfReductionPolynomial());
            return new ECCurve.F2m(m, ks[0], ks[1], ks[2], a, b); 
        } 
    } 
 
    public static ECParameterSpec convertSpec(
        EllipticCurve ellipticCurve,
        org.bouncycastle.jce.spec.ECParameterSpec spec)
    { 
        if (spec instanceof ECNamedCurveParameterSpec)
        { 
            return new ECNamedCurveSpec( 
                ((ECNamedCurveParameterSpec)spec).getName(),
                ellipticCurve,
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
            } 
            else 
            { 
                ks = new int[] { curveF2m.getK3(), curveF2m.getK2(), curveF2m.getK1() };
 
                return new EllipticCurve(new ECFieldF2m(curveF2m.getM(), ks), curve.getA().toBigInteger(), curve.getB().toBigInteger(), seed);
            }  
        } 
 
    } 
     
    private static ECPoint convertPoint(
        org.bouncycastle.math.ec.ECPoint  g)
    { 
        g = g.normalize();
        return new ECPoint(g.getAffineXCoord().toBigInteger(), g.getAffineYCoord().toBigInteger());
    } 
     
    public ECNamedCurveSpec( 
        String                              name,
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getM, getMidTermsOfReductionPolynomial
            return curve;
        } 
        else 
        { 
            ECFieldF2m fieldF2m = (ECFieldF2m)field;
            int m = fieldF2m.getM();
            int ks[] = ECUtil.convertMidTerms(fieldF2m.getMidTermsOfReductionPolynomial());
            return new ECCurve.F2m(m, ks[0], ks[1], ks[2], a, b); 
        } 
    } 
 
    public static ECParameterSpec convertSpec(
        EllipticCurve ellipticCurve,
        org.bouncycastle.jce.spec.ECParameterSpec spec)
    { 
        if (spec instanceof ECNamedCurveParameterSpec)
        { 
            return new ECNamedCurveSpec( 
                ((ECNamedCurveParameterSpec)spec).getName(),
                ellipticCurve,
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getM, getMidTermsOfReductionPolynomial
            return new ECCurve.Fp(((ECFieldFp)field).getP(), a, b);
        } 
        else 
        { 
            ECFieldF2m fieldF2m = (ECFieldF2m)field;
            int m = fieldF2m.getM();
            int ks[] = ECUtil.convertMidTerms(fieldF2m.getMidTermsOfReductionPolynomial());
            return new ECCurve.F2m(m, ks[0], ks[1], ks[2], a, b); 
        } 
    } 
 
    public static ECParameterSpec convertSpec(
        EllipticCurve ellipticCurve,
        org.bouncycastle.jce.spec.ECParameterSpec spec)
    { 
        if (spec instanceof ECNamedCurveParameterSpec)
        { 
            return new ECNamedCurveSpec( 
                ((ECNamedCurveParameterSpec)spec).getName(),
                ellipticCurve,
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
             
            if (curveF2m.isTrinomial())
            { 
                ks = new int[] { curveF2m.getK1() };
                 
                return new EllipticCurve(new ECFieldF2m(curveF2m.getM(), ks), curve.getA().toBigInteger(), curve.getB().toBigInteger(), seed);
            } 
            else 
            { 
                ks = new int[] { curveF2m.getK3(), curveF2m.getK2(), curveF2m.getK1() };
 
                return new EllipticCurve(new ECFieldF2m(curveF2m.getM(), ks), curve.getA().toBigInteger(), curve.getB().toBigInteger(), seed);
            }  
        } 
 
    } 
     
    private static ECPoint convertPoint(
        org.bouncycastle.math.ec.ECPoint  g)
    { 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getM, getMidTermsOfReductionPolynomial
            return new ECCurve.Fp(((ECFieldFp)field).getP(), a, b);
        } 
        else 
        { 
            ECFieldF2m fieldF2m = (ECFieldF2m)field;
            int m = fieldF2m.getM();
            int ks[] = ECUtil.convertMidTerms(fieldF2m.getMidTermsOfReductionPolynomial());
            return new ECCurve.F2m(m, ks[0], ks[1], ks[2], a, b); 
        } 
    } 
 
    public static ECParameterSpec convertSpec(
        EllipticCurve ellipticCurve,
        org.bouncycastle.jce.spec.ECParameterSpec spec)
    { 
        if (spec instanceof ECNamedCurveParameterSpec)
        { 
            return new ECNamedCurveSpec( 
                ((ECNamedCurveParameterSpec)spec).getName(),
                ellipticCurve,
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getM, getMidTermsOfReductionPolynomial
            return new ECCurve.Fp(((ECFieldFp)field).getP(), a, b);
        } 
        else 
        { 
            ECFieldF2m fieldF2m = (ECFieldF2m)field;
            int m = fieldF2m.getM();
            int ks[] = ECUtil.convertMidTerms(fieldF2m.getMidTermsOfReductionPolynomial());
            return new ECCurve.F2m(m, ks[0], ks[1], ks[2], a, b); 
        } 
    } 
 
    public static ECParameterSpec convertSpec(
        EllipticCurve ellipticCurve,
        org.bouncycastle.jce.spec.ECParameterSpec spec)
    { 
        if (spec instanceof ECNamedCurveParameterSpec)
        { 
            return new ECNamedCurveSpec( 
                ((ECNamedCurveParameterSpec)spec).getName(),
                ellipticCurve,
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
        // test case 7: not equal objects - field class 
        c1 = new EllipticCurve(new ECFieldFp(BigInteger.valueOf(23L)),
                BigInteger.ONE,
                BigInteger.valueOf(19L),
                new byte[24]); 
        c2 = new EllipticCurve(new ECFieldF2m(5),
                BigInteger.ONE,
                BigInteger.valueOf(19L),
                new byte[24]); 
        assertFalse(c1.equals(c2) || c2.equals(c1));
    } 
} 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Java 8 ECFieldF2m Methods: