| public ECJPAKECurve(BigInteger q, BigInteger a, BigInteger b, BigInteger n, BigInteger h, BigInteger g_x, BigInteger g_y) Constructs a new 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:
- q must be prime
- n must be prime
- The curve must not be singular i.e. the discriminant is equal to 0 mod q
- G must lie on the curve
- n*h must equal the order of the curve
- a must be in [0, q-1]
- b must be in [0, q-1]
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.
- Exceptions
- NullPointerException:
- if any argument is null
- IllegalArgumentException:
- if any of the above validations fail
|