We would like to use the HMAC DRBG as a source of random numbers in more places than just generating random delays. Eventually we would like to use it for everything, assuming the DRBG would be reseeded before generating security-critical values.
Determine where the DRBG can be used safely as is without reseeding, e.g. generating nonces, and make the replacements.
Ensure periodic reseeding of the DRBG from the TRNG.
Add more sources of randomness. These could be the value of the system clock at certain moments, e.g. user interaction.
As for 1., below is some preliminary research on where we could replace the TRNG with the DRBG right away:
random32():
storage mask NO
u2f keypath YES
random_buffer():
storage salt YES
storage keys NO
storage IVs YES
crypto bip39 NO
crypto monero random_scalar ?
modtrezorcrypto generating private keys in secp256k1 etc. NO
There is the recent freezing bug, which was apparently caused by reading from the TRNG before USB operations. It has something to do with I2C, I am not familiar with the details. To avoid this reocurring, it would be best to limit use of the TRNG especially when generating things like IVs, which do not require secrecy.
The advantage of the DRBG is that you can feed it multiple sources of entropy including the random data from the TRNG. This is a precaution in case the TRNG produces random numbers with lower entropy than it should or if it becomes biased as the hardware ages. It also makes things more difficult for attackers who are aiming to control the random numbers generated by the device. If entropy is taken from a single source such as the TRNG, then the attacker needs to disable only that one source.
We would like to use the HMAC DRBG as a source of random numbers in more places than just generating random delays. Eventually we would like to use it for everything, assuming the DRBG would be reseeded before generating security-critical values.
As for 1., below is some preliminary research on where we could replace the TRNG with the DRBG right away:
random32():
random_buffer():
random_uniform():
random_permute():
random.uniform():
random.bytes():