|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mindbright.jca.security.SecureRandomSpi
com.mindbright.security.prng.BlumBlumShub
An implementation of the Blum Blum Shub pseudo random number generator. This PRNGD is slow but is believed to be very strong.
| Field Summary | |
static byte[] |
N
Precalculated big modulus (using the getBlumInteger method with bits = 1024 and using built in SecureRandom in jdk 1.1.8 from IBM) |
| Constructor Summary | |
BlumBlumShub()
Creates an unseeded instance which uses the built in modulus N |
|
BlumBlumShub(java.math.BigInteger n,
byte[] seed)
Creates an instance with a custom modulus (M), do NOT use this unless you know exactly what you are doing. |
|
BlumBlumShub(byte[] seed)
Creates an instance which uses the built in modulus N |
|
| Method Summary | |
protected byte[] |
engineGenerateSeed(int numBytes)
Generate a number of random seed bytes. |
protected void |
engineNextBytes(byte[] bytes)
Generate random bytes |
protected void |
engineSetSeed(byte[] seed)
Set the seed used by the random number generator. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final byte[] N
| Constructor Detail |
public BlumBlumShub(java.math.BigInteger n,
byte[] seed)
n - modulus M to use in algorithm.seed - random bytes used to seed the generatorpublic BlumBlumShub(byte[] seed)
seed - random bytes used to seed the generatorpublic BlumBlumShub()
| Method Detail |
protected byte[] engineGenerateSeed(int numBytes)
SecureRandomSpi
engineGenerateSeed in class SecureRandomSpinumBytes - how many bytes to generate
protected void engineNextBytes(byte[] bytes)
SecureRandomSpi
engineNextBytes in class SecureRandomSpibytes - array which should be filled with random bytesprotected void engineSetSeed(byte[] seed)
SecureRandomSpi
engineSetSeed in class SecureRandomSpiseed - an array of random bytes
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||