summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2017-03-14 06:12:51 +0000
committerdelphij <delphij@FreeBSD.org>2017-03-14 06:12:51 +0000
commitc2d58806b9c8f951eb62c390161af34447d7edd3 (patch)
tree582e911b983b7b54c95c518c45f09a401c3e43ca /lib/libc
parentaafc436d6904961a17414f9628d292d4d29435ee (diff)
downloadFreeBSD-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.c2
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;
}
OpenPOWER on IntegriCloud