Created attachment 180961 [details] Patch_for_arc4random_discard As per Cryptographic Requirements published on Wikileaks on March 2017. We discard more bytes of the first keystream to reduce the possibility of non-random bytes. Similar to: freebsd/freebsd@9395fdf
Similar to patch: https://svnweb.freebsd.org/base?view=revision&revision=315225
A commit references this bug: Author: cy Date: Thu Jul 27 06:26:16 UTC 2017 New revision: 321605 URL: https://svnweb.freebsd.org/changeset/base/321605 Log: 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 Changes: head/contrib/ipfilter/arc4random.c
Committed. Thanks for the patch.
Changed component from kern to bin. IPF arc4random is a userland function.
A commit references this bug: Author: cy Date: Thu Aug 3 14:22:48 UTC 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: codarren@hackers.mu Reviewed by: emaste, cem Approved by: so (implicit, in r315225) Differential Revision: D11747 Patterned after: r315225 Changes: _U stable/10/ stable/10/contrib/ipfilter/arc4random.c _U stable/11/ stable/11/contrib/ipfilter/arc4random.c