AMD's RDRAND may never return a true zero, assembly hobbyist claims
A user on the flat assembler forum reports that on the AMD chips he tested, the RDRAND hardware random-number instruction never produces a full-width zero at the requested size, whether for 32-bit or 64-bit outputs. Lower-order bits can come up zero, but a complete zero value apparently never appears — across nine days of testing on two AMD systems, not one turned up. Intel parts, by contrast, emit zeros at the requested widths as expected. The finding is anecdotal and unverified, and no one in the thread has run RDRAND output through a proper statistical battery like TestU01’s BigCrush to characterize its quality.
The discussion quickly turns to the deeper question of trusting hardware entropy. Participants rehearse the familiar caution against relying on CPU-based RNGs in isolation for cryptography: RDRAND could be flawed or backdoored, so the safer practice is to mix its output with other entropy sources, since folding in additional data can never reduce the randomness of an already-random seed. Others note that biased or low-entropy hardware output has historically narrowed key search spaces enough to make brute-forcing practical. A separate curiosity surfaced in benchmarking — generation throughput varied wildly and non-intuitively across CPUs (a 2012 Core i5 hitting 12.6M values/sec versus a 2017 Core i7-7700 at just 750k), and the AMD generator appeared indifferent to clock speed, hinting at very different underlying RNG circuit revisions.
The practical significance is limited but worth watching: if an RNG systematically excludes a legal output value, its distribution is not uniform, which matters for cryptographic use even if the effect is small. The reporter says he emailed AMD, got back a reply that read as if it misread his results or was AI-generated, and followed up with code demonstrating the behavior; AMD has reportedly escalated the case internally, with no technical explanation yet. Until it’s independently reproduced and documentation on AMD’s RNG unit surfaces, this remains an intriguing single-source observation rather than a confirmed defect.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.