public class CTRSP800DRBG extends java.lang.Object implements SP80090DRBG
| Constructor and Description |
|---|
CTRSP800DRBG(BlockCipher engine,
int keySizeInBits,
int securityStrength,
EntropySource entropySource,
byte[] personalizationString,
byte[] nonce)
Construct a SP800-90A CTR DRBG.
|
public CTRSP800DRBG(BlockCipher engine, int keySizeInBits, int securityStrength, EntropySource entropySource, byte[] personalizationString, byte[] nonce)
Minimum entropy requirement is the security strength requested.
engine - underlying block cipher to use to support DRBGkeySizeInBits - size of the key to use with the block cipher.securityStrength - security strength required (in bits)entropySource - source of entropy to use for seeding/reseeding.personalizationString - personalization string to distinguish this DRBG (may be null).nonce - nonce to further distinguish this DRBG (may be null).public int generate(byte[] output,
byte[] additionalInput,
boolean predictionResistant)
generate in interface SP80090DRBGoutput - output array for generated bits.additionalInput - additional input to be added to the DRBG in this step.predictionResistant - true if a reseed should be forced, false otherwise.public void reseed(byte[] additionalInput)
reseed in interface SP80090DRBGadditionalInput - additional input to be added to the DRBG in this step.