I am reading about Hill Cipher encryption algorithm, from the wikipedia. I see that I have a key as a matrix that must multiply by the the matrix of values. But there are 2 things I don’t understand.
I don’t know the mean of (mod 26). I know it is modulo 26, but I don’t know for what it is applied?
As for the second issue, I can’t understand where the matrix [15 14 7] is coming from?
Any good explanation will be highly appreciated .
26is the length of your dictionary, which happens to be the length of the English alphabet (A to Z). Using the modulo operator allows you to map every possible output of the matrix multiplication (encryption) to a letter in the alphabet (834 = 2 (mod 26)which is C), which lets you store the encrypted message in the form of a string of letters.The
[15 4 7]came from the matrix[67 222 319] (mod 26):The triple equals sign means that the matrix
[67 222 319]is congruent to[15 4 7]modulo 26. Every element in the left-hand matrix should be congruent modulo 26 to the corresponding element in the right-hand matrix as well, so you apply the modulo operator to every element in the left-hand matrix to get every element in the right-hand matrix.