Skip to Main Content
Cracking Codes with Python
book

Cracking Codes with Python

by Al Sweigart
January 2018
Intermediate to advanced content levelIntermediate to advanced
416 pages
10h 40m
English
No Starch Press
Content preview from Cracking Codes with Python

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Robust Python

Robust Python

Patrick Viafore

Publisher Resources

ISBN: 9781492067498