ZETA
ZETA
The basic idea behind the Hill cipher is to transform plaintext blocks into
ciphertext blocks using matrix multiplication. The key in the Hill cipher is a square
matrix, known as the encryption matrix. The plaintext is divided into blocks,
where each block is represented by a vector of numbers corresponding to the
positions of the letters in the alphabet. The encryption matrix is then multiplied
by each plaintext block vector to obtain the corresponding ciphertext block vector.
To decrypt the ciphertext, the recipient needs to have the inverse of the
encryption matrix, known as the decryption matrix. The decryption process
involves multiplying the ciphertext block vector by the decryption matrix to obtain
the original plaintext block vector.
One advantage of the Hill cipher is that it can encrypt multiple letters at once,
making it a polygraphic substitution cipher. This provides some level of security
against frequency analysis attacks. However, the security of the Hill cipher
depends on the size of the matrix used. For example, a 2x2 matrix can be easily
broken with known-plaintext attacks.
In matrix-based cryptography, the choice of matrix size and the specific operations
used for encryption and decryption play a crucial role in the security of the
algorithm. The Hill cipher is a specific instance of matrix-based cryptography,
where the encryption matrix determines the mapping from plaintext to
ciphertext, and the decryption matrix is used to reverse this mapping.
The Hill cipher and other matrix-based encryption algorithms have found
applications in various domains. Some examples include:
HILL CIPHER:
1.ENCRYPTION:
( ) mod 26
K 11 K 12 K 13
(c1 c2 c3)=(p1 p2 p3) K 21 K 22 K 23
K 31 K 32 K 33
C1=(P1K11+P2K21+P3K31)mod 26
C2=(P1K12+P2K22+P3K32)mod 26
C3=(P1K13+P2K23+P3K33)mod 26
We can understand this algorithm easily by an illustartion:
Q) Encrypt “ pay more money” using Hill cipher with key
( )
17 17 5
21 18 21
2 2 19
Ans.
p a y m o r e m o n e y
15 0 24 12 14 17 4 12 14 13 4 24
( ) mod 26
K 11 K 12 K 13
(c1 c2 c3) = (p1 p2 p3) K 21 K 22 K 23
K 31 K 32 K 33
( ) mod 26
17 17 5
(c1 c2 c3) = (15 0 4) 21 18 21
2 2 19
= (15*17+0*21+24*2 15*17+0*18+24*2
15*5+0*21+24*19) mod 26
= (303 303 531) mod 26
= (17 17 11)
= (R R L)
Encrypting mor
( ) mod 26
K 11 K 12 K 13
(c1 c2 c3) = (p1 p2 p3) K 21 K 22 K 23
K 31 K 32 K 33
( ) mod 26
17 17 5
(c1 c2 c3) = (12 14 17) 21 18 21
2 2 19
= (12*17+14*21+17*2 12*17+14*18+17*2
12*5+14*21+17*19) mod 26
= (532 490 677) mod 26
= (12 22 1)
= (M W B)
Encrypting emo
( ) mod 26
K 11 K 12 K 13
(c1 c2 c3) = (p1 p2 p3) K 21 K 22 K 23
K 31 K 32 K 33
( ) mod 26
17 17 5
(c1 c2 c3) = (4 12 14) 21 18 21
2 2 19
= (4*17+12*21+14*2 4*17+12*18+14*2
4*5+12*21+14*19) mod 26
= (348 312 538) mod 26
= (10 0 18)
= (K A S)
Encrypting ney
( ) mod 26
K 11 K 12 K 13
(c1 c2 c3) = (p1 p2 p3) K 21 K 22 K 23
K 31 K 32 K 33
( ) mod 26
17 17 5
(c1 c2 c3) = (13 4 24) 21 18 21
2 2 19
= (13*17+4*21+24*2 13*17+4*18+24*2
13*5+4*21+24*19) mod 26
= (348 312 538 ) mod 26
= (15 3 7)
= (P D H)
Plaintext : pay more money
Ciphertext: RRLMWBKASPDH