(Catching up...)

On 07/19/13 14:00, Mike Duigou wrote:

Using a shared static SecureRandom.generateSeed() to generate the seed is
probably the easiest way to get a good seed that is portable.

I agree and updated accordingly.


I have previous experience mucking in this area. Attempting to use
SecureRandom will likely encounter order of initialization issues as it is
loaded from security providers and is only functional/available very late in
the VM boot process.

Because SplittableRandom is a new class, there won't be any
immediate within-JDK dependencies, so this shouldn't be a
problem.


I had considered suggesting adding a vm interface to access the platform
native secure random number generation (/dev/random or rand_s). This would be
useful for early boot and perhaps for speeding up seeding of SecureRandom.


Good idea. I started to explore doing something like this only
for SplittableRandom, but then noticed that it would be better to
benefit from more general improvements to SecureRandom in using
OS-supported randoms: When OS support exists (which is almost
always these days), it could and should be made simpler and faster
to use. (Additionally, a "getLongSeed()" method would be handy, avoiding
two byte-array conversions in what is probably the most common use case.)

-Doug



Reply via email to