4THE REVERSE CIPHER
“Every man is surrounded by a neighborhood of voluntary spies.”—Jane Austen, Northanger Abbey
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 the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.