Build an Electronic Random Character Generator for One Time Pad Cryptography in Bamboo Case

28K16327

Intro: Build an Electronic Random Character Generator for One Time Pad Cryptography in Bamboo Case

Foil the NSA!  With this device you can make One Time Pads and create cryptograms that are unbreakable if used correctly. The concept is simple. Create a string of random characters (that is where this device comes in).  Share this string of random characters with a friend. Use the random string to encode a message. Your friend can decode the message using the random characters you shared earlier. If the random string is kept secret, it is theoretically impossible for anyone but you and your friend to read the message. 

Don't wait!  Get your One Time Pad generator here!

https://www.etsy.com/listing/181967530

STEP 1: Add the LEDs to the Board

To start, let's add the LEDs to the board. Start with the four corner LEDs. Once those are soldered add the rest, row by row. Each LED has a flat side which should be aligned with the white outline on the board. I have made it very easy for you since all the LEDs are oriented the same way :). Use a wire cutter or low profile trimmers to clip the leads flush with the board. The green ones shown in the pictures are from the craft section at Wal-Mart and work great. Be sure to save the cut-off LED leads as you will need a few later.

You should now have 15 LEDs soldered and oriented correctly. It is important that they face out straight to match the holes in the case.

STEP 2: Add the Coin Battery Clip

Adding the battery clip is easy. Place it on the board with the curved edge facing the outside. It should match the outlines on the board. You may find it helpful to temporarily tape the battery clip to the board while you turn it over to solder the bottom side. A quick dab of solder on one terminal while you hold the clip in place works too.

STEP 3: Adding the Microcontroller

The microcontroller is the last component to solder. Be sure the end of the microcontroller with the dot is aligned with the white notch of the outline on the board. Double and triple check it is oriented correctly before you solder.

STEP 4: Add Battery

Insert the supplied CR1225 battery (positive side up) into the battery clip. Your One Time Pad Generator is now ready!

STEP 5: Touch the Sensor to Generate a Character

Just touch the sensor at the top of the board with a finger to start random character generation.

The kits will sleep in low power mode until another touch is sensed.

STEP 6: Extend the Touch Sensor

This simple touch sensor extension will allow you to reach the touch sensor between the bamboo plates easily. Use a couple of the leads which you cut off of the LEDs in the first step. Most any thin wire will do but the cut off LED leads work great. Insert the led about 3mm into the front hole on touch sensor. Holding it in the hole, wrap it around the back of the board. The wrapped around wire should just touch the end you put through the hole. Trim the excess length and solder these two ends together. Do the same with the other touch pad.  You may put a little solder on the front touch pads for extra security as shown in the last picture.

Congratulations!  You are almost done!

STEP 7: Assemble Bamboo Case

The bamboo case is attractive and easy to assemble.  Just follow the pictures and add the pieces in order.  Hand tightening the small nuts is sufficient.

27 Comments

Very cool project! I may get me one. You aught to sell it on Tindie.com. It's like etsy, but for electronics stuff.

How random is this?

I would be interested to know how you were able to construct a random number generator in such a small space.

Ahh yes. That is indeed the magic. ;). I'll let you in on the secret... I found a way to create random bits from the Thermal-Noise of the controller.

https://en.wikipedia.org/wiki/Thermal_noise

I actually did this first with an atmega328, trying to make a USB crypto device. I pulled LOTS of random bits over the USB and subjected them to Diehard testing. They passed.

https://en.wikipedia.org/wiki/Diehard_tests

So I am pretty confident they are random and unpredictable.

Please provide the way you create these random numbers. Because what you explained above is not more than an product assembly instruction. Not an instructable.

Good start. But, Diehard isn't good enough. Let's see the test results with dieharder.

http://www.phy.duke.edu/~rgb/General/dieharder.php

I'll bet that the thermal noise RNG is putting out biased bits, ie slightly more likely to produce 1 rather than 0 (or vice-versa). But, of course, you probably already knew that, and can tell me in general terms how you're working around it, right?

If you're going to claim it's even remotely useful against the NSA, you're going to have to back your claims.

Thanks for your comments! Dieharder is what I used :). And you are right about bit bias. I take care of that by XORing multiple bits.

30 years ago I wrote a program for the Apple IIe in BASIC to print unique one time pads - 2, one of each for encryption and one for decryption - that encrypted two letters at a time. As I remember, I used a built-in random number generator and the time the program was run to create unique pads.

I guess I am telling my age... My first programs were on an Apple II clone in Applesoft Basic and 6502 machine code. Thanks for sharing!

Nice pictures. Where can I get the source code?

Well, I've defended many people who have posted projects that serve to gain sales for something, because they've provided sufficient information to build it, but I can't with this one I'm afraid...

There's not even a parts list, much less a schematic or copy of the program code.

This one rates as an assembly guide for a commercial product - it is even stated as such on the linked Etsy page. The only way to build this from the Instructable is to purchase the kit...

This is not in the spirit of Instructables and should be removed.

...and I wondered if I was the only one missing the schematics and the source code...

It's not an instructable, it's an assembly instruction.

As the linked Etsy page says "Complete step-by-step assembly instructions can be found here: https://www.instructables.com/id/Build-an-Electronic-Random-Character-Generator-for-1/"

I have to agree and this project should be removed from Instructables. There really needs to be a parts list, schematic (and ideally a board layout) as well as full firmware for this project. Otherwise, this is simply an advertisement. It's fine if the kit is available, but only a link to the kit and no implementation details does not make this an "Instructable".

What's more sad is this project went out on the daily Instructables email newsletter so perhaps the editorial policy of this site is changing. I hope not as it will ultimately ruin the value of Instructables if this site simply becomes another conduit for commercial sales. There are plenty of other places on the Internet for that.

Note that for one-time-pad encryption to be secure, the random key must be at least as long as the plaintext message. It would also be nice if you included the microcontroller source code.

This is not an Instructable, it's an advertisement. :(

This Instructable would be much more “in the spirit” if you shared the logic and methods of the device right up-front, or gave some tips as to how to build one of these without purchasing a kit.

All numbers and letters an be represented in binary form. Working bit by bit you only have to randomly generate 1 or 0. Secondly this device as you explain it does not contain a natural random process-radioactive decay for example. It appears to produce pseudo random numbers

Thanks for your comment! The device does indeed use a physical sources of randomness in the form of johnson-nyquist noise. You can read about it here:

https://en.wikipedia.org/wiki/Thermal_noise

I actually did this first with an atmega328, trying to make a USB crypto device. I pulled LOTS of random bits over the USB and subjected them to Diehard testing. Every batch passed.

https://en.wikipedia.org/wiki/Diehard_tests

So I am pretty confident the characters are random and unpredictable.

Interesting instructable, thanks for sharing. The only thing I miss is the method of random character generation, and maybe a source code (if it's open source).

More Comments