Class NISTSecureRandom

java.lang.Object
java.util.Random
java.security.SecureRandom
org.bouncycastle.pqc.crypto.test.NISTSecureRandom
All Implemented Interfaces:
Serializable, java.util.random.RandomGenerator

public class NISTSecureRandom extends SecureRandom
for producing FixedSecureRandom objects for use with testing
See Also:
  • Constructor Details

    • NISTSecureRandom

      public NISTSecureRandom(byte[] seed, byte[] personalization)
  • Method Details

    • 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)
      Specified by:
      nextBytes in interface java.util.random.RandomGenerator
      Overrides:
      nextBytes in class SecureRandom