# Hardware entropy: RDRAND

DevFeed: [Hardware entropy: RDRAND](<https://devfeed.tech/articles/hardware-entropy-rdrand-38923.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2013-03-25-hardware-entropy-rdrand>)

Author: Marek

Published: 2013-03-24T23:00:00Z

Content type: article

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [Randomizer](<https://devfeed.tech/topics/randomizer.md>), [federal information processing standards](<https://devfeed.tech/topics/federal-information-processing-standards.md>)

Tags: [aes](<https://devfeed.tech/tags/aes.md>), [cryptographic](<https://devfeed.tech/tags/cryptographic.md>), [cryptographic-standards](<https://devfeed.tech/tags/cryptographic-standards.md>), [entropy](<https://devfeed.tech/tags/entropy.md>), [fips](<https://devfeed.tech/tags/fips.md>), [hardware](<https://devfeed.tech/tags/hardware.md>), [instructions](<https://devfeed.tech/tags/instructions.md>), [nist](<https://devfeed.tech/tags/nist.md>), [random](<https://devfeed.tech/tags/random.md>), [security](<https://devfeed.tech/tags/security.md>), [source](<https://devfeed.tech/tags/source.md>)

## AI overview

RDRAND is described as using an on-processor entropy source and an AES CBC-MAC conditioner to produce random bits; the author notes that relying on its quality requires trusting Intel's entropy source. The instruction can temporarily return no data under heavy parallel demand, indicated by a cleared carry flag. The included Linux-kernel-derived snippet retries up to 10 times and reports success through its return value. The post presents RDRAND as a way to obtain hardware-generated entropy without a context switch.

## Source excerpt

Hardware entropy: RDRAND This is the third blog post on machine instructions: This time I've noticed instruction. According to Wikipedia is: ... a random number generator that is compliant with security and cryptographic standards such as NIST SP800-90, FIPS 140-2, and ANSI X9.82. The generator uses an on-processor entropy source, which passes the randomly generated bits to an AES (in CBC-MAC mode) conditioner to distill the entropy into non-deterministic random numbers. Sounds good.