Knock-knock! … Who’s there? Joking and encryption

Tali de York
5 min readNov 10, 2020

Cryptography jokes are understood only by a selected few, or just the two.

Would you believe that your smartphone or laptop engage in knock-knock conversations numerous times a day? Here is how one of those dialogues would sound if translated into a human language:

The above exchange is an example of mutual client-server authentication that happens when you try to connect to an HTTPS website. In this case, the connection was not established because the server was not the one the client wanted. So, if you ever get locked out of your present-day IoT-connected house, talk to your lock calmly: because communication is key.

How far are jokes from cryptography? If you deal with crypto-security, your first answer is most likely, “Encryption is not a joke!” Think again, some protocols and encryption algorithms are so obsolete that just mentioning them in a conversation will get you an immediate reaction, “I do hope you are joking!” For example, a totally insecure cipher ROT13 that substitutes a letter by a letter 13 positions down the alphabet, has been used in online forums to hide punchlines or even whole jokes. This text obscuration technique is often cited as a canonical example of jokingly weak encryption. By the way, do you know why shifting specifically by 13 has been chosen as a standard?

Nf gurer ner 26 yrggref va gur nycunorg, gur EBG13 pvcure vf flzzrgevpny. Gb qrpvcure EBG13, lbh nccyl gur fnzr nytbevguz. N frpbaq nccyvpngvba bs EBG13 gb pvcuregrkg erfgberf gur bevtvany cynvagrkg.

Here is an online translating tool and a few more jokes. Remember, you can use ROT-13 only on jokes, not on the serious stuff!

Encryption and Insider Jokes

You may be surprised by the fact that cryptography has a lot in common with jokes, especially insider ones. An insider joke happens when a group of people shares a secret, some background information or context required to get this joke. This context is the key that reveals the encrypted funny message. So, an insider joke has an encrypted funny message (plaintext), some surface content (ciphertext), and a shared secret (encryption/decryption key) known both by the joke teller (sender) and the audience (receiver). If the audience knows the key, you will hear them laughing. If they are clueless, there will be an awkward silence.

The same process happens in cryptography. To exchange messages that would seem meaningless to strangers, the sender and the receiver should share a secret. The sender encrypts the plaintext with the secret key and sends the resulting ciphertext to the receiver, who uses the key to decrypt the message and reveal the plaintext. Don’t be deceived by the name, the plaintext may turn out not so plain and even hilarious!

Similar recipes and spices

Jokes and encrypted messages need structures to be efficient. Encrypted messages have an opening statement to mark the start of the communication, the body that contains the encrypted text, and the closing tag that indicates the end of the transmission. Similarly, jokes start with framing that tunes the audience in to expect a joke, the narrative that tells the story, and the punchline that indicates the end of the transmission and signals the moment, after which you can start laughing. As for the punchline, have you ever tried to explain a joke to somebody who does not get it?

Encrypted messages and jokes might have salt and pepper in them! Salt and sometimes pepper is added to not-so-intricate and plain passwords to produce more durable password hashes. Just picture a system administrator examining some hashed stuff and muttering, “Not enough salt!” As for decent recipes of salty or spicy jokes, every chef has their own puns.

Alice and Bob

Multiple stories about two people, Alice and Bob, who do not know or trust each other but still engage in transactions over noisy and insecure lines, have populated the cryptographic universe for over 40 years. Along with an eavesdropper Eve, a malicious Mallory, and a few other more or less trusted personas, they’ve lasted through numerous life scenarios while serving as explanations of encryption algorithms or communication protocols. There is never a dull moment: they have been exchanging secret messages and passwords, playing poker by mail, participating in elections, trading stocks, or even buying pizza with bitcoins! Meanwhile, they do not recognize each other’s voice or handwriting. If some Eve cuts into the conversation and pretends to be Alice or Bob, she is very likely to get away with it. And there is no second chance: they seem to live on different planets as the lines are super-noisy and overpriced. No wonder, there are jokes about Alice and Bob: get ready for superposition and entanglement!

As John Gordon said in his speech on A&B’s biography in 1984, “Against all odds, over a noisy telephone line, tapped by the tax authorities and the secret police, Alice will happily attempt, with someone she doesn’t trust, whom she can’t hear clearly, and who is probably someone else, to fiddle her tax return and to organise a coup d’état, while at the same time minimising the cost of the phone call. A coding theorist is someone who doesn’t think Alice is crazy.

In a nutshell, you can encrypt jokes, but you should never joke with encryption!

Takeaways

  • Encrypted messages and jokes are forms of communication.
  • They have a sender and a receiver.
  • They have surface content and a hidden meaning.
  • You need to know the secret to get the message.
  • The message depends a lot on context.
  • They can be strong, weak, obsolete, or even inappropriate.
  • You may experiment with salt and spices.
  • You have a good laugh when you finally get them.
  • As funny as the story of Alice and Bob may seem to you, you might actually be one of them.
  • If you want to protect your devices against intruders, don’t leave windows or ports open!

In this day and age of arising artificial intelligence, should we allow AI-based systems to make jokes? Stay tuned!

--

--

Tali de York

I am a [technical] writer, poet, and engineer. My domains are IT, Cryptography, Data Science, Artificial Intelligence, Machine Learning, and Cloud Computing.