They suggest the following algorithm to generate N bytes:
> The Inifite Noise driver uses the reference version of the SHA3 "sponge", called Keccak, with a 1600 bit state. To make the state of the sponge unpredictable, it is initialized with 20,000 bits of of Infinite Noise data before any data is output. After that, reading bytes from the SHA3 sponge blocks until twice as many bytes of entropy have been fed into the sponge from the Infinite Noise TRNG.
In code, that is
repeat N / (block size) times:
raw <- output of hardware
output SHA3(raw)
They claim that the hardware outputs only log(1.82) bits of entropy per bit. Thus, they are relying on SHA3 to act as a cryptographic extractor.Now, I don't think it's proven that the existence of an extractor implies the existence of psuedorandomness. However, I believe the usual construction would still assume that SHA3 was a psuedorandom generator. Under this assumption, then the following algorithm also outputs psuedorandom bits, but with only one use of the hardware.
let seed <- output of hardware
repeat N / (2 * block size) times:
result <- SHA3(seed)
seed <- first half of result
output second half of result
(Assuming the PRG is length-doubling. If it is less than length-doubling, we can still construct a length-doubling PRG wlog)Does anyone know why (I'd accept cryptographic, philosophical, or practical reasons) the first algorithm would be preferable to the second?
Relevant reading (both highly recommended books in their own right!):
Arora & Barak "Computational Complexity" Ch 21 "Expanders and Extractors"
Goldreich "Founds of Cryptography I" defines PRG and so forth