To encrypt a message, each block of n letters (considered as an n-component vector) is multiplied by an invertible n × n matrix, against modulus 26. To decrypt the message, each block is multiplied by the inverse of the matrix used for encryption.
a)
PAK ARMY→(PA),(KA),(RM),(YX)→(161),(111),(1813),(2524)
(9712)(161)=(145114)=(1510)(mod 26)
(9712)(111)=(10079)=(221)(mod 26)
(9712)(1813)=(175152)=(1922)(mod 26)
(9712)(2524)=(249199)=(1517)(mod 26)
(1510),(221),(1922),(1517)→(OJ),(VA),(RM),(XY)
b)
(9712)−1=111(2−7−19)≡19(2−7−19)=(12192515)(mod 26)
(12192515)(1510)=(430435)=(161)(mod 26)
(12192515)(221)=(279433)=(111)(mod 26)
(12192515)(1922)=(778691)=(1813)(mod 26)
(12192515)(1517)=(605540)=(2524)(mod 26)
Comments