Determine the require PRNG properties per use case
There are several places we use random numbers in BIND, and we need to determine the required qualities of RNG for each use case. I'll try to list the general categories here, along with initial layman's classification:
- DNS cookies (nonce): CSPRNG
- query ID (nonce): CSPRNG
- random NS selection: PRNG
- various jitter: PRNG, uniform
- RNDC nonce: CSPRNG
- NSEC3 Salt: CSPRNG
- view->secret, server->sctx->secret (???): ???
- GSS (nonce?): CSPRNG
- rndc.c serial (nonce?): CSPRNG(?)
- srtt in adb.c: PRNG
- task attach: PRNG
- port numbers (nonce?): ???
- HMAC generate: MUST use cryptolib
- Public Key Crypto: MUST use cryptolib
- expiring rbtdb nodes: PRNG (but really should use LRU or something as suggested in XXX)
- shuffling RDATA: PRNG
- "guessing" RTT in resolver.c: PRNG
- TKEY: CSPRNG
- isc_hash initialize (nonce): PRNG
- (task)pool(.c) selection: PRNG, uniform
- isc_file_renameunique(): PRNG, maybe use mkstemp()