java.security.SecureRandom
besides others has two methods: generateSeed(int numBytes)
and nextBytes(byte[] bytes)
. The former gets entropy from the external source and is less predictable but slower, the latter uses PRNG sequence and is more predictable but much faster.
I want to have a single java.security.SecureRandom
to seed a number of MersenneTwisterFast PRNGs, and my question is whether it is secure enough to seed them with nextBytes
as long as SecureRandom
has been seeded in a secure manner in the first place?