Build an Electronic Random Character Generator for One Time Pad Cryptography in Bamboo Case
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
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.
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.
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!
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
ItalianJack 9 years ago
EtCetera112 10 years ago
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.
sbmull 10 years ago
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.
Pixelmonster 10 years ago
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.
minifig904 10 years ago
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.
sbmull 10 years ago
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.
Snidely70448 10 years ago
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.
sbmull 10 years ago
gentry 10 years ago
Nice pictures. Where can I get the source code?
duncan_a 10 years ago
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.
uwezi 10 years ago
...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.
duncan_a 10 years ago
mpthompson 10 years ago
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.
thegrendel 10 years ago
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.
riff raff 10 years ago
This is not an Instructable, it's an advertisement. :(
simplebeep 10 years ago
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.
epoveda 10 years ago
bgisborn 10 years ago
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
sbmull 10 years ago
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.
vricsi94 10 years ago
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).