Fork me on GitHub
#crypto
<
2022-02-11
Linus Ericsson00:02:01

https://github.com/weavejester/crypto-random/issues/9 Currently, this library uses SecureRandom, which defaults to SHA1PRNG. I try to read up on SHA1PRNG, there are some really broken impls (Android 2013 or so).

Linus Ericsson17:02:44

Also, I found out that SHA1PRNG, with a state space of 160 bits, cannot generate more that approx 2^160 combinations of random values. A key of 256 bits, is not truly random, but restricted to a 2^160 bit combinations. It is somewhat surprising that most Java things still uses the default SecureRandom.