Encrypt Messages With Your Pi
YOU’LL NEED THIS
PYTHON
Any sort of computer with Python installed—we used a Raspberry Pi. Plus some secrets to pass on.
SENDING secret messages has been with us for a long time. Various methods have been devised, most with a weakness. Take the very ancient idea of tattooing your message on the head of a slave or serf, as seen in antiquity. First there’s the problem that slavery is morally repugnant, then you’ve got to shave the head, do the tattooing, and wait for the hair to grow before sending them to your co-conspirator. Then they need to be reshaved before the message can be read.
Far better to use something like, paper. There are invisible inks, of course, or there are ciphers, which change the letters used to make up the message so that only someone who knows the precise transformation can reverse it.
In 1500 BC, the Mesopotamians encrypted recipes for pottery glaze, and ciphers proliferate through ancient Egypt, Greece, and Rome. The first people to systematically document their methods, however, were the Arabs, with Al-Farahidi (710-786 or 791AD) writing the Book of Cryptographic Messages, considered the first book on cryptography written by a linguist.
We’re bringing things a bit more up to date, with a look at how you can use—and break—the notorious Enigma cipher machine on just about any computer you’ve got handy.