public abstract class MessageDigestRandom extends SecRandom
The method used to generate the random bytes is based on a paper from BSI (Bundesamt fuer Sicherheit in der Informationstechnik) called AIS 20 (Anwendungshinweise und Interpretationen zum Schema), version 2.0, 02.12.1999. This algorithm is described in example E.5 of this paper.
Seeding of this implementation causes the new seed value to be
concatenated with the existing internal seed. The hash of this
concatenation becomes the new internal seed.
This means that the entropy of the internal seed is limited by the size
of the hash values produced by the used hash algorithm; i.e. 160 bit for
SHA-1.
Given a good message digest algorithm, the output will be evenly distributed. Due to the one-way property of the message digest function, it is infeasible to deduct the seed from the random bytes. The same holds for predicting future (or past) output knowing only previous and/or following output bytes.
MD5Random
,
SHA1Random
,
SHA256Random
,
SHA384Random
,
SHA512Random
,
SHA1FIPS186Random
,
SHA384FIPS186Random
,
SHA512FIPS186Random
,
RipeMd160Random
,
RipeMd160FIPS186Random
,
SeedGenerator
,
Serialized FormModifier | Constructor and Description |
---|---|
protected |
MessageDigestRandom(java.security.MessageDigest digest,
java.lang.String algorithm)
Constructor for use by subclasses.
|
getAlgorithm, getDefault, setDefault, setDefault, setSeed
generateSeed, getInstance, getInstance, getInstance, getProvider, getSeed, next, nextBytes, setSeed, setSeed