RDRAND (for "read random") is an x86 CPU instruction that returns cryptographically secure random numbers from an on-chip hardware random number generator (RNG) seeded by an on-die entropy source. It is formally known as Intel Secure Key Technology (codenamed "Bull Mountain") and is part of both the Intel 64 and IA-32 instruction set architectures.
Intel introduced RDRAND with its Ivy Bridge microarchitecture around 2012. AMD added support for the instruction in June 2015, starting with certain Zen-based processors.
Technical Overview
RDRAND is available in 16-bit, 32-bit, and 64-bit operand sizes. The instruction's opcode is 0x0F 0xC7, followed by a ModRM byte that specifies the destination register. Software must check the carry flag (CF) after execution: if CF=1, a valid random value was returned; otherwise, the processor could not generate a random number in time, and the software should retry.
Support for RDRAND can be detected via the CPUID instruction — bit 30 of the ECX register is set after calling CPUID standard function 01H on both Intel and AMD processors.
Hardware Implementation
The underlying hardware is called the Intel Digital Random Number Generator (DRNG). The entropy source uses thermal noise within the silicon to generate random bit streams. Pairs of 256-bit raw entropy samples are conditioned via an AES-CBC-MAC conditioner into a single 256-bit conditioned entropy sample. A deterministic random bit generator (CTR DRBG, as defined in NIST SP 800-90A) is then seeded from the conditioner output to provide cryptographic-quality random numbers via the RDRAND instruction.
The companion instruction RDSEED (available from Intel Broadwell and AMD Zen onwards) provides lower-level access to the conditioned entropy samples directly, intended for seeding software-based pseudorandom number generators.
Compliance
The DRNG is compliant with:
- NIST SP 800-90A
- FIPS 140-2
- ANSI X9.82
Performance
Performance varies significantly by microarchitecture:
- Intel Kaby Lake / Skylake: ~110 ns (463 clock cycles) regardless of operand size.
- Intel Silvermont: ~1472 clock cycles.
- Intel Ivy Bridge: up to 117 clock cycles.
- AMD Ryzen: ~1200 cycles for 16/32-bit operands; ~2500 cycles for 64-bit operands.
Security and Controversy
In September 2013, following reports of NSA efforts to weaken encryption, Linux kernel developer Theodore Ts'o publicly expressed concern over relying solely on hardware RNGs sealed inside a chip that cannot be audited. However, Linus Torvalds noted that the Linux kernel does not use RDRAND as the sole entropy source but combines it with other randomness sources.
In June 2020, the CrossTalk vulnerability (CVE-2020-0543, also called Special Register Buffer Data Sampling or SRBDS) was disclosed. Researchers from Vrije Universiteit Amsterdam discovered that DRNG output was stored in a staging buffer shared across all cores, allowing malicious code on one core to read RDRAND and RDSEED results from a victim application on another core. Intel released microcode updates to mitigate the issue, though these updates introduced performance penalties.
In October 2025, an issue with RDSEED on AMD Zen 5 processors was discovered where the 16-bit and 32-bit forms could incorrectly return a value of 0 while signaling success. The 64-bit form was unaffected.
Usage
RDRAND is used in cryptographic libraries such as OpenSSL for generating secure random numbers. Compilers including GCC (4.6+), Clang (3.2+), and Visual C++ (2015+) provide intrinsic support. It has also been evaluated for scientific Monte Carlo simulations, though software PRNGs like Mersenne Twister are generally faster for applications that do not require cryptographic security.