Java 7 comes with SunEC , which provides ECDH and ECDSA operations. I tried to perform basic EC operations (point addition, scalar multiplication).
I start with
ECParameterSpec p256 = NamedCurve.getECParameterSpec("secp256r1"); ECPoint generator = p256.getGenerator(); BigInteger scalar = new BigInteger("23");
But from there I do not see the next step. No ECPoint.scalarMultiply()
or ECPoint.add()
or EllipticCurve.multiply()
.
Am I missing something, or the answer is simply "you can't do it without a third-party library?"
source share