I remember stumbling upon the fact Raspberry Pi devices have built-in hardware random number generator.

Would someone happen to know where I can find official hardware random number generator spec?


2 Answers 2


You won't find the specification published because it is proprietary. Among the things that are not published wrt the RPi HWRNG is what (if any) tests it has passed (e.g. the NIST test suite for RNGs). This is not to say that it hasn't been tested (useful example here), only that there seems to be no documentation of what (if any) tests the RPi developers have subjected it.

A more useful answer wouldn't seem to be possible as you've not explained what you're trying to do. Not that I'm asking you to share that - only saying we might be able to give a better answer if we knew.

For example, if you wanted to replicate the random stream coming from the RPi HWRNG, we could tell you that the nature of (many) HWRNGs is that you won't get the same sequence from two identical items of hardware.

Or, if you wanted to get a block of random numbers from your RPi's HWRNG, you could use this command:

sudo cat /dev/hwrng | tr -dc 'a-zA-Z0-9'

Or, if you had asked "How to know if /dev/hwrng is working?", we could have directed you to this RPi SE Q&A.

But you didn't ask anything specific except "where can I find the spec?" I suppose the real answer to that question is that it is locked away wherever Broadcom keeps their proprietary documents.

  • Thanks for helping out! I was hoping to learn about how entropy is generated by HRNG. For example, the T2 chip on Mac uses multiple ring oscillators post processed with CTR_DRBG.
    – sunknudsen
    Commented Aug 25, 2021 at 10:54
  • 1
    @sunknudsen: AFAIK, this isn't documented for RPi. For general info re entropy via hardware, Google is your friend; also the Wikipedia page has some good info & links to other resources.
    – Seamus
    Commented Aug 25, 2021 at 16:39

I'd start by looking at the Broadcom Peripherals specification and if it's not there I would assume it's an ARM device.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.