Last Updated: February 25, 2016
·
1.563K
· chrisbumgardner

Generate quantum random numbers in node.js

Let's say you want a random 32-digit hex number. And you would prefer it be generated in an Australian quantum physics lab by splitting light beams and measuring the power fluctuations in the quantum vacuum. I wrote a node.js module that reads them from that lab's site and returns a string of hex octets as follows:

npm install -g qrand

Then try it out by running:

qrand -l 16

Which should output something 32 random hex characters (16 octets):

028251ba71420a4b8b0a343333b7445a

Also to see a live visual feed I created based on this module, check out: http://qrand-6081.onmodulus.net/

1 Response
Add your response

Friendly note: As far as I can tell, it loses quite a bit of its potentional entropy since the random number provided to you is publicly available and the interval is relatively large. i.e. a potentional hacker who knew you were using this could sample the same stream you are and make educated guesses on which sample you used during which time frame.

over 1 year ago ·