bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: csm at gnu dot org
Subject: [Bug classpath/24481] SecureRandom.setSeed has no impact
Date: 12 Apr 2006 04:46:17 -0000


------- Comment #9 from csm at gnu dot org  2006-04-12 04:46 -------
Created an attachment (id=11246)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11246&action=view)
SecureRandom setSeed test

I'm testing a patch for this.

Note that the attached test case will repeatedly output the same bytes.
However, if you change the byte array size to 20 or more, the output is
different per call to `nextBytes'. SHA1 is 20 bytes long, so I suspect that we
were keeping a buffer in our secure random the size of the hash function, and
when we add a seed to it, we are resetting the index into this buffer.


-- 


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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]