An awesome TRNG based on a modified galton board.
Includes a REST API and a simple frontend.
Explore the docs Β»
Table of Contents
![]() |
![]() |
|---|
The Galton Board is a Physical True Random Number Generator.
The goal is to generate random numbers that can be used for cryptographic processes.
It is based on a physical noise source and generates random numbers that fulfill the required PTG.2 standard of the
Federal Office for Information Security (BSI).
We offer a REST API interface or a web application with a user interface for operation.
'/': Redirects to the TRNG page.'/trng': Renders the TRNG page.'/trng/randomNum/init': Initializes the TRNG system.'/trng/randomNum/shutdown': Shuts down the TRNG system.'/trng/randomNum/getRandom': Retrieves random bits from the database and converts them to HEX encoding.'/trng/getCount': Retrieves the count of stored random bits from the database.
REST API Documentation Β»
To get a local copy of the project up and running follow these simple steps.
The project must run on a raspberry pi because it uses hardware components (gpio pins).
For installing the dependencies you should use the latest version of pip.
- pip
pip install --upgrade pip
- Clone the repo
git clone https://github.com/2120865/TRNG.git
- Switch into the directory
cd TRNG - Install PIP packages
pip install -r requirements.txt
-
python3 rest_api.py
TRNG
βββ LICENSE
βββ README.md
βββ docs
βΒ Β βββ API
βΒ Β βΒ Β βββ ...
βΒ Β βββ models
β βββ README.md
βΒ Β βββ 3D
βΒ Β βΒ Β βββ GaltonBoard
βΒ Β βΒ Β βΒ Β βββ ...
βΒ Β βΒ Β βΒ Β βββ ...
βΒ Β βΒ Β βββ MarblePump
βΒ Β βΒ Β βββ ...
βΒ Β βΒ Β βββ ...
βΒ Β βββ lasercutter
βΒ Β βββ ...
βΒ Β βββ ...
βββ hardware
βΒ Β βββ gyroscope.py
βΒ Β βββ laser_sensor.py
βΒ Β βββ stepper_engine.py
βββ instance
βΒ Β βββ TRNG.db
βββ models
βΒ Β βββ models.py
βββ requirements.txt
βββ rest_api.py
βββ static
βΒ Β βββ css
βΒ Β βΒ Β βββ main.css
βΒ Β βββ img
βΒ Β βΒ Β βββ ...
βΒ Β βΒ Β βββ ...
βΒ Β βββ js
βΒ Β βββ background.js
βΒ Β βββ main.js
βββ templates
βΒ Β βββ index.html
βββ tests
βββ test_suite.py
16 directories, 43 files
Distributed under the MIT License. See LICENSE for more information.









