Skip to content

2120865/TRNG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Contributors Stargazers Issues MIT License


Logo

True Random Number Generator

An awesome TRNG based on a modified galton board.
Includes a REST API and a simple frontend.
Explore the docs Β»


Table of Contents
  1. About The Project
  2. Getting Started
  3. Screenshots
  4. Building the galton board
  5. License

πŸ” About The Project

Bild 1 Bild 2

Bild 1


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.

(back to top)


βš™οΈ REST API endpoints

  • '/': 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 Β»

πŸ‘·β€β™‚οΈ Built With

  • Python3
  • Flask
  • SQLite
  • HTML5
  • CSS3
  • JavaScript

(back to top)


πŸƒ Getting Started

To get a local copy of the project up and running follow these simple steps.


πŸ“Œ Prerequisites

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

⚑ Installation

  1. Clone the repo
    git clone https://github.com/2120865/TRNG.git
  2. Switch into the directory
    cd TRNG
  3. Install PIP packages
    pip install -r requirements.txt

βœ… Startup of the REST API

  • python3 rest_api.py

(back to top)


πŸ“Έ Screenshots

Starting the system


Generating random numbers


Exporting the generated random numbers

Switching to dark theme



🌲 Project tree

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

πŸ‘·β€β™‚οΈ Building the galton board


πŸ“œ License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors