4THE REVERSE CIPHER

“Every man is surrounded by a neighborhood of voluntary spies.”—Jane Austen, Northanger Abbey

Images

The reverse cipher encrypts a message by printing it in reverse order. So “Hello, world!” encrypts to “!dlrow ,olleH”. To decrypt, or get the original message, you simply reverse the encrypted message. The encryption and decryption steps are the same.

However, this reverse cipher is weak, making it easy to figure out the plaintext. Just by looking at the ciphertext, you can figure out the message is in reverse order.

.syas ti tahw tuo erugif llits ylbaborp nac uoy ,detpyrcne si siht hguoht neve ,elpmaxe roF

But the code for the reverse ...

Get Cracking Codes with Python now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.