Skip to main content
. 2022 Jun 8;22(12):4359. doi: 10.3390/s22124359
Algorithm 3. Hill Cipher with Orthogonal Matrix
Input: Permuted image array L, K2
Output: An array E of order M.
  •   1.

    Use the given equation of a plane to generate the key orthogonal matrix. K2 will be the orthogonal key matrix under mod 256 of order 3×3.

  •   2.
    Making blocks Lr
    • (i)
      Transform one-dimensional array into block vectors of size 3×1. The rth block is Lr, where
      r=1,2,3,…,M3
    • (ii)
      Hill cipher is implemented by using the following formula
      Ar=K2×Lr(mod256).
    • (iii)
      Write all Ar′s in one-dimensional array again such that
      E={A1,A2,A3, …,AM3}.