bind9/util
Ondřej Surý 99ba29bc52 Change isc_random() to be just PRNG, and add isc_nonce_buf() that uses CSPRNG
This commit reverts the previous change to use system provided
entropy, as (SYS_)getrandom is very slow on Linux because it is
a syscall.

The change introduced in this commit adds a new call isc_nonce_buf
that uses CSPRNG from cryptographic library provider to generate
secure data that can be and must be used for generating nonces.
Example usage would be DNS cookies.

The isc_random() API has been changed to use fast PRNG that is not
cryptographically secure, but runs entirely in user space.  Two
contestants have been considered xoroshiro family of the functions
by Villa&Blackman and PCG by O'Neill.  After a consideration the
xoshiro128starstar function has been used as uint32_t random number
provider because it is very fast and has good enough properties
for our usage pattern.

The other change introduced in the commit is the more extensive usage
of isc_random_uniform in places where the usage pattern was
isc_random() % n to prevent modulo bias.  For usage patterns where
only 16 or 8 bits are needed (DNS Message ID), the isc_random()
functions has been renamed to isc_random32(), and isc_random16() and
isc_random8() functions have been introduced by &-ing the
isc_random32() output with 0xffff and 0xff.  Please note that the
functions that uses stripped down bit count doesn't pass our
NIST SP 800-22 based random test.
2018-05-29 22:58:21 +02:00
..
altbuild.sh Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
bindkeys.pl add header guard when generating bind.keys.h 2018-04-20 19:51:00 -04:00
branchsync.sh updated branchsync to deal with merge commits 2018-03-14 14:40:13 -07:00
check-categories.sh Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
check-changes ensure there is a blank line before a changes entry and a release marker 2018-05-23 20:46:38 -04:00
check-includes.pl Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
check-instincludes.sh Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
check-pullups.pl Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
check-sources.pl Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
checklibs.sh remove the rbtdb64 database implementation 2018-04-20 16:14:51 -07:00
commit-arm.sh Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
COPYRIGHT Update scripts in util/ to drop the year information from the individual source files. 2018-02-23 10:10:52 +01:00
COPYRIGHT.BRIEF ensure COPYRIGHT file retains years; edit file headers for consistency 2018-03-15 18:32:29 -07:00
COPYRIGHT.BSDI ensure COPYRIGHT file retains years; edit file headers for consistency 2018-03-15 18:32:29 -07:00
COPYRIGHT.NAI ensure COPYRIGHT file retains years; edit file headers for consistency 2018-03-15 18:32:29 -07:00
COPYRIGHT.NOM ensure COPYRIGHT file retains years; edit file headers for consistency 2018-03-15 18:32:29 -07:00
COPYRIGHT.PORTION ensure COPYRIGHT file retains years; edit file headers for consistency 2018-03-15 18:32:29 -07:00
COPYRIGHT.TOP ensure COPYRIGHT file retains years; edit file headers for consistency 2018-03-15 18:32:29 -07:00
copyrights Change isc_random() to be just PRNG, and add isc_nonce_buf() that uses CSPRNG 2018-05-29 22:58:21 +02:00
git-replay-merge.sh Add util/git-replay-merge.sh 2018-02-27 10:23:32 +01:00
kit.sh use the correct repository, and get archive by tag not hash 2018-05-21 13:43:49 -07:00
mandoc2docbook.pl Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
mdnbuildtest.sh Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
memleak.pl Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
merge_copyrights Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
mksymtbl.pl address win32 build issues 2018-05-22 16:32:21 -07:00
models.c Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
nanny.pl Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
new-func Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
nt-kit Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
spacewhack.pl Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
tabify-changes Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
update-drafts.pl Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
update_branches Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
update_copyrights ensure COPYRIGHT file retains years; edit file headers for consistency 2018-03-15 18:32:29 -07:00
xc Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00