On traditional computing systems, random numbers are often generated with pseudo random number generators (PRNGs). Quantum random numbers generators use properties of quantum physics to generate a random source of high entropy. Our laboratory offers access to a QRNG source via a simple HTTP-API. The QRNG service is backed by a ID Quantique QRNG PCIe.
Random numbers can be retrieved interactively on this site or by sending a request to the API.
The QRNG backend listens on standard port for http or https and is reachable at lfdr.de/qrng_api
This endpoint provides an abstraction for the access to the hardware driver of the Quantis PCI chip. After requesting quantum random numbers, the server reads the specified amount of quantum random numbers (QRN) generated from the QRNG and return it to the request originator.
GET
/qrng?length&format
Required:
length=[integer]
Specifies the amount of QRN-bytes the server should return. Accepted minimal value is 1 and accepted maximal value is 2147483647. Optional:
format=["HEX"|"BINARY"|"HEXDUMP"]
Specifies the formatting of the string representation of the returned QRN. With "HEX" format each random byte is represented by a 2-digit hexadecimal number. The resulting string is a concatenation of each hex pairs. The "HEXDUMP" format organizes the QRNs in 3 column wide rows. The first column contains a address number, the second column contains 16 2-digit hexadecimal encoded random numbers and the third row is a ASCII translation of the second row.
If no value is set, the server will default to "HEX"-format. Returns a JSON formatted string representation of the quantum generated random number and length (amount) of returned qrns.
{ qrn :[string], length: [integer] }
{ error : "Failed to convert length param to string" }
OR
{ error : "length param out of bounds" }
OR
{ error : "Failed to open device" }
OR
{ error : "Failed to read device" }
< GET https://lfdr.de/qrng_api/qrng?length=100&format=HEX
>