3 ms·
"exponential" in what? You can just encrypt a counter using AES or ChaCha ([1]) to produce 2^68 random bytes from 24 initial bytes. You can use HKDF to expand
by wolf550e 9y ago
"exponential" in what?
You can just encrypt a counter using AES or ChaCha ([1]) to produce 2^68 random bytes from 24 initial bytes. You can use HKDF to expand 16 bytes into as many key+nonce pairs as you want, each producing 2^68 random bytes.
1 - use AES if your hardware has AESNI, my mobile i7 can do AES at 5GB/sec on a single core
- gumby 9y agoThanks, this is a good idea. We don't need fast, we need repeatable so that the same seed into the same prng produces the same number on different machines (different CPUs, different OSes) which is why we want to change from simply using the system facilities as we do now. Yet the number of calls to rand() in each simulation is high enough that we don't want to simply keep a large table of random numbers.
- wolf550e 9y agoAES and ChaCha are very repeatable. :-) They also happen to be fast.