Autokey Cipher

In the cell that follows, we define our encode/decode functions, as well as all the functions that are needed to implement the Autokey Cipher in SageMath. Run this cell to define all necessary functions, then proceed to the examples.

Recall that to use the Autokey Cipher, one simply chooses a key, which is a single letter of the alphabet in question, then one encrypts the first letter of the message with the key, then that encrypted letter becomes the key for the second letter, and so on. Decryption is similar.

Examples

Here we go through a quick example, as this is one of the easier encryption schemes to implement, this section is quite short.