TLS Like It's 1969
Send secret messages to your friends like it's 1969!
Use a normal printer
Use a MXW01 thermal printer (WIP)
UNBREAKABLE: OTP cryptography is one of the only truly unbreakable cryptographic algorithms in existence (of course, it can be broken by giving away the message or key.)
Using a pre-shared key greater than or equal to the length of your plaintext is a Cold War-era method
of sending unbreakable messages. With some modern web technology and the power of
WebCrypto for
a CSPRNG,
you can easily genrate pads to share with your friends, so you can exercise your right to speak without uninvited listeners.
To acheive information-theoretic security, a few conditions must be met:
- The key must be at least as long as the plaintext.
- The key must be truly random: WebCrypto takes care of this.
- The no part of the key may ever be reused: cross out numbers after you use them!
- The key must be exchanged securely, and kept secret: destroy your keys when you're done with them! May I suggest the toilet?
Usage:
A one-time pad will consist of a series of numbers in a given range, i.e. 01, 02, 03, 04, etc. Each pad is also named for your conveience. Print 2 copies of a pad, and give one to your friend over a secure channel, ideally in person.
You also need to agree on a set of characters to support, i.e. a-z, space, 0-9 and some symbols (this can be done publicly). You will turn this into a key by aligning it with sequential numbers:
00 | 01 | ... | 25 | 26 | 27 | ... | 37 | 38 | 39 | 40 |
a | b | ... | z | [space] | 0 | ... | 9 | . | ! | ? |
TIP: keep this key in mind when you decide the range of your OTP. For example, our ideal range would be [0,40], and not a bit smaller.
Now to encode your message take the number of associated with the first character of your plaintext, and perform modular addition with the next number in your OTP, mod the length of your character set, then take the character associated with that number:
a -> 00 (number associated with "a") + 01 (next number in the OTP) = 01 -> b (character associated with the number 01)
Repeat this with every character of your plaintext, crossing out every number on the OTP that you've used.
Congratulations! you now have a securely encrypted message! Go flush the pad, or save whats left if you care about the environment.
Pitfalls/warnings:
- OTP cryptography is only as secure as you keep the pads. Don't let anyone except for intended recipients see them, and destroy them after use!
- If you have a number out of range of your key and thus not associated with any character, discard it. As tempting as it may be to modulo here, modulo bias will break your perfect security!
- Almost every printer uses some form of printer steganography. This means that one-time pads printed on a normal printer can be tracked back to your printer!