public class ECJPAKECurve
extends java.lang.Object
In general, J-PAKE can use any elliptic curve or prime order group that is suitable for public key cryptography.
See ECJPAKECurves
for convenient standard curves.
NIST publishes many curves with different forms and levels of security.
Constructor and Description |
---|
ECJPAKECurve(java.math.BigInteger q,
java.math.BigInteger a,
java.math.BigInteger b,
java.math.BigInteger n,
java.math.BigInteger h,
java.math.BigInteger g_x,
java.math.BigInteger g_y)
Constructs a new
ECJPAKECurve . |
Modifier and Type | Method and Description |
---|---|
java.math.BigInteger |
getA() |
java.math.BigInteger |
getB() |
ECCurve.AbstractFp |
getCurve() |
ECPoint |
getG() |
java.math.BigInteger |
getH() |
java.math.BigInteger |
getN() |
java.math.BigInteger |
getQ() |
public ECJPAKECurve(java.math.BigInteger q, java.math.BigInteger a, java.math.BigInteger b, java.math.BigInteger n, java.math.BigInteger h, java.math.BigInteger g_x, java.math.BigInteger g_y)
ECJPAKECurve
.
In general, you should use one of the pre-approved curves from
ECJPAKECurves
, rather than manually constructing one.
The following basic checks are performed:
The prime checks are performed using BigInteger.isProbablePrime(int)
,
and are therefore subject to the same probability guarantees.
These checks prevent trivial mistakes. However, due to the small uncertainties if p and q are not prime, advanced attacks are not prevented. Use it at your own risk.
java.lang.NullPointerException
- if any argument is nulljava.lang.IllegalArgumentException
- if any of the above validations failpublic ECCurve.AbstractFp getCurve()
public ECPoint getG()
public java.math.BigInteger getA()
public java.math.BigInteger getB()
public java.math.BigInteger getN()
public java.math.BigInteger getH()
public java.math.BigInteger getQ()