1 package org.bouncycastle.crypto.prng.drbg; 2 3 /** 4 * Interface to SP800-90A deterministic random bit generators. 5 */ 6 public interface SP80090DRBG 7 { 8 /** 9 * Return the block size of the DRBG. 10 * 11 * @return the block size (in bits) produced by each round of the DRBG. 12 */ getBlockSize()13 int getBlockSize(); 14 15 /** 16 * Populate a passed in array with random data. 17 * 18 * @param output output array for generated bits. 19 * @param additionalInput additional input to be added to the DRBG in this step. 20 * @param predictionResistant true if a reseed should be forced, false otherwise. 21 * 22 * @return number of bits generated, -1 if a reseed required. 23 */ generate(byte[] output, byte[] additionalInput, boolean predictionResistant)24 int generate(byte[] output, byte[] additionalInput, boolean predictionResistant); 25 26 /** 27 * Reseed the DRBG. 28 * 29 * @param additionalInput additional input to be added to the DRBG in this step. 30 */ reseed(byte[] additionalInput)31 void reseed(byte[] additionalInput); 32 } 33