AMD's random number generator can't generate a 0?
6 hours ago
- A user discovered that AMD processors (possibly Zen2) cannot generate the number 0 using 'rdrand' and 'rdseed' instructions, while Intel processors produce zeros normally.
- An application was shared to test this, displaying random number generation via bars; on AMD, the first bar (representing zero count) doesn't change color from green (TSC method) and the chart never scales beyond zero.
- The issue was reported to AMD, whose initial reply seemed generic or AI-generated; a more detailed follow-up included code snippets, but no further update has been received.
- Discussion covers whether zero is intentionally excluded by AMD (e.g., to avoid perceived brokenness or mathematical issues in formulas), contrasting with Intel's behavior.
- The RDRAND/RDSEED performance varies across processors (e.g., Core i5 2012: 12.6M/s, Core i7 7700: 750k/s, AMD Ryzen 7: 2.6M/s), with AMD's RNG insensitive to clock speed.
- Technical details are shared about the RNG circuit: a noise generator feeds a seed, then uses AES CSPRNG; RDRAND is fast, RDSEED is slower, but backdoor potential is noted.