|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Random | +--java.security.SecureRandom | +--iaik.security.random.SecRandom | +--iaik.security.random.AnsiRandom
This class implements a secure pseudorandom generator as specified in ANSI X9.17. It was specified for the generation of DES initialization vectors, and consequently uses a seed of only 64 bits. Therefore, it cannot be recommended for general use. Because Triple DES is used to generate the output, the IAIK provider must be installed.
In addition to the seed, X9.17 defines that it shall use the current system time. That means, if you generate two instances of AnsiRandom, they will output a different pseudo random sequence even if you specified the same seed. A setI() method is defined to allow modification of that second seed value.
Constructor Summary | |
AnsiRandom()
Generate a new AnsiRandom with the specified seed. |
Method Summary | |
protected void |
engineNextBytes(byte[] bytes)
Return the next bytes.length pseudo random bytes. |
protected void |
engineSetSeed(byte[] seed)
Set the seed to the given byte array. |
void |
setI()
Set the I vector to the current time. |
void |
setI(long time)
Set the I vector to the specified long. |
Methods inherited from class iaik.security.random.SecRandom |
getDefault, nextBytes, setDefault, setSeed, setSeed, setSeed |
Methods inherited from class java.security.SecureRandom |
generateSeed, getInstance, getInstance, getProvider, getSeed, next |
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 |
public AnsiRandom() throws RandomException
Method Detail |
public void setI()
public void setI(long time)
protected void engineNextBytes(byte[] bytes)
engineNextBytes
in class SecRandom
protected void engineSetSeed(byte[] seed)
engineSetSeed
in class SecRandom
|
This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |