Pseudorandom Number Generators (PRNGs) and True Random Number Generators (TRNGs) are both used to generate “random” sequences of numbers that can be used as input in a wide variety of applications. The key distinction between the two lies in how they generate randomness.
PRNGs employ deterministic algorithms and an initial seed value to generate sequences of numbers. These algorithms aim to mimic the statistical properties of true randomness, but their output is ultimately deterministic and predictable if you know the seed. This means that given the same seed, a PRNG will produce the same sequence of numbers consistently. PRNGs find common usage in applications where practical randomness suffices but they can also be used to ‘stretch’ TRNG output. Meaning, because TRNG output is expensive to obtain, we can use PRNGs to derive cryptographically secure RNG data from the seed that came from the TRNG. PRNGs offer the advantage of speed and simplicity in implementation, as they rely solely on computational algorithms without the need for specialized hardware.
In contrast, TRNGs exploit inherently unpredictable physical phenomena such as radioactive decay, thermal noise, or ring oscillators to use as a source of randomness. TRNGs often require specialized hardware components to capture and process physical randomness reliably. Unlike PRNGs, which generate numbers based on deterministic algorithms, TRNGs produce numbers that are genuinely random and unpredictable. These qualities make TRNGs suitable for applications where high-quality randomness is critical, including cryptography.
wolfSSL’s software based TRNG wolfEntropy, is currently undergoing SP800-90B ESV validation and operates out-of-the-box with our crypto engine, wolfCrypt. If wolfEntropy isn’t a perfect fit, most higher end microcontrollers have TRNG sources which wolfCrypt can use as a direct random source or as a seed for its internal PRNG. Intel RDRAND, a silicon-based TRNG, is supported by wolfCrypt, along with the following hardware systems TRNGs:
- Espressif ESP32-WROOM-32
- Infineon Aurix TC3xx
- Intel SGX
- Microchip ATECC608
- Microchip PIC32MZ
- Nordic nRF5x
- NXP i.MX6 CAAM
- NXP i.MX7 CAAM
- NXP i.MX RT1060
- NXP Kinetis and KSDK
- Renesas TSIP
- Silicon Labs SE
- Telit M2MB
- Whitewood Quantum RNG
- Windows CryptGenRandom
- STM32C0xx
- STM32L0xx
- STM32G0xx
- STM32F0xx
- STM32L1xx
- STM32F2xx
- STM32F3xx
- STM32L4xx
- STM32G4xx
- STM32F4xx
- STM32WBxx
- STM32WLxx
- STM32F5xx
- STM32U5xx
- STM32L5xx
- STM32F7xx
- STM32H7xx
- STM32H5xx
You can find the full list of all hardware acceleration/cryptography platforms currently supported by wolfSSL here: Hardware Cryptography Support
If you have questions or comments about any of the above, please contact us at facts@wolfSSL.com or call us at +1 425 245 8247.
Download wolfSSL Now