Login required to download files
Please make sure you are logged in (see the login form on the right). If you do not have an account yet, please register first.
Here you can inspect the test logs underlying our publication in APL.
Sample Data from the QRNG Device
For a quick glance at the statistical quality of the random data you can directly download some megabytes from the QRNG device.
- 1 MB random data [or download via an encrypted HTTPS connection]
- 15 MB random data [or download via an encrypted HTTPS connection]
- 100 MB random data [or download via an encrypted HTTPS connection]
You can also use the library libQRNG in your own programs to retrieve random data from the QRNG service. The library is available for Windows and Linux.
- Linux 32 Bit (libQRNG-v0.01-Linux-32Bit.tar.gz providing libQRNG.so - linking against libssl 0.9.8)
- Linux 64 Bit (libQRNG-v0.01-Linux-64Bit.tar.gz providing libQRNG.so - linking against libssl 0.9.8)
- Linux 32 Bit (libQRNG-v0.02-Linux-32Bit.tar.gz providing libQRNG.so - linking against libssl 1.0.0)
- Linux 64 Bit (libQRNG-v0.02-Linux-64Bit.tar.gz providing libQRNG.so - linking against libssl 1.0.0)
- Windows 32 Bit (libQRNG-v0.01-Windows-32Bit.zip providing libQRNG.dll)
- Windows 64 Bit (libQRNG-v0.01-Windows-64Bit.zip providing libQRNG.dll)
- Mac OS X (libQRNG-v0.01-OSX.tar.gz providing libQRNG.dylib)
If you want to download more data directly into an application, have a look at the following examples qrngdownload and qrngdemo. All downloads include the source code and a pre-compiled version for the specified system. They also come with the libQRNG library.
qrngdownload (Utility and demo for C/C++):
- Linux 32 Bit (qrngdownload-Linux-32Bit.tar.gz, already includes libQRNG.so v0.0.1)
- Linux 64 Bit (qrngdownload-Linux-64Bit.tar.gz, already includes libQRNG.so v0.0.1)
- Windows 32 Bit (qrngdownload-Windows-32Bit.zip, already includes libQRNG.dll v0.0.1)
- Windows 64 Bit (qrngdownload-Windows-64Bit.zip, already includes libQRNG.dll v0.0.1)
- Mac OS X (qrngdownload-OSX.tar.gz, already includes libQRNG.dylib v0.0.1)
qrngdemo for C/C++:
- Linux 32 Bit (qrngdemo-Linux-32Bit.tar.gz, already includes libQRNG.so v0.0.1)
- Linux 64 Bit (qrngdemo-Linux-64Bit.tar.gz, already includes libQRNG.so v0.0.1)
- Windows 32 Bit (qrngdemo-Windows-32Bit.zip, already includes libQRNG.dll v0.0.1)
- Windows 64 Bit (qrngdemo-Windows-64Bit.zip, already includes libQRNG.dll v0.0.1)
- Mac OS X (qrngdemo-OSX.tar.gz, already includes libQRNG.dylib v0.0.1)
demo for Delphi and Free Pascal:
- Linux 32 Bit (fpcQRNGdemo-Linux-32bit.tar.gz, already includes libQRNG.so v0.0.1)
- Windows 32 Bit (fpcQRNGdemo-Windows-32bit.zip, already includes libQRNG.dll v0.0.1)
demo for C#:
demo for Matlab:
See md5sums.txt if you wish to check the software downloads above for integrity.
Extarnal Software Packages Related to libQRNG
Demo for the R language:
TRQS - package for Mathematica allowing to generate true random quantum states:
RandFile - package for Mathematica allowing the exploitation of local files as sources of random data:
Plugin for Fairmat using the QRNG service for simulations in financial modelling:
mruby-libqrng - An interface to libQRNG for mini ruby:
If you want to obtain random data from the QRNG using an encrypted connection, you have to use the SSL functions to connect to the service / get your data. The OpenSSL library is used for SSL support.
The Linux version of the libQRNG library requires the OpenSSL library. Usually it is already installed as package 'libssl' on all modern Linux distributions.
Windows users need the two files
libeay32.dll to connect to the QRNG service using SSL. To determine if you do not already have these files, you can run the qrngdemo demo program and see if it complains about a failed initialisation of the the SSL part (most likely due to the missing OpenSSL libraries).
If you are under Windows and you do not have the two OpenSSL library files, we recommend you to install the following two items:
- Windows binaries of the OpenSSL Library
- Visual C++ 2008 Redistributable Package (x86) (needed for the OpenSSL Library binaries)
What if the download does not achieve 150 Mbit/s
Although the QRNG device constantly delivers 150 MBit/s of random data, your download speed depends on the routing and minimum bandwidth along the path to our server
qrng.physik.hu-berlin.de. This server is located at the Department of Physics of Humboldt-Universität zu Berlin in Berlin Adlershof. The university is currently connected via a 1 Gbit/s link to the German National Research and Education Network, DFN.
As the QRNG server also uses a 2TB harddrive cache, your resulting download speed may be even more than 150 MBit/s (= 18.75 MByte/s). You may actually obtain up to 100 MByte/s when the cache is full. On the other hand, if many users are downloading data you may get less.
If you are not sure if you have already reached your maximum download speed, please try the following instructions to "debug" any speed problems:
Determine the maximum download speed to our server
Under Linux you may use wget to download the file - if you use /dev/null as output file, your hard drive will not limit the download:
wget http://qrng.physik.hu-berlin.de/files/speedtest-100MB.bin -O /dev/null
Increase the buffer space for libQRNG
For every qrng_get_* command the libQRNG library sends a download request to the server and retrieves the sent data, writing it into a buffer given by the user. If you want to download a lot of data, you have to chunk your download by executing the preferred qrng_get_* function several times. Due to the TCP slow start algorithm, the download speed increases steadily after the beginning. Nevertheless we noticed that the sender's TCP window does not increase after the download of the first chunk. Especially users with a high bandwidth (50-1000 MBit/s) will suffer from this problem. In such cases try to increase the maximum chunk size - in the qrngdownload program this value is defined by
MAX_WRITE_BUFFER. Change it from
100*16*65536(100 MB) or
200*16*65536(200 MB). Do not forget to recompile the qrngdownload program. As a drawback it will use up to 200MB of memory on your system.
Play with the given option. Also run bandwidth monitoring tools like NetMeter under Windows or
nloadunder Linux (preferred command line options:
nload -u M -U M -t 500 eth0) to obverse the average and peak speeds and any "gaps" in the transfer.
In Linux run qrngdownload with
/dev/nullas filename to measure the download speed without any effects of your hard drive.
./qrngdownload /dev/null 1024 <QRNG username> <QRNG password>
Finally your download speed should be almost equal to the results obtained in step 1.
Please note: The QRNG service runs on port 4499. Maybe your provider intentionally throttles traffic which does not come from webservers (port 80). For this reason the numbers between step 1 and step 2 may not be comparable.
Try multiple connections
If your download speed results improved by the suggestions above but the bandwith of your Internet connection is not saturated yet, repeat the process with multiple connections. Try to download two speedtest files simultaneously. If the overall datarate doubles, it may be worth to also run two instances of the qrngdownload program.
Nonetheless, do not hammer the server by using tens or hundreds of connections!