|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--iaik.security.random.SeedGenerator | +--iaik.security.random.JDKSeedGenerator
This class is a simple wrapper for the seed generator used in JDK SecureRandom. It can generate as many bytes as you need, but it is fairly slow. That process is started when you call getSeed(). Per default this class generates a 160 bit seed (20 bytes).
Depending on the platform and JDK version you are using the performance may vary. On Windows NT it generates about 3 bytes per second regardsless of your CPU speed, on the same machine with Windows 95/98 it might take several seconds for a single byte, i.e. possibly a couple of minutes for the 160 bit seed. Also, performance may degrade extremely if the CPU load changes while the seed generator is running or is very high when it is started. Note that it consumes your entire CPU while running.
In short, I am not very happy with the seed generation in the JDK. Unfortunately, we are currently not able to offer an alternative that works without user interaction and generates a secure seed on all the various platforms.
Fields inherited from class iaik.security.random.SeedGenerator |
seedGenListener |
Constructor Summary | |
JDKSeedGenerator()
Initialize generation of a seed with the default amount of randomness (160 bit). |
|
JDKSeedGenerator(int numBits)
Initialize generation of a seed with the specified number of bits of randomness. |
Method Summary | |
byte[] |
getSeed()
Return the seed. |
int[] |
getStatus()
Return the status of seed generation. |
Methods inherited from class iaik.security.random.SeedGenerator |
callSeedGenListener, getDefault, getDefaultSeedGenerator, longToBytes, seedAvailable, setDefault, setDefaultSeedGenerator, setSeedGenListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JDKSeedGenerator()
public JDKSeedGenerator(int numBits)
Method Detail |
public int[] getStatus()
{numBits, numBits}
, i.e. it is always ok to call getSeed().getStatus
in class SeedGenerator
public byte[] getSeed()
getSeed
in class SeedGenerator
|
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 |