About this site

building it

Well, the site’s coming along. It is an evolving collection of entropic primitives, how to use them and perhaps the odd actual TRNG. These primitives produce only entropy. Entropy yes. Uniformly distributed random numbers? No. The more we experiment and find out, the more we’ll add. It might be slow progress though. Our oscilloscopes are old and the soldering irons under powered.

The Second Law of Thermodynamics states that entropy is all around us and constantly increasing (and it’s free). It just remains for it to be collected and refined by a process known as entropy extraction. True random numbers come from such extraction. And as we’ll show, collection can be done at home relatively easily using common off the shelf components. Two of the simplest and most reliable methods involve humble Zener diodes and webcams. These are our two principal entropic primitives.

We won’t however be publishing entire designs here. Think of it as a collection of hardware and software based building blocks that you can put together as you see fit. There are quite a few noise generator and TRNG circuits on line. Some have extensive operational details and performance figures, but others just feature a label saying Noise out. We intend to provide more detailed analysis than that.

You have to realise that actually there is no such thing as a hardware random number generator, unless you’re thinking of a roulette wheel. This can be easily proven with a simple experiment. Take a commercial USB sized TRNG. Hold one up and then caress it. Do random bits emerge in a stream of unpredictable ones and noughts? No?

More specifically, unless you’re operating a roulette wheel or bits are delivered to you from above carved on stone tablets, all random numbers are software generated. After all a bit is software so has to be made by software. As hardware begets hardware, so software begets software. Like Bird Flu, one’s not crossed over to the other (yet). It’s just a question of the relative proportions of software and hardware. So there will also be some code snippets on this site to distil raw entropy into useful (and cryptographically secure) random numbers.

Some basic principles we hold dear:-

Keep it sweet & simple.

There are TRNG circuits floating about the internet featuring masses of transistors, banks of DIP switches and eye straining surface mount technology. We believe that generally less is more and that security can come from simplicity.

More voltage is more better.

It’s easier to make reliable entropy with a higher voltage. Not only does it reduce a circuit’s susceptibility to non random EMI as the analogue signal to noise ratio (SNR) is higher, the signal to quantization noise ratio (SQNR) is also increased making the entropy capture more efficient. Yes, switching power supplies are a little noisey with noise components in the order of 75 mVp-p at 20 MHz produced by a decent DC-DC converter. However by using higher voltage Zener diodes, the signal will swamp any inherent noise. But does this really matter in a circuit designed to generate entropy? And every additional bit of sample depth adds ~6dB to the entropy signal. It reduces component count too by lessening the need for high amplification prior to sampling.

Raw naked entropy.

We don’t believe in conditioning, tuning or otherwise compensating the entropy signal prior to sampling. Our mantra is make it and read it. Hardware processing adds components and such techniques aren’t really required. All can be achieved with software and at the entropy measurement stage. Some of the fastest TRNGs simply discard the most significant bits of analogue to digital conversion readings, and use the lower ones without any further processing. This basic technique can also eliminate auto correlation in the output, extracting high quality randomness that passes all standard tests.

The golden rule.

For any TRNG to be worthy of the name, it must satisfy the most important aspect of TRNG design, namely that:-

raw entropy generated > length output

Anything else is simply a pseudo random number generator. This of course requires the accurate measurement of the rate of generation of raw entropy, and can be one of the most challenging aspects of TRNG design and validation. We’ll provide some advice for how we do it, especially when dealing with raw data that is not independent and identically distributed (nonIID).

Buy rather than build.

Companies like TRACOPOWER and Murata can make better voltage than most of us. A commercial DC-DC converter reduces component count even further, whilst also guaranteeing reliability and stability. Unintentional ground loops in a power circuit can be a real PITA. It may cost more initially, but the rewards are worth it. And who’s counting anyway 💰 ?

So are we mad? Well, we do wear tin foil hats to jam remote viewing of our activities and know that Elvis is still alive in Bolivia. But some of the current threats to encryption should provide evidence that things are not as they seem, and that perhaps a little of what we say is true. Hopefully this site will prove useful in building a TRNG in the knowledge that it must be truly random as you’ll have built and tested it yourself.