Top Description Methods
org.bouncycastle.crypto.fips

pack-priv Interface DRBG

Known Direct Subinterfaces
org.bouncycastle.crypto.fips.SP80090DRBG
Known Direct Implementers
org.bouncycastle.crypto.fips.DRBGPseudoRandom, org.bouncycastle.crypto.fips.ContinuousTestingPseudoRNG

Interface to SP800-90A/X9.31 deterministic random bit generators.

Method Summary

Modifier and TypeMethod and Description
public VariantInternalKatTest

Returns:

a self test
createReseedSelfTest
(FipsAlgorithm
the FipsAlgorithm type
algorithm
)

Return a KAT for the DRBG - used prior to reseed.

public VariantInternalKatTest

Returns:

a self test
createSelfTest
(FipsAlgorithm
the FipsAlgorithm type
algorithm
)

Return a KAT for the DRBG - used prior to initialisation.

public int

Returns:

number of bits generated, -1 if a reseed required.
generate
(byte[]
output array for generated bits.
output
,
byte[]
additional input to be added to the DRBG in this step.
additionalInput
,
boolean
true if a reseed should be forced, false otherwise.
predictionResistant
)

Populate a passed in array with random data.

public int

Returns:

the block size (in bits) produced by each round of the DRBG.
getBlockSize
()

Return the block size of the DRBG.

public int

Returns:

the security strength (in bits) of the DRBG.
getSecurityStrength
()

Return the security strength of the DRBG.

public void
reseed(byte[]
additional input to be added to the DRBG in this step.
additionalInput
)

Reseed the DRBG.

Method Detail

createReseedSelfTestback to summary
public VariantInternalKatTest createReseedSelfTest(FipsAlgorithm algorithm)

Return a KAT for the DRBG - used prior to reseed.

Parameters
algorithm:FipsAlgorithm

the FipsAlgorithm type

Returns:VariantInternalKatTest

a self test

createSelfTestback to summary
public VariantInternalKatTest createSelfTest(FipsAlgorithm algorithm)

Return a KAT for the DRBG - used prior to initialisation.

Parameters
algorithm:FipsAlgorithm

the FipsAlgorithm type

Returns:VariantInternalKatTest

a self test

generateback to summary
public int generate(byte[] output, byte[] additionalInput, boolean predictionResistant)

Populate a passed in array with random data.

Parameters
output:byte[]

output array for generated bits.

additionalInput:byte[]

additional input to be added to the DRBG in this step.

predictionResistant:boolean

true if a reseed should be forced, false otherwise.

Returns:int

number of bits generated, -1 if a reseed required.

getBlockSizeback to summary
public int getBlockSize()

Return the block size of the DRBG.

Returns:int

the block size (in bits) produced by each round of the DRBG.

getSecurityStrengthback to summary
public int getSecurityStrength()

Return the security strength of the DRBG.

Returns:int

the security strength (in bits) of the DRBG.

reseedback to summary
public void reseed(byte[] additionalInput)

Reseed the DRBG.

Parameters
additionalInput:byte[]

additional input to be added to the DRBG in this step.