public static final class FipsDSA.DomainParametersValidator
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
FipsDSA.DomainParametersValidator.Version |
Constructor and Description |
---|
DomainParametersValidator(FipsDigestAlgorithm digestAlgorithm,
java.security.SecureRandom random)
Base constructor - for 186-4
|
DomainParametersValidator(FipsDSA.DomainParametersValidator.Version version,
FipsDigestAlgorithm digestAlgorithm,
java.security.SecureRandom random)
Base constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isPartiallyValidG(java.math.BigInteger p,
java.math.BigInteger q,
java.math.BigInteger g)
Do a partial validation of g against p and q.
|
boolean |
isValidG(java.math.BigInteger p,
java.math.BigInteger q,
byte[] seed,
int index,
java.math.BigInteger g)
Do a full validation of g against p and q by including the seed and index
associated with g's related parameters.
|
boolean |
isValidPAndQ(java.math.BigInteger p,
java.math.BigInteger q,
byte[] seed,
int counter)
Validate P and Q against the passed in seed and counter.
|
public DomainParametersValidator(FipsDigestAlgorithm digestAlgorithm, java.security.SecureRandom random)
digestAlgorithm
- digest to use in prime calculations.random
- source of randomness for prime number testing.public DomainParametersValidator(FipsDSA.DomainParametersValidator.Version version, FipsDigestAlgorithm digestAlgorithm, java.security.SecureRandom random)
version
- the version of DSS the validator is for.digestAlgorithm
- digest to use in prime calculations.random
- source of randomness for prime number testing.public boolean isValidPAndQ(java.math.BigInteger p, java.math.BigInteger q, byte[] seed, int counter)
p
- the prime P.q
- the prime Q.seed
- the seed P and Q were derived from.counter
- the number of iterations required to derive P.public boolean isPartiallyValidG(java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger g)
p
- the prime P.q
- the prime Q.g
- the generator G associated with P and Q.public boolean isValidG(java.math.BigInteger p, java.math.BigInteger q, byte[] seed, int index, java.math.BigInteger g)
p
- the prime P.q
- the prime Q.seed
- the domain parameter seed used to generate p and q.index
- the 8 bit usage index for G.g
- the generator G associated with P and Q.