qrandom
is based on the official QRNG@ANU JSON API. The data type
uint8
returns uniformly distributed integers from the interval \([0; 255]\).
uint16
returns uniformly distributed integers from the interval \([0; 65,535]\).
hex16
returns uniformly distributed hexadecimal characters from the interval \([00; ff]\) for blocksize = 1
.
Each request can return a minimum of 1 and a maximum of 100,000 true random numbers. The parameter blocksize
is only relevant for data type hex16
and sets the length of each block. blocksize
must be between 1 and 1,024. A request with data type "hex16"
returns hexadecimal characters with class class
character
and type character
. For numeric calculation with these characters randomHexCharacters
, they have to be coerced e.g. with base::as.hexmode(randomHexCharacters)
for smaller hexadecimal numbers, or e.g. with Rmpfr::mpfr(randomHexCharacters, base = 16)
for arbitrary precision floating point numbers.
The true random numbers are generated in real-time by measuring the quantum fluctuations of the vacuum. The official QRNG@ANU JSON API supports only a maximum of 1,024 random numbers per request, thus requests for more numbers have to split up into smaller requests of 1,024 numbers. In fact, each request may take a couple of seconds to be served. The greatest possible request qrandom(n = 100000, type = "hex16", blocksize = 1024)
takes about 13 minutes (via DSL 16,000 internet connection) and its size is about 201.4 MB.
At the moment, there is no limitation for the number of requests per user but if you need a huge amount of (non-live) true random numbers, there is a 10 MB, a 100 MB, a 1,000 MB and a few 5,000 MB torrents of random binary files provided for download by the ANU Quantum Random Number Generator Server here.
We try our best to provide unique true random numbers. All API requests provided by this package are using SSL. As long as nobody is able to break the encryption protocol, the random numbers you obtain should be unique and secure.
Further information can be obtained from the ANU Quantum Random Number Generator FAQ and the list of references to scientific papers.