summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-09-28 01:24:49 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-09-28 01:24:49 +0000
commit73cf0602f0e81640c80e5cfa22557281b533b4ee (patch)
treec333f6e79789766d7b2a1344651e15bcbec55005 /sys
parent2a81e606d77ee44950d99ede0778c8df93bf7917 (diff)
Set j = i after arc4random key schedule to be more like arc4 stream cipher;
from conversations between various people
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/rnd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/rnd.c b/sys/dev/rnd.c
index 5c37fe605ba..7ed32c52708 100644
--- a/sys/dev/rnd.c
+++ b/sys/dev/rnd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rnd.c,v 1.32 1997/08/22 12:54:33 downsj Exp $ */
+/* $OpenBSD: rnd.c,v 1.33 1999/09/28 01:24:46 deraadt Exp $ */
/*
* random.c -- A strong random number generator
@@ -373,6 +373,7 @@ arc4_init (register u_int8_t *data, int len)
arc4_state.s[arc4_state.i] = arc4_state.s[arc4_state.j];
arc4_state.s[arc4_state.j] = si;
}
+ arc4_state.j = arc4_state.i;
arc4_state.cnt = 0;
}