Skip to content
Python scripts that verify the correctness of the values delivered by both CLCERT/NIST Randomness Beacon services
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

CLCERT/NIST Randomness Beacon Verifier Scripts

Python scripts that verifies the correctness of the values delivered by both CLCERT and NIST Randomness Beacon services.

Install requirements

$ pip install -r requirements.txt


1. Chain Consistency


Each new pulse that is created by the service must be linked to previous pulses that were created before. In order to achieve that, each pulse must reference to pulses and values committed in the past. Specifically, there are some properties that each pulse in the chain must fulfill in order to preserve the consistency and correctness of the chain:

  • 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.

The script checks all this properties for each pulse and reports if there are any pulses that doesn't fulfill some of this properties.

How to Use

$ python scripts/ [options] [values]

--organization {NIST, CLCERT} Select which randomness beacon service to analyze.

Propierties to analyze:
 -a          Run all tests (check all properties).
 -c          Checks only local random value pre-committed.
 -s          Checks only valid signature.
 -o          Checks only correct generation of output value using hash function.
 -p          Checks only reference of previous pulses already created in the chain.

Pulses to verify:
 --init   [value]  Set initial pulse as the one with id [value] to analyze.
 --final  [value]  Set final pulse as the one with id [value] to analyze.
 --random [value]  Checks only [value] pulses selected at random.
 --only   [value]  Checks only the pulse with id [value].

 -v          Verbose mode

Example: In order to analyze all properties in all the pulses generated by NIST Randomness service in verbose mode:

$ python scripts/ --organization NIST -av

2. Real-Time External Events Verifier


In development, will be available soon.



Implementation of the sloth algorithm, an slow hash function used in the project.

Script that checks the correct status of all the endpoints of the public API.

Script that collects the last 15625 random values (1 MB) delivered by the beacon.


Specification of the digital signature on each pulse.



If this error raises, please run the scripts prepending: PYTHONPATH=.

You can’t perform that action at this time.