A few years ago I wasted a lot of time writing a Javascript implementation of matrix encryption. Now one of my maths assignments has a section about decrypting an encoded string… Russian spies… dead letter drops… yada yada. I’ll be using my trusty Javascript implementation to blow the question over in a minute as opposed to 30. I’m posting it here in case whoever marks my assignment wants to see it.
Unfortunately, WordPress.com doesn’t allow .zip uploads, so I’ve been a bit sneaky. One quick and dirty hack exploits the fact that zip files are read from the end first, and JPEG files from the beginning. So if you were to append a zip file to the end of a JPEG image, you could use the resultant file as either – depending on which file extension you give it, or which program you open it with. Under Linux/Mac/*BSD, you can do such an appending operation with cat LoveLetter.zip >> Image.jpg . Read up about Steganography on Wikipedia if you find this intriguing.
I’ve taken advantage of this highly unsophisticated technique to make available to you, dear reader, a copy of the encryption program. Unfortunately what I’m writing also makes me sound like a big-headded twit. So without further ado, here are the instructions:
- Save the picture of boy painting flowers
- Rename it so it ends with .zip
- Use your favourite unzip program to extract the contents.
Matrix encryption of the type I’ve used is very weak, but evidently popular in maths education. I’m sure anybody with a computer could crack your love letter open with brute-force in a matter of minutes. The only real-world application that comes to mind for this algorithm is to allow grade 10 girls to swap notes in their English class.
The painting is by Banksy, who has many other cool works to his name. You can search for photos of his work on Flickr, where I nicked this one from.
