Development

Public API

The Random UChile’s Randomness Beacon uses the same API that NIST’s Randomness Beacon, whose endpoints are detailed next:

The <timestamp> used in the API are in POSIX format with milliseconds in GMT time zone (more information about how to convert date in this format: https://www.epochconverter.com)

Verification

In this section you can find the verification scripts of Random UChile’s Randomness Beacon.

The code (written in Python language) and the use instructions are found in the Github Repository of the verifier. Is also possible to download the source code in this link (use instructions in README file).

The verification scripts are:

  1. Chain Consistency (chain-consistency-version2.py): this script checks the correctness of all the pulses generated by the beacon. Specifically, checks the following properties::
    • Correct reference to previous pulses.
    • Use of local random value committed in the valid pulse created immediately before.
    • Correct use of slow hash function (sloth proposed by Arjen Lenstra and Benjamin Wesolowski described in this paper and implementation based in this github repository) to create output value.
    • Valid signature.
  2. Real-time External Events Verifier: available soon.

Public Certificate

The necessary certificate needed to verify the signature in each pulse is available through the API:

Digital Signature Verification

Each pulse is digitally signed by Random UChile, using the algorith RSA-PSS. The signature is made over the concatenation of the following values:

strlen(x) returns the number of characetrs in x.
length(x) returns the number of bytes x after x has been hex-decoded.
Both strlen(x) and length(x) are coded as 4-bytes (big-endian) integer values.
The rest of the values are coded as 4-bytes integer values, except both chainIndex and pulseIndex that are coded as 8-byte integer values.