It's time to talk about some of those limitations I mentioned before.
- If the key is predictable, even a little bit, you're sunk. That means you can't use real words, anything that you got out of your favorite programming language's rand() function, any algorithm that the NSA has put a back door into, the digits of pi, random numbers out of A Million Random Digits, or anything that has ever been written down publicly. Some Russian spies found that one out the hard way.
- Oh, and "random" numbers you made up in your head or generate by banging on a keyboard aren't random,
either. German and Russian spies found out that one the hard way.
- If you use the key even twice, ever, you're sunk. British, German, Russian, and American spies have all found that one out the hard way. Make sure all copies of the key are destroyed immediately after they have served their purpose, preferably by burning.
- If someone can make a copy of part or all of your pad, you're sunk. What's
worse, if it was your pad that was compromised, you won't have a way of
letting your buddy know that he should stop sending messages with his
copy. You therefore have to have perfect physical control over your copy of the pad at all times. This
is *much* easier said than done. A certain three letter agency has
been known to drill out the lock on your door, photograph everything,
and replace the lock with an identical one in under an hour.
- This algorithm doesn't tolerate error at all. If line noise or an attacker between you and your recipient changes an "E" to an "R", there will be no way for you to know why one letter of your message wouldn't decrypt right.
- Worse, this algorithm doesn't synchronize. So if line noise or an attacker changes an "E" to an "EE", then the entire rest of the message will be totally garbled and totally unrecoverable.
- The whole point of computers is to make copies of things. Just in the process of generating and printing your one time pads, you will have copies of the pads in memory, on the hard drive, in the system logs, and possibly in the cache of the printer. If your computer is on a network, any one of those copies could silently leak out.
- Even if your computer isn't on a network, it can still wirelessly transmit data. That delivery truck that's been sitting outside for the past hour can use an antenna to listen to the electromagnetic noise that your keyboard or monitor is creating, and use it to figure out what you are typing. You should therefore only operate your printer inside of a faraday cage or in a secure location with plenty of space between you and the public.
- Even if the attacker has to physically break in and steal the hard
drive out of your machine, and you've already deleted everything, you
might still be hosed. When you delete something, it's not really gone. Your computer just forgets where it is, and that space will be reclaimed next time you have a file that needs to go there. Be sure to securely delete any files you make by overwriting the data with all zeros.
- Even if the attacker can't recover any old data, he can still alter
the program that generates the pads to make it output the digits of pi
after a certain offset. You would have no way of knowing that your pads
weren't random. You therefore have to have complete physical control over the computer as well.