From 8066fa51cc1f5cd712a9806a45b4413bd7803a38 Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Tue, 28 Sep 1999 01:24:48 +0000 Subject: [PATCH] Set j = i after arc4random key schedule to be more like arc4 stream cipher; from conversations between various people --- src/lib/libc/crypt/arc4random.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/libc/crypt/arc4random.c b/src/lib/libc/crypt/arc4random.c index b3d65abe..45f60de9 100644 --- a/src/lib/libc/crypt/arc4random.c +++ b/src/lib/libc/crypt/arc4random.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arc4random.c,v 1.4 1999/06/29 23:54:05 provos Exp $ */ +/* $OpenBSD: arc4random.c,v 1.5 1999/09/28 01:24:48 deraadt Exp $ */ /* * Arc4 random number generator for OpenBSD. @@ -77,6 +77,7 @@ arc4_addrandom(as, dat, datlen) as->s[as->i] = as->s[as->j]; as->s[as->j] = si; } + as->j = as->i; } static void