Need actual random numbers? Meet the NIST randomness beacon.

I wrote a python module that wraps that NIST Randomness Beacon, making it simple to get truly random numbers in python.

It’s easy to use:

b = Beacon()
print b.last_record()
print b.previous_record()
#and so on

There’s also a handy generator for getting a set of n random numbers.

(One of the best gifts I ever got was a copy of 1,000,000 Random Numbers, and I’ve been intrigued ever since.)

Please note that this the randomness beacon is not intended to be a source of cryptographic keys — indeed, it’s a public set of numbers, so I wouldn’t recommend doing anything that could be compromised by someone else having the access to the exact same set of numbers. Rather, this is interesting precisely for the scientific opportunities that are possible when you have a random but public set of inputs.

5 Comments on “Need actual random numbers? Meet the NIST randomness beacon.”

  1. abalogh says:

    this is really cool, thanks!

  2. bortzmeyer says:

    Too bad the beacon closed two days after…

  3. Ben Bradley says:

    The Beacon is down? I’m gonna call my Representative! If only it were a Military service:

    I’ve thought about a “fixed” source for random numbers (like a PRNG function, only it returns “real” random numbers), and heard that the decimal expansion of Pi passes all known tests of randomness. Furthermore, there’s a program I haven’t run yet called SuperPi that supposedly calculates up to 2^32 (4 billion and change) digits of Pi. It seems that would be useful.

    But I love those Amazon reviews of that book “A Million Random Digits.” I’ve not seen such well-crafted reviews since “A New Kind of Science” and the Denon AKDL1 cable.

  4. Camilo says:

    apparently nist is back again :-)