diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-09-28 01:24:49 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-09-28 01:24:49 +0000 |
commit | 73cf0602f0e81640c80e5cfa22557281b533b4ee (patch) | |
tree | c333f6e79789766d7b2a1344651e15bcbec55005 /sys/dev | |
parent | 2a81e606d77ee44950d99ede0778c8df93bf7917 (diff) |
Set j = i after arc4random key schedule to be more like arc4 stream cipher;
from conversations between various people
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/rnd.c | 3 |
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; } |