And, further suppose that we know it is a weather report of some sort so that it starts with the word “weather.” That is we know that the ciphertext VDIAUZQ pairs with the plaintext “weather,” this is called a crib. Finally, suppose that either through analysis or espionage we know that a Hill's Cipher was used to encipher the message. Let's see if we can recover the key.
Using the crib (VDIAUZQ equals “weather”) we can set up three equations, the minimum needed to solve a general Hill's cipher:
\begin{align*}
\begin{pmatrix} a & b\\ c & d\end{pmatrix}\begin{pmatrix} V \\ D\end{pmatrix}+s & \equiv \begin{pmatrix}w \\ e \end{pmatrix} \\
\begin{pmatrix} a & b\\ c & d\end{pmatrix}\begin{pmatrix} I \\ A\end{pmatrix}+s & \equiv \begin{pmatrix}a \\ t \end{pmatrix} \\
\begin{pmatrix} a & b\\ c & d\end{pmatrix}\begin{pmatrix} U \\ Z\end{pmatrix}+s & \equiv \begin{pmatrix}h \\ e \end{pmatrix}
\end{align*}
or written with numbers:
\begin{align}
\begin{pmatrix} a & b\\ c & d\end{pmatrix}\begin{pmatrix} 21 \\ 3\end{pmatrix}+s & \equiv \begin{pmatrix}22 \\ 4 \end{pmatrix} \label{hill_KPT_equation_1}\tag{E.5.1}\\
\begin{pmatrix} a & b\\ c & d\end{pmatrix}\begin{pmatrix} 8 \\ 0\end{pmatrix}+s & \equiv \begin{pmatrix}0 \\ 19 \end{pmatrix} \label{hill_KPT_equation_2}\tag{E.5.2}\\
\begin{pmatrix} a & b\\ c & d\end{pmatrix}\begin{pmatrix} 20 \\ 25\end{pmatrix}+s & \equiv \begin{pmatrix}7 \\ 4 \end{pmatrix} \label{hill_KPT_equation_3}\tag{E.5.3}
\end{align}
If we subtract equation (E.5.2) from (E.5.1) and (E.5.3) from (E.5.2), we eliminate the \(s\) and can then solve for the matrix (remember that all the arithmetic is modulo 26):
\begin{align*}
\begin{pmatrix} a & b\\ c & d\end{pmatrix}\begin{pmatrix} 13 \\ 3\end{pmatrix} & \equiv \begin{pmatrix}22 \\ 11 \end{pmatrix} \\
\begin{pmatrix} a & b\\ c & d\end{pmatrix}\begin{pmatrix} 14 \\ 1\end{pmatrix} & \equiv \begin{pmatrix}19 \\ 15 \end{pmatrix}
\end{align*}
Finally, we can test our work by applying the shift \(s\) from equation (E.5.5) and the matrix \(m^{-1}\) from equation (E.5.4) to our cipher text using the Hill's Cipher App in Appendix B to see if we get a meaningful message. The key does give a message; it appears to be part of the following weather advisory:
WEATHER ADVISORY
ISSUED: 10:54 AM MAR. 26, 2021 – NATIONAL WEATHER SERVICE
...WIND ADVISORY REMAINS IN EFFECT UNTIL MIDNIGHT EDT TONIGHT...
* WHAT...West winds 15 to 30 mph with gusts up to 50 mph
expected.
* WHERE...Southern Vermont, Litchfield County, Connecticut, the
Berkshires of western Massachusetts, the eastern Catskills,
Mohawk Valley, Schoharie Valley, Greater Capital Region,
Taconics, and the mid Hudson Valley.
* WHEN...Until midnight EDT tonight.
* IMPACTS...Gusty winds could blow around unsecured objects. Tree
limbs could be blown down, large tree limbs could come down and
a few power outages may result.
PRECAUTIONARY/PREPAREDNESS ACTIONS...
Use extra caution when driving, especially if operating a high
profile vehicle. Secure outdoor objects.
Below is a copy of the scrap hand work that went into finding the key for this cipher.