Ceasar Cipher
In this document, we will discuss the Ceasar Cipher, which is one of the earlier methods of encryption, and was implemented by assigning each letter a number, such as $a\rightarrow 1$, and then computing \[ c = m+a \:(\text{mod } 26) \] where $m$ is the original message, $a$ is some preselected encrypting key, and $c$ is the ciphertext. We can implement this in SageMath with the following code.
Example
Here is a working example of using this affine cipher, with parameters $a=5$ and $b=4$. Be sure to run the above cell first to define all necesary functions.