public interface IHashDrbg
Modifier and Type | Method and Description |
---|---|
byte[] |
generate(int requested_no_of_bytes,
boolean prediction_resistant,
byte[] additionalInput)
Generate the requested number of bytes from the DRBG
From section 10.1.1.4 of NIST SP 800-90
|
int |
init(java.lang.String algorithm,
int bitStrengthRequested,
java.nio.ByteBuffer entropySource,
boolean predictionResistant)
Not really discussed in NIST document,
but seems to be necessary to implement.
|
void |
instantiate(byte[] nonce,
byte[] personalization)
Initialize the DRBG
|
void |
reseed(byte[] addlInput)
Add additional entropy to the DRBG.
|
void instantiate(byte[] nonce, byte[] personalization)
nonce
- caller-supplied nonce (optional, may be NULL)personalization
- caller-supplied personalization data (optional, may be NULL)
From NIST SP 800-90, Section 10.1.1.2void reseed(byte[] addlInput)
additionalInput
- caller-supplied additional input (optional, may be NULL)byte[] generate(int requested_no_of_bytes, boolean prediction_resistant, byte[] additionalInput) throws java.lang.IllegalStateException
requested_no_of_bytes
- how many bytes to produceprediction_resistant
- whether additional entropy has been supplied through
the entropySource for the generate operationadditionalInput
- caller-supplied additional input (optional, may be NULL)java.lang.IllegalStateException
int init(java.lang.String algorithm, int bitStrengthRequested, java.nio.ByteBuffer entropySource, boolean predictionResistant) throws java.lang.IllegalArgumentException
algorithm
- the name of the hash algorithm to employbitStrengthRequested
- the strength of the expected output (depends on
strength of the algorithm above, typical values 112, 128, 192, 256)entropySource
- a ByteBuffer the caller will use to supply entropy, or
NULL if caller chooses not topredictionResistant
- whether additional entropy will be supplied through
the entropySource before generate operationsjava.lang.IllegalArgumentException
© Portions Copyright 2003, 2012 IBM Corporation. All rights reserved.
© Portions Copyright 2003, 2012, Oracle and/or its affiliates. All rights reserved.