Monday, May 20, 2013

Week 2: Gathering Entropy from Online Sources


This week, my assignment was to collect and record output from true random number generators that are available online. These online resources typically utilize quantum interactions to generate entropy and provide random bits for personal use free of charge. Unfortunately, one of the websites I tried to extract bits from, LavaRnd, has been decommissioned indefinitely. I am currently working on obtaining random bits from randomserver.dyndns.org, which utilizes a hardware RNG. While the site has a page with a GUI for downloading a given number of random bytes, it does not contain any additional resources to directly stream from the server, so I will need to think of a way to write a script that automates the downloading process so a sufficient number of random bytes can be obtained. During this week, I was able to successfully write scripts for two of the web sites, and I uploaded the code to the randomness/onlineResources github repository.

Australian National University Quantum Random Numbers Server
A lab at ANU measures real-time quantum fluctuations of phase and amplitude within a vacuum to yield an ultra-high bandwidth random number stream. The hardware generates this stream at 5.7 Gbit/sec with no daily limit on downloading, so my script could theoretically be looped without interruption given that the bottleneck on stream rate is the internet bandwidth. The site provided a link to the anurandom github project which offers tools and sample code for downloading the random bits from the server in several different languages. I utilized Python because of the presence of a web page on the site that displays 1024 live random bits, making the extraction and storage code trivial. Therefore, my script pulls 124 random bytes and stores them as binary data in a newly created anu_random.bin file within the same directory.

Humboldt University of Berlin QRNG Service
At the Department of Physics of the Humboldt University, the Nano-Optics lab uses state-of-the-art photon timing instrumentation and data processing to generate random numbers based on photon arrival times. The device constantly delivers 150 Mbit/sec of data, so once again the script could run without interruption only limited by internet bandwidth. The site offers the libQRNG C library to interface with the server as well as demo code. I removed SSL security from the demo program because the library utilized outdated Linux SSL libraries rather than OpenSSL, rendering that portion of the code obsolete. I also modified the code so that it does not block waiting for user input, allowing the program to be looped indefinitely. I had to register as a user of the service and my user name and password is required to start a connection with the server. As it is now, this C program downloads 25 MB of random binary data from the server and stores it in qrng_output.bin within the same directory. 

No comments:

Post a Comment