summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2017-03-14 06:10:40 +0000
committerdelphij <delphij@FreeBSD.org>2017-03-14 06:10:40 +0000
commit01f2515b04c5ea1eca6a0d15a31abc0f7d6137c4 (patch)
treebca8a05d35931fb61db6c4230d4164a9ea192ece /lib
parente06e586c2f3b8d707fe016b3a038e1148080fa0a (diff)
downloadFreeBSD-src-01f2515b04c5ea1eca6a0d15a31abc0f7d6137c4.zip
FreeBSD-src-01f2515b04c5ea1eca6a0d15a31abc0f7d6137c4.tar.gz
MFC r315225:
Discard first 3072 bytes of RC4 keystream, this is a bandaid that allows us to work on switching to a more modern PRNG. Submitted by: Steven Chamberlain <steven pyro eu org> Approved by: so
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/arc4random.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gen/arc4random.c b/lib/libc/gen/arc4random.c
index a22e290..171de16 100644
--- a/lib/libc/gen/arc4random.c
+++ b/lib/libc/gen/arc4random.c
@@ -171,7 +171,7 @@ arc4_stir(void)
* Discard early keystream, as per recommendations in:
* "(Not So) Random Shuffles of RC4" by Ilya Mironov.
*/
- for (i = 0; i < 1024; i++)
+ for (i = 0; i < 3072; i++)
(void)arc4_getbyte();
arc4_count = 1600000;
}
OpenPOWER on IntegriCloud