summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorderaadt <>1999-09-28 01:24:48 +0000
committerderaadt <>1999-09-28 01:24:48 +0000
commit90cad1a3614d93f0d793d0fc3c1b50000083d1b2 (patch)
treea1437f4a918ba4dc2b82a2abf9406a2e8ea1214e
parenta02a2512c78e0de957f6b3b5a6bade91890c9cd8 (diff)
downloadopenbsd-90cad1a3614d93f0d793d0fc3c1b50000083d1b2.tar.gz
openbsd-90cad1a3614d93f0d793d0fc3c1b50000083d1b2.tar.bz2
openbsd-90cad1a3614d93f0d793d0fc3c1b50000083d1b2.zip
Set j = i after arc4random key schedule to be more like arc4 stream cipher;
from conversations between various people
-rw-r--r--src/lib/libc/crypt/arc4random.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libc/crypt/arc4random.c b/src/lib/libc/crypt/arc4random.c
index b3d65abe68..45f60de9cf 100644
--- a/src/lib/libc/crypt/arc4random.c
+++ b/src/lib/libc/crypt/arc4random.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: arc4random.c,v 1.4 1999/06/29 23:54:05 provos Exp $ */ 1/* $OpenBSD: arc4random.c,v 1.5 1999/09/28 01:24:48 deraadt Exp $ */
2 2
3/* 3/*
4 * Arc4 random number generator for OpenBSD. 4 * Arc4 random number generator for OpenBSD.
@@ -77,6 +77,7 @@ arc4_addrandom(as, dat, datlen)
77 as->s[as->i] = as->s[as->j]; 77 as->s[as->i] = as->s[as->j];
78 as->s[as->j] = si; 78 as->s[as->j] = si;
79 } 79 }
80 as->j = as->i;
80} 81}
81 82
82static void 83static void