The HotBits Pseudorandom Generator


One of the most common applications of genuine random data is to “seed” a pseudorandom number generator which can then produce a large volume of data which passes all of the statistical tests for randomness. HotBits provides such data without the need for users to set up and validate their own generator. When you check the “Pseudorandom data?” box in the request page, HotBits will return data from its own high quality internal pseudorandom number generator which is seeded from radioactively-generated data from the HotBits hardware generator. Requests for pseudorandom data do not require an API Key and are not subject to quota limitations. You can also request pseudorandom data by specifying “Pseudorandom” as an API Key. Pseudorandom data in the hexadecimal, C, password, XML, and JSON formats are identified as such in the result page returned.

Pseudorandom Data Generation Algorithm

The pseudorandom data returned by HotBits are generated with the Mersenne twister algorithm, using the MT19937-64 (64-bit) version. The generator is seeded with 2496 bytes of radioactively-generated random data from the HotBits generators. Because the Mersenne twister algorithm is not cryptographically secure, in that by observing a sufficiently large number of results it is possible to predict subsequent output, the pseudorandom data supplied by HotBits are produced by taking pairs of 64-bit results from Mersenne twister, comprising a 16 byte block, encrypting the block using the Advanced Encryption Standard (AES) with a 256 bit secret key also obtained from radioactively-generated HotBits data, then returning encrypted 16 byte blocks to fill the request. (Multiple blocks are generated if the request is more than 16 bytes, and if the request is not a multiple of 16 bytes, excess bytes from the last block are discarded.) A new AES encryption key is generated every 30 minutes, so even were a key to be disclosed, it would only enable decryption of data returned during the half hour window in which it was in use. Fourmilab makes no claim about the suitability of these pseudorandom data for cryptographic or any other use; that is up to you to determine based upon your own testing of the data and auditing of the algorithms and code used to generate it. Complete source code of the HotBits server, including the pseudorandom generator, is available for downloading. The pseudorandom generator is in the file hbtalk_pseudo_m.c within the source distribution. Statistical testing of the pseudorandom generator, including the downloadable data sets used in the tests, is available.

HotBits Main Page

Statistical Tests of the HotBits Pseudorandom Generator


Valid XHTML 1.0
by John Walker