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





Introduction: 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!

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.



    • Microcontroller Contest

      Microcontroller Contest
    • Science of Cooking

      Science of Cooking
    • Pocket-Sized Contest

      Pocket-Sized Contest

    We have a be nice policy.
    Please be positive and constructive.




    Very cool project! I may get me one. You aught to sell it on 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.

    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.

    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.

    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.