Example 7.1.
One of the first and most famous private key cryptosystems was the shift code used by Julius Caesar. We first digitize the alphabet by letting \(\text{A} = 00, \text{B} = 01, \ldots, \text{Z} = 25\text{.}\) The encoding function will be
\begin{equation*}
f(p) = p + 3 \bmod 26;
\end{equation*}
that is, \(A \mapsto D, B \mapsto E, \ldots, Z \mapsto C\text{.}\) The decoding function is then
\begin{equation*}
f^{-1}(p) = p - 3 \bmod 26 = p + 23 \bmod 26\text{.}
\end{equation*}
Suppose we receive the encoded message
DOJHEUD. To decode this message, we first digitize it:
\begin{equation*}
3, 14, 9, 7, 4, 20, 3\text{.}
\end{equation*}
Next we apply the inverse transformation to get
\begin{equation*}
0, 11, 6, 4, 1, 17, 0\text{,}
\end{equation*}
or
ALGEBRA. Notice here that there is nothing special about either of the numbers \(3\) or \(26\text{.}\) We could have used a larger alphabet or a different shift.
