|
|||||||||
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.FIPS186Random
This class implements a secure pseudo-random number generator based on a MessageDigest. It cannot be used directly and has to be subclassed. Subclasses just have to call the superclass constructor with the MessageDigest object as parameter, everything else is taken care of.
This pseudo random works according to FIPS PUB 186-2 with an hash
function as one-way function G(t,c)
. As this is a
general purpose random generator, the mod q
operation is omitted. As a consequence of omitting this modulo
operation, the changes to the FIPS PUB 186-2 pseudo random generator
need not be considered, because they have no influence in this case.
The concrete classes are derived from this class and provide a raw hash algorithm. The raw hash provides access to the raw compression function. This algorithm requires a raw hash rather than a complete hash, because this FIPS algorithm operates on the compression function part and not on the complete hash function. The complete hash function includes a certain padding, which this algorithm does not; it simply appends zeros up to the required block size.
SHA1FIPS186Random
,
SHA256FIPS186Random
,
SHA384FIPS186Random
,
SHA512FIPS186Random
,
RipeMd160FIPS186Random
,
SeedGenerator
, Serialized FormConstructor Summary | |
protected |
FIPS186Random(RawHash hash)
Constructor for use by subclasses. |
Method Summary | |
protected void |
engineNextBytes(byte[] bytes)
Return bytes.length random bytes. |
protected void |
engineSetSeed(byte[] seed)
Add this seed to the internal seed. |
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 |
protected FIPS186Random(RawHash hash)
digest
- The raw hash function to use.Method Detail |
protected void engineSetSeed(byte[] seed)
engineSetSeed
in class SecRandom
seed
- The seed to feed into this pseudo random generator.protected void engineNextBytes(byte[] bytes)
engineNextBytes
in class SecRandom
bytes
- The buffer to fill with random bytes.
|
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 |