Score:0

Is hashing random numbers generated from a TRNG enough to create a key?

ng flag

Is hashing random numbers generated from a TRNG enough to create a key?

Basically taking the output of something like a Lavarand and pass that through a hash function like sha-2.

I guess at the end of the day the core of my question is, can an hash function be used as a pseudorandom number generator?

kelalaka avatar
in flag
We had recently a question about this and many. All questions are welcomed and searched questions are more accepted by the community. [How to calculate the bias of cryptographic hash output from biased input?](https://crypto.stackexchange.com/q/55657/18298) [Using a Hash as a secure PRNG](https://crypto.stackexchange.com/q/9076/18298)
Paul Uszak avatar
cn flag
Just a little quirk re. terminology, but output from a decent TRNG can be used for keys as is. Lava lamps are just a entropy source, not a TRNG per se.
Score:0
in flag

Yes, If you have a TRNG you can use the output from it when a random key is required for cryptographic purposes.

If you doubt your TRNG indeed has sufficient entropy and sufficiently small bias, a good strategy is to collect more bits than needed from your entropy source and hash them using a secure hash algorithm.

I believe Lavarand already does something similar it collects entropy and uses it to seed a PRNG. I did not actually review the internal so can't comment but if they do a reasonable job hashing the output would be redundant.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.