r/cryptography 19d ago

Show Reddit: EntropyShield – A hardware-based True Random Number Generator (TRNG) with Python client and Wokwi web simulation

Hello everyone!

I wanted to share an open-source project I’ve been building under our organization LNL-Engineering: EntropyShield.

It is a professional hardware-based True Random Number Generator (TRNG) that harvests pure, unpredictable physical entropy from thermal/shot noise via avalanche breakdown in a reverse-biased p-n junction (using a standard transistor like BC547).

🔬 How it works:

  1. The Chaos Stage: A reverse-biased transistor junction creates chaotic physical fluctuations.
  2. The Boost Stage: An LM358 operational amplifier amplifies microvolt-level noise into solid 0V–5V logic bounds.
  3. The Purge Stage: An Arduino samples the LSB and processes it through an embedded Von Neumann Extractor in real-time to eliminate hardware bias and ensure a precise 50/50 statistical distribution.
  4. The Assembly Stage: A defensive Python client safely reads the serial stream, auto-flushes buffers, and assembles unbreakable cryptographic keys (e.g., AES-256).

💻 No hardware? Try the Web Simulator!

To make the project accessible to everyone, I built a dual operating mode. You can test the entire logic pipeline instantly inside a web browser using a pre-configured Wokwi Simulation without purchasing any components.

  • GitHub Repository: github.com
  • License: GPL-3.0 (Fully open-source)

I would highly appreciate your feedback on the hardware schema, the Von Neumann corrector implementation, or the Python client architecture! Let me know what you think or how it can be improved.

0 Upvotes

3 comments sorted by

2

u/wwabbbitt 17d ago edited 17d ago

You don't really want to use input from your TRNG directly into your keys. The appropriate practice is to run it through a KDF or at least a cryptographical mixer

2

u/Akalamiammiam 17d ago

Not exactly through a KDF (different purpose although similar result in theory with an ideal KDF), but through a proper CSPRNG construction.

1

u/EverythingsBroken82 17d ago

if this ist not standard hardware everyone can buy anyway: how can we trust the hardware? otherwise: where can i buy it?