From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7739 invoked by alias); 12 Apr 2006 04:46:17 -0000 Received: (qmail 7718 invoked by uid 48); 12 Apr 2006 04:46:16 -0000 Date: Wed, 12 Apr 2006 04:46:00 -0000 Message-ID: <20060412044616.7717.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug classpath/24481] SecureRandom.setSeed has no impact In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: java-prs@gcc.gnu.org From: "csm at gnu dot org" Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org X-SW-Source: 2006-q2/txt/msg00084.txt.bz2 List-Id: ------- 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