public class JPAKEPrimeOrderGroup
extends java.lang.Object
JPAKEPrimeOrderGroups
for convenient standard groups.
NIST publishes
many groups that can be used for the desired level of security.Constructor and Description |
---|
JPAKEPrimeOrderGroup(java.math.BigInteger p,
java.math.BigInteger q,
java.math.BigInteger g)
Constructs a new
JPAKEPrimeOrderGroup . |
public JPAKEPrimeOrderGroup(java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger g)
JPAKEPrimeOrderGroup
.
In general, you should use one of the pre-approved groups from
JPAKEPrimeOrderGroups
, rather than manually constructing one.
The following basic checks are performed:
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 fail