Java 8 EllipticCurve - 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 EllipticCurve class.

This code example shows how to use the following methods: getA, getB, getField
       EllipticCurve curve, 
       byte[] encoded)
    { 
        ECCurve c = null;
         
        if (curve.getField() instanceof ECFieldFp)
        { 
            c = new ECCurve.Fp(
                    ((ECFieldFp)curve.getField()).getP(), curve.getA(), curve.getB());
        } 
        else 
        { 
            int k[] = ((ECFieldF2m)curve.getField()).getMidTermsOfReductionPolynomial();
             
            if (k.length == 3)
            { 
                c = new ECCurve.F2m(
                        ((ECFieldF2m)curve.getField()).getM(), k[2], k[1], k[0], curve.getA(), curve.getB());
            } 
            else 

7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getA, getB, getField
    } 
 
    public static ECCurve convertCurve( 
        EllipticCurve ec)
    { 
        ECField field = ec.getField();
        BigInteger a = ec.getA();
        BigInteger b = ec.getB();
 
        if (field instanceof ECFieldFp)
        { 
            ECCurve.Fp curve = new ECCurve.Fp(((ECFieldFp)field).getP(), a, b);
 
            if (customCurves.containsKey(curve))
            { 
                return (ECCurve)customCurves.get(curve);
            } 
 
            return curve;
        } 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getA, getB, getField
    } 
 
    public static ECCurve convertCurve( 
        EllipticCurve ec)
    { 
        ECField field = ec.getField();
        BigInteger a = ec.getA();
        BigInteger b = ec.getB();
 
        if (field instanceof ECFieldFp)
        { 
            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); 
        } 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getA, getB, getField
       EllipticCurve curve, 
       byte[] encoded)
    { 
        ECCurve c = null;
         
        if (curve.getField() instanceof ECFieldFp)
        { 
            c = new ECCurve.Fp(
                    ((ECFieldFp)curve.getField()).getP(), curve.getA(), curve.getB());
        } 
        else 
        { 
            int k[] = ((ECFieldF2m)curve.getField()).getMidTermsOfReductionPolynomial();
             
            if (k.length == 3)
            { 
                c = new ECCurve.F2m(
                        ((ECFieldF2m)curve.getField()).getM(), k[2], k[1], k[0], curve.getA(), curve.getB());
            } 
            else 

6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getA, getB, getField
    } 
 
    public static ECCurve convertCurve( 
        EllipticCurve ec)
    { 
        ECField field = ec.getField();
        BigInteger a = ec.getA();
        BigInteger b = ec.getB();
 
        if (field instanceof ECFieldFp)
        { 
            ECCurve.Fp curve = new ECCurve.Fp(((ECFieldFp)field).getP(), a, b);
 
            if (customCurves.containsKey(curve))
            { 
                return (ECCurve)customCurves.get(curve);
            } 
 
            return curve;
        } 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
See Code Examples for Java 8 EllipticCurve Methods: