One of the simplest methods of encrypting a message is with a Caesar Shift Cipher where letters are shifted by n places.  Most commonly by 13 places, known as ROT13.  If you come across some ciphertext that looks like it might be a simple Caesar shift, then use the following python functions.

A simple rotation of 13 places using string functions

The above in one line of code

The following is a brute force of Caesar shift from 1 to 25 and prints out each string

 

Python ROT13 and Caeser Cipher function

Leave a Reply