This is the mail archive of the java-prs@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug classpath/24481] SecureRandom.setSeed has no impact



------- Comment #6 from david at jpackage dot org  2006-04-11 04:34 -------
I was saying something slightly different, since I did not test the program
across multiple runs. I did test nextBytes() within the same program run, and
this produced identical bytes with each successive call to nextBytes().

Checking the javadocs, I find:

``Note that this instance of SecureRandom has not been seeded... [but] [i]f a
call is not made to setSeed, the first call to the nextBytes method will force
the SecureRandom object to seed itself.''

Note that even though `new SecureRandom()' does not seed itself, any attempt to
extract randomness will cause it to seed itself first before returning any
bytes, so I believe the GNU implementation to be incorrect.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24481


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]