What Is True Randomness? PRNG vs CSPRNG vs TRNG
Not all "random numbers" are truly random. In computing, randomness falls into three categories:
- Pseudo-Random (PRNG): Like JavaScript's Math.random(), generated by deterministic algorithms with predictable output. Not suitable for security-critical use.
- Cryptographically Secure (CSPRNG): Like the browser's crypto.getRandomValues(), based on OS-level entropy sources, providing cryptographic-grade unpredictability. This is what our tool uses.
- True Random (TRNG): From physical noise sources (radioactive decay, thermal noise), genuinely unpredictable but expensive and slow to obtain
For lotteries, sampling, test data, and most other scenarios, CSPRNG provides more than sufficient randomness while offering the best balance of performance and usability. Generate secure random numbers now â