I want to build a mini cryptography assistant tool out of my Arduino Leonardo. There is no way any real life crypto like AES can run on this in reasonable time but it do have some easy way to build an true random number generator which is not so easy on a computer (and not so secure given the involvement of NSA in those companies who produces those RNGs for computers.)
I am here to ask your opinion about the cheapest possible way of doing this, preferably use only my existing stock and a perfboard. My existing stock semiconductor includes LM358 dual op-amps, 74HCxx logic chips, 555 timers, unbranded photodiodes, unbranded LEDs, 1N4007 rectifier diodes, 1N4148 signal diodes, 2N7000 MOSFETs, 2N3904, 2N3906 and 2N2222 bipolar transistors, and I have a stock of common values of resistors, ceramic and polyester caps.
Possible ways I can think of:
- Use an op-amp to amplify the non-common-mode noise of two reverse biased diodes from the same batch. This should have quantum randomness as it is based on electrons tunnelling across the reverse biased PN junction, and it was used in some Intel chip. BOM: 1x LM358, 2x diode, several passives.
- Use an op-amp to amplify the thermal noise across a resistor. Not quantum random, but chaos theory random. Good enough for my not-so-CIA crypto. BOM: 1x LM358, several passives.
- Use several 555s free running at different frequencies, and try to extract randomness out of them. VIA used this design. BOM: several 555s and passives.
- Heat-shrink a photodiode into a makeshift geiger counter and place something with some non-lethal radioactivity near it. This is also quantum random as it is based on the event of radioactivity. BOM: 1x photodiode, 1x heat shrink, 1x radioactive source.