public final class DRBGusingSHA512 extends FIPS140_2Compliant
An instance of this algorithm can be obtained using the Java Cryptography
Architecture (JCA), by requesting a 'DRBGusingSHA512' PRNG from the
Entrust cryptographic
service provider. This can be done using the following call:
SecureRandom.getInstance("DRBGusingSHA512", "Entrust");
| Constructor and Description |
|---|
DRBGusingSHA512()
The constructor; creates a new instance of the DRBGusingSHA512
pseudo-random number generation algorithm.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
engineSetSeed(byte[] seed)
Reseeds this random object.
|
static void |
runFipsKat()
Runs a FIPS 140-2 known answer test on this DRBG.
|
engineGenerateSeed, engineNextBytespublic DRBGusingSHA512()
throws java.lang.SecurityException
Applications should not use this constructor, instead the signature
algorithm should be requested from the appropriate JCA/JCE cryptographic
service provider as follows:
SecureRandom.getInstance("DRBGusingSHA512", "Entrust").
java.lang.SecurityExceptionprotected void engineSetSeed(byte[] seed)
throws java.lang.SecurityException
FIPS140_2CompliantThe given seed supplements, rather than replaces, the existing seed. Thus, repeated calls are guaranteed never to reduce randomness.
This implementation DOES NOT allow the caller to set the initial seed,
even when the caller follows the call to
SecureRandom.getInstance() method with a call to the
setSeed() method. This ensures that it is impossible to have
an initial seed that is not cryptographically strong.
The seed that is passed in is not used directly; instead the seed is hashed before prior to use. The hashing is done because the entropy of the provided seed may not be spread evenly through all of the seed bits (no way to guarantee a cryptographically strong seed will be passed in the API). By passing the seed through a hash (message digest) algorithm, the entropy is spread (more or less) evenly through all of the bits.
Once the provided seed has been hashed, the result is used to supplement (not replace) the existing internal seed data. Following this call, the seed passed is NOT automatically wiped from memory; this SHOULD be done manually. All internal temporary data used is in this call is also automatically wiped following usage.
engineSetSeed in class FIPS140_2Compliantseed - [FIPS 140-2 data input] [FIPS 140-2 CSP] the seed.java.lang.SecurityExceptionpublic static void runFipsKat()
This API is intended for internal use only during initialization in FIPS_OPERATIONAL mode; it should NEVER be called externally.
Fips140ErrorStateException - [FIPS 140-2 status output] thrown if the Toolkit is not
allowed to perform cryptographic operations or the self-test
fails