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

This code example shows how to use the following methods:
                ellipticCurve = EC5Util.convertCurve(curve, ecP.getSeed());
 
                ecSpec = new ECNamedCurveSpec(
                        ECUtil.getCurveName(oid),
                        ellipticCurve,
                        new ECPoint(
                                ecP.getG().getX().toBigInteger(),
                                ecP.getG().getY().toBigInteger()),
                        ecP.getN(),
                        ecP.getH());
            } 
            else if (params.isImplicitlyCA())
            { 
                ecSpec = null;
                curve = ProviderUtil.getEcImplicitlyCa().getCurve();
            } 
            else 
            { 
                X9ECParameters          ecP = new X9ECParameters((ASN1Sequence)params.getParameters());
 
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: getAffineX, getAffineY
    public static org.bouncycastle.math.ec.ECPoint convertPoint( 
        ECCurve curve,
        ECPoint point,
        boolean withCompression)
    { 
        return curve.createPoint(point.getAffineX(), point.getAffineY(), withCompression);
    } 
} 
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: equals, getAffineX, getAffineY
        ECPoint out = new ECPoint(xOut, yOut);
        return out;
    } 
 
    private static ECPoint doublePoint(ECPoint r, EllipticCurve curve) {
        if (r.equals(ECPoint.POINT_INFINITY)) 
            return r;
        BigInteger slope = (r.getAffineX().pow(2)).multiply(THREE);
        slope = slope.add(curve.getA());
        BigInteger prime = ((ECFieldFp) curve.getField()).getP();
        slope = slope.multiply((r.getAffineY().multiply(TWO)).modInverse(prime));
        BigInteger xOut = slope.pow(2).subtract(r.getAffineX().multiply(TWO)).mod(prime);
        BigInteger yOut = (r.getAffineY().negate()).add(slope.multiply(r.getAffineX().subtract(xOut))).mod(prime);
        ECPoint out = new ECPoint(xOut, yOut);
        return out;
    } 
 
    /** 
     *  P-192 test only. 
     *  See KeyGenerator.main() for a test of all supported curves. 
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: getAffineX, getAffineY
    public static org.bouncycastle.math.ec.ECPoint convertPoint( 
        ECCurve curve,
        ECPoint point,
        boolean withCompression)
    { 
        return curve.createPoint(point.getAffineX(), point.getAffineY(), withCompression);
    } 
} 
Full Snippet Info
5
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:
            } 
        } 
         
        org.bouncycastle.math.ec.ECPoint p = c.decodePoint(encoded);
 
        return new ECPoint(p.getAffineXCoord().toBigInteger(), p.getAffineYCoord().toBigInteger());
    } 
} 
Full Snippet Info
5
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
See Code Examples for Java 8 ECPoint Methods: