
AMD's RNG can't return a zero? A forum thread tests RDRAND and RDSEED
A thread on the flat assembler board reports that RDRAND and RDSEED never return an all-zero value at the requested width on AMD processors. The author published a test application, a workaround and benchmark numbers.
A thread opened on the flat assembler message board in May 2026 reports an unusual observation: on AMD processors the RDRAND and RDSEED instructions appear never to return an all-zero value at the requested width. The author, forum user Jessé, says he found it by accident while writing assembly code that renders data into charts.
A zero that never shows up
The same programs on an Intel machine do produce zeroes at the requested size. He later confirms that a 32-bit or 64-bit request can have zero bits at the bottom, but a “true zero” fitting the requested width “never happens” on AMD. Another member asked exactly that question, and the answer became the workaround published with the test program.
The test program and the workaround
Jessé attached a small Linux chart application, gtk4-bargraph.tar.gz (7.25 KB), which counts the zeroes produced by RDRAND (red), RDSEED (blue) and a custom technique based on the time-stamp counter (green); the other bars show the remaining 65,535 values of the 16-bit space.
His note on the attachment describes the fix: generate into 32-bit or 64-bit registers, and keep 16-bit data only for the graph. The screenshot of his own run has been viewed more than 11,000 times; the archive has been downloaded about 134 times.
AMD's reply, and benchmarks
On 15 May 2026 he wrote that AMD had answered, but the reply seemed to misread his results and resembled an answer he had already got from a chatbot while checking whether the problem was known. He sent a second, more detailed message with a code snippet that raises the problem. A week later he said the case had been escalated inside the company; by then not a single zero had come out of the two AMD machines he had access to.
An update added a benchmark: a 2012 Core i5 produced 12.6 million numbers per second, a 2017 Core i7 7700 “only” 750,000, and his AMD Ryzen 7 about 2.6 million. The AMD generator looked inert to clock changes while the older Intel chip was fully clock-dependent, which leads him to conclude that RNG circuits differ a lot, probably even between revisions from one vendor.
What it means for hardware randomness
Other posters argued about trusting CPU random-number generators. One recalled Intel's early documentation for RDRAND: a single-bit noise source, a clocked sampler, a de-bias circuit and a serial shifter build an internal 128-bit seed that feeds an AES generator in counter mode, while RDSEED hands out raw bits. He says RDRAND should never be used in isolation but mixed with other entropy, and that a backdoor would be very hard to detect without reverse-engineering the silicon.
SiTech — AI-powered web development
We build fast, modern websites and bring AI into real business workflows. Have a project or a question? We'd love to help.