TRNG
A TRNG (True Random Number Generator) generates cryptographically secure random numbers using physical processes, crucial for secure key generation in blockchain and cryptocurrency.
What Is a TRNG?
A TRNG (true random number generator) is a hardware component that produces random numbers from an unpredictable physical process, such as electronic noise in a circuit. A pseudo-random number generator (PRNG), by contrast, computes its output from a starting value and is only as unpredictable as that value.
The raw output of a physical source is slightly biased, so it is post-processed to even it out, and it is commonly used to seed a cryptographic PRNG that delivers the final numbers. Built-in health tests watch for a source that has failed or become stuck.
In a hardware wallet the TRNG supplies the entropy for the seed when a wallet is created: the 128 or 256 random bits that become a 12- or 24-word recovery phrase. If that entropy is predictable, an attacker can recompute the keys without ever touching the device, and weak random number generation has caused real losses in wallet software. Secure element chips include a TRNG for this purpose.
The limit is that a user cannot inspect the generator inside a chip and has to trust its maker. For that reason many wallets mix several sources of entropy, and some let the user add their own, for example with dice rolls, so that the seed does not depend on a single component.
Real-World Examples
Example 1: During setup, a hardware wallet draws 256 bits from the TRNG of its secure element, combines them with other entropy sources and displays the result as 24 words.
Example 2: A Coldcard Q owner who does not want to rely on the chip alone adds a long series of dice rolls when creating the seed, so the outcome also depends on randomness they produced themselves.
Frequently Asked Questions
Why does it matter if a hardware wallet's random number generator is weak?
Because the seed comes from it. The TRNG supplies the 128 or 256 random bits that become a 12- or 24-word recovery phrase. If that entropy is predictable, an attacker can recompute the keys without ever touching the device, and weak random number generation has caused real losses in wallet software.
Can I check the TRNG inside my hardware wallet?
No, a user cannot inspect the generator inside a chip and has to trust its maker. That is why many wallets mix several sources of entropy, and some let you add your own, for example with dice rolls, so that the seed does not depend on a single component.
How is a TRNG different from a pseudo-random number generator?
A TRNG draws on an unpredictable physical process, such as electronic noise in a circuit. A PRNG computes its output from a starting value and is only as unpredictable as that value. In practice they work together: the TRNG's post-processed output commonly seeds a cryptographic PRNG that delivers the final numbers.
Ready to Choose a Secure Wallet?
Use our tools to find the right hardware wallet for your needs.