Author: cy Date: Thu Aug 3 14:22:48 2017 New Revision: 322012 URL: https://svnweb.freebsd.org/changeset/base/322012
Log: MFC r321605: As in r315225, discard 3072 bytes of RC4 bytestream instead of 1024. (This implementation of arc4rand(9) is used by the userland ipftest utility as it approximates ipfilter kernelspace in userspace.) PR: 217920 Submitted by: [email protected] Reviewed by: emaste, cem Approved by: so (implicit, in r315225) Differential Revision: D11747 Patterned after: r315225 Modified: stable/11/contrib/ipfilter/arc4random.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/ipfilter/arc4random.c Directory Properties: stable/10/ (props changed) Modified: stable/11/contrib/ipfilter/arc4random.c ============================================================================== --- stable/11/contrib/ipfilter/arc4random.c Thu Aug 3 14:20:19 2017 (r322011) +++ stable/11/contrib/ipfilter/arc4random.c Thu Aug 3 14:22:48 2017 (r322012) @@ -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); } _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "[email protected]"
