The Hill cipher can use matrices of 2x2, 3x3, 4x4, 5x5, 6x6, etc. for the encryption/decryption process.
In this example above, the fundamental pieces of information about the Hill cipher are given.
1) A 4x4 encryption matrix.
2) The plain text and the matching cipher text.
3) Only 26 letters in the system [using MOD 26]
Some of the information supplied:
Ciphertext= "zcsffbeuassoxczwuxbsnbhaogymqhmxzlreczmsicxjkzfcx zexqchskyfnwuvayjbhthc..."
Plaintext = "archimedsegotsoe..."
4x4 ciphertext in columns of 4 row depth
The ciphertext letters (ascii code) transformed to numeric values a=0, z=25 (mod 26 matrix).
& the associated plain text numeric matrix
[The detailed explanation has been abridged]*
With a transpose of the 4x4 Ciphertext adjacent to a 4x4 transpose of the plaintext,
making a 4 row x 8 column matrix. The Ciphertext was row-reduced modulo 26 to reduced
echelon form, then forming an identity matrix for the left half, thus the right half
was a transpose of the inverse matrix.
That matrix was used to decrypt the data supplied.
Something didn't work as expected.
There was a typo in the supplied PLAINTEXT data.
The 9th & 10th letters of the plain text appeared to be swapped, since the
accepted spelling of the greek math man is "ARCHIMEDES".
I changed the plaintext & recomputed. This is the resulting decryption matrix and
the supplied ciphertext decoded.
A decryption matrix
The decrypted message:
archimedes got so excitrd because he sblveq the problem tuat hnzfjjlezpnrnnazfkmyvetcxpfni
From this it appears that the ciphertext was not proof read when entered.
*It makes little sense to have a full explanation of how it works when the data is invalid.