Two-Way Cipher
September 20, 2016
A recent post at Reddit asked for a way to encrypt two plaintexts to the same ciphertext; the application was in geocaching, where a series of caches leads to two different locations depending on the decoded message. That’s an interesting question, and the responses there got it wrong. Fortunately, the poster also asked at the crypto reddit, and the people there were more helpful.
Your task is to write a program that decrypts two different plaintexts from the same ciphertext, given two different keys. When you are finished, you are welcome to read or run a suggested solution, or to post your own solution in the comments below.
Nice! Reminds me of “angecryption”:
https://events.ccc.de/congress/2014/Fahrplan/events/5930.html
Just leaving a comment would be poor form; here’s my Haskell solution.