From 223428af4775b9af8e9ef4118e8e0f76fa591eea Mon Sep 17 00:00:00 2001 From: Cy Schubert Date: Thu, 27 Jul 2017 06:26:15 +0000 Subject: [PATCH] As in r315225, discard 3072 bytes of RC4 bytestream instead of 1024. PR: 217920 Submitted by: codarren@hackers.mu Reviewed by: emaste, cem Approved by: so (implicit, in r315225) MFC after: 1 week Differential Revision: D11747 Patterned after: r315225 --- contrib/ipfilter/arc4random.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/ipfilter/arc4random.c b/contrib/ipfilter/arc4random.c index 04b0797c78f8..499428702a81 100644 --- a/contrib/ipfilter/arc4random.c +++ b/contrib/ipfilter/arc4random.c @@ -109,9 +109,9 @@ arc4_randomstir (void) /* * Throw away the first N words of output, as suggested in the * paper "Weaknesses in the Key Scheduling Algorithm of RC4" - * by Fluher, Mantin, and Shamir. (N = 256 in our case.) + * by Fluher, Mantin, and Shamir. (N = 768 in our case.) */ - for (n = 0; n < 256*4; n++) + for (n = 0; n < 768*4; n++) arc4_randbyte(); MUTEX_EXIT(&arc4_mtx); }