diff options
author | delphij <delphij@FreeBSD.org> | 2017-03-14 06:12:51 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2017-03-14 06:12:51 +0000 |
commit | c2d58806b9c8f951eb62c390161af34447d7edd3 (patch) | |
tree | 582e911b983b7b54c95c518c45f09a401c3e43ca /lib/libc | |
parent | aafc436d6904961a17414f9628d292d4d29435ee (diff) | |
download | FreeBSD-src-c2d58806b9c8f951eb62c390161af34447d7edd3.zip FreeBSD-src-c2d58806b9c8f951eb62c390161af34447d7edd3.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/libc')
-rw-r--r-- | lib/libc/gen/arc4random.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gen/arc4random.c b/lib/libc/gen/arc4random.c index 59c4f7f..8e231cd 100644 --- a/lib/libc/gen/arc4random.c +++ b/lib/libc/gen/arc4random.c @@ -172,7 +172,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; } |