I am trying to solve a hill cypher and I have the original matrix (I'll call it H):
| 1 2 6|
| 1 4 5|
| 6 12 8|
I have tried and tried to get the decryption matrix but I am lost, this is what I have so far:
H(transpose):
| 1 1 6|
| 2 4 12|
| 6 5 8|
Then I find H(adjoint):
| -28 56 -14|
| 22 -28 1|
| -12 0 2|
Then I find the multiplicative inverse of det(H):
det(H) = -56
-56*det(H)^-1 = 1 mod 29
det(H)^-1 = 14
Now I multiply H(adjoint) with 14 resulting in
| -392 784 -196|
| 308 -392 14|
| -168 0 28|
I then take mod 29 of each number in the matrix to get H^-1 (the decryption matrix)
|14 1 7|
| 8 14 14|
| 6 0 28|
When I decrypt the a cipher text and re-encrypt it I do not get the same cipher text and plain texts so something in my calculation of the decryption matrix must be wrong. Can anyone help?