> From: Edward Ned Harvey (bouncycastle)
> [mailto:bouncycas...@nedharvey.com]
> 
> The default constructor of SecureRandom uses GetSeed(8), which is only 64
> bits, but worse yet, GetSeed seeds itself from the system clock Ticks.

I am sorry - I just stepped through code for the nineteenth time, and I just 
discovered I was wrong. YES, it's bad to use time as seed to prng, NO that's 
not all bouncy castle does. In fact, BC SecureRandom has a static instance 
called Master, which is seeded from Ticks and ThreadedSeedGenerator. The 
"SetSeed" method is confusing because it only adds seed material from Ticks; 
does not reduce the strength of the already present seed.

So I think this is actually ok.  Yes it could be stronger, by additionally 
pulling from things like the OS CryptoApiGenerator in addition to 
ThreadedSeedGenerator and Ticks, but no, it's not a big bad problem as I 
thought.  Sorry again, and thanks for discussion...

Reply via email to