Bouncy Castle Cryptography Library 1.71

org.bouncycastle.pqc.crypto.test
Class NISTSecureRandom

java.lang.Object
  extended byjava.util.Random
      extended byjava.security.SecureRandom
          extended byorg.bouncycastle.pqc.crypto.test.NISTSecureRandom
All Implemented Interfaces:
java.io.Serializable

public class NISTSecureRandom
extends java.security.SecureRandom

for producing FixedSecureRandom objects for use with testing

See Also:
Serialized Form

Constructor Summary
NISTSecureRandom(byte[] seed, byte[] personalization)
           
 
Method Summary
static FixedSecureRandom getFixed(byte[] seed, byte[] personalization, int strength, int discard, int size)
           
static FixedSecureRandom getFixed(byte[] seed, int strength)
          Return a seeded FixedSecureRandom representing the result of processing a CMCE test seed with the CMCE RandomNumberGenerator.
static FixedSecureRandom getFixedNoDiscard(byte[] seed, int strength)
           
 void nextBytes(byte[] x)
           
 
Methods inherited from class java.security.SecureRandom
generateSeed, getInstance, getInstance, getInstance, getProvider, getSeed, next, setSeed, setSeed
 
Methods inherited from class java.util.Random
nextBoolean, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NISTSecureRandom

public NISTSecureRandom(byte[] seed,
                        byte[] personalization)
Method Detail

getFixed

public static FixedSecureRandom getFixed(byte[] seed,
                                         int strength)
Return a seeded FixedSecureRandom representing the result of processing a CMCE test seed with the CMCE RandomNumberGenerator.

Parameters:
seed - original CMCE seed
strength - bit-strength of the RNG required.
Returns:
a FixedSecureRandom containing the correct amount of seed material for use with Java.

getFixed

public static FixedSecureRandom getFixed(byte[] seed,
                                         byte[] personalization,
                                         int strength,
                                         int discard,
                                         int size)

getFixedNoDiscard

public static FixedSecureRandom getFixedNoDiscard(byte[] seed,
                                                  int strength)

nextBytes

public void nextBytes(byte[] x)

Bouncy Castle Cryptography Library 1.71