title: Understanding the Hill cipher algorithm
body: <p>I want to implement Hill cipher but I think I have a problem in understanding the algorithm itself.</p>
  
  <p>The key I'll use is a 2X2 matrix and I'll encode 2 characters each time. 
  I'll multiply the key matrix with the matrix of 2 characters then modulus the result on 26 as this equation.</p>
  
  <pre><code>C = E(K, P) = KP mod 26
  where: K:key
         P:plain text
  </code></pre>
  
  <p>I do it like this but there's something wrong. I use the example in my book to test my algorithm. Since plain text is <code>friday</code> and key is: <code> int key[][] = {{5, 8}, {17, 3}}</code>;
   the result should be <code>PQCFKU</code>.</p>
  
  <p>For the first letters <code>f</code> , <code>r</code>  , <code>f= 5</code>  , <code>r=17</code> order of alphabetic letters
  encryption of <code>f</code> is <code>(5*5 + 17*8)%26  =5 => f</code> it should be <code>P</code> </p>
  
  <p>Where is the error that I make?</p>