Beruflich Dokumente
Kultur Dokumente
Abstract: In this paper, we have modified the Hill Cipher by Hill cipher by introducing iteration, transposition, and / or
introducing an iterative procedure, which includes permutation. In all these investigations, it has been seen that
multiplication with the key matrix on both the sides of the Plain the process of iteration does not allow the formation of a
text matrix, mixing of the plain text by using a function called direct relation of the form (1.4) and hence, the known plain
Mix ( ), and XORing of the plain text matrix and the key matrix, text attack is not possible.
at every stage of iteration. The cryptanalysis carried out in this In the present paper, our objective is to modify the Hill
paper, clearly indicates that the cipher is a very strong one and
cipher, so that the known plain text attack is impossible.
it cannot be broken by any cryptanalytic attack.
Here, we use the relation
C = (K P K) mod 2, (1.6)
Keywords: Cipher, Modular arithmetic inverse, Plain
for encryption, where P is a square matrix of the plain text.
text, Cipher text, Key.
The process of decryption is governed by the relation
P = (K–1 C K–1) mod 2. (1.7)
1. Introduction
In a pioneering paper, Hill [1] developed a block cipher by It may be noted here that the presence of K, after P in
using the modular arithmetic inverse of a square matrix. In (1.6), will certainly rule out the known plain text attack and
this, the 26 characters of English alphabet are represented strengthen the cipher under consideration.
by the numbers 0 to 25, and the encryption is carried out by In section 2, we have presented the development of the
using the relation cipher. We have illustrated the cipher in section 3, and
C = K P mod 26, (1.1) discussed the cryptanalysis and the avalanche effect in
where P is the plain text column vector, C the cipher text section 4. Finally, we have presented some numerical
column vector, and K is the key matrix. In the process of computations and have drawn conclusions in section 5.
decryption, the plain text P is obtained by using the relation
P = K–1 C mod 26, (1.2) 2. Development of the cipher
where K-1 is the modular arithmetic inverse of K governed
Consider a plain text P which can be represented in the form
by the relation
of a square matrix given by
K K–1 mod 26 = I. (1.3)
P = [Pij], i = 1 to n, j = 1 to n, (2.1)
However, it is established in the literature [1] that this
where each Pij is either 0 or 1.
cipher can be broken by the known plain text attack as we
Let us choose a key k. Let it be represented in the form
can form a relation of the form
of a matrix given by
Y = K X mod 26, (1.4)
K = [Kij], i = 1 to n, j = 1 to n, (2.2)
where X is a square matrix containing the plain text
where each Kij is a binary number.
column vectors and Y is the matrix containing the
Let
corresponding cipher text column vectors, and the modular
C = [Cij], i = 1 to n, j = 1 to n (2.3)
arithmetic inverse of X can be found so that it leads to the
be the corresponding cipher text matrix.
relation
K = (Y X–1) mod 26. (1.5)
The process of encryption and the process of decryption
adopted in this analysis are given in Figure 1.
In a recent paper, Sastry and Janaki [2] have developed a
systematic procedure for the modular arithmetic inverse of a
square matrix. Then Sastry et al. [3]–[5] have modified the
28 (IJCNS) International Journal of Computer and Network Security,
Vol. 1, No. 1, October 2009
On placing two numbers in each row, that is, C4 85 in the On using (3.6) and (3.7), it can be readily shown that
first row, 81 99 in the second row, etc., the plain text matrix K K–1 mod 2 = K–1K mod 2 = I. (3.8)
P can be written in the binary form as
11 00 01 00 10 00 01 01
10 00 00 01 10 01 10 01 On applying the encryption algorithm, described in Section
01 00 00 00 11 00 01 10 2, we get the cipher text C in the form
10 01 10 01 10 00 10 01
10 00 01 01 10 01 01 01 10 0 1 0 1 1 1 0 1 1 1 0 0 1 0
10 00 01 00 01 00 11 11 01 0 1 1 0 1 0 1 1 1 1 1 1 0 0
01 00 00 00 11 10 00 11 10 1 1 1 0 0 0 1 1 1 1 0 0 1 0
P= 1 0 0 0 0 1 0 1 1 0 0 1 1 0 0 1 (3.4) 10 0 0 1 0 0 1 1 0 1 1 1 1 1 0
10 01 10 01 10 01 01 10 11 0 0 1 1 1 0 1 0 1 0 0 1 0 1
10 01 10 01 10 00 10 01 00 1 0 1 1 0 1 0 1 1 1 0 1 1 1
10 10 00 10 10 01 01 00 10 0 0 1 0 0 0 0 0 1 1 1 1 0 1
01 00 00 00 10 00 00 01 C=10 1 0 1 1 1 0 1 0 0 0 1 0 1 1 (3.9)
10 01 01 01 10 00 01 00 01 1 0 1 0 0 0 0 1 0 0 0 1 0 1
01 00 00 00 10 01 10 01 10 0 1 0 1 0 0 0 0 0 0 0 0 1 1
10 00 01 01 10 00 00 11 11 0 0 1 0 1 0 0 0 1 1 0 0 1 1
10 00 01 01 10 10 00 10 01 0 1 1 0 0 1 0 0 0 1 0 0 1 1
Let us choose a key k in the decimal form as 10 1 0 0 1 0 0 0 0 1 0 1 1 1 1
131 31 18 59 254 126 113 97 127 167 76 116 111 159 245 159 01 1 0 1 1 1 1 0 0 1 1 0 0 0 1
175 50 236 107 235 74 47 20 190 80 242 139 175 164 187 158
00 0 0 1 0 1 1 0 0 1 0 1 0 0 1
(3.5)
11 0 1 1 0 0 1 1 1 0 1 0 1 1 1
Then the Key matrix K be obtained as
10 00 00 11 00 01 11 11
On using (3.7) and (3.9), and applying the decryption
00 01 00 10 00 11 10 11
algorithm described in section 2, we get the Plain text P,
11 11 11 10 01 11 11 10
which is the same as (3.4).
01 11 00 01 01 10 00 01
Let us now study the avalanche effect. To this end, we
01 11 11 11 10 11 01 11
focus our attention on (3.2), and modify the 11th character
01 00 11 00 01 11 01 00
‘d’ to ‘e’. Then the plain text changes only in one binary bit
01 10 11 11 10 01 11 11
as the EBCDIC codes of d and e are 84 and 85 respectively.
K= 1 1 1 1 0 1 0 1 1 0 0 1 1 1 1 1 (3.6)
On using the encryption algorithm, we get the cipher text C
10 10 11 11 00 11 00 10
corresponding to the modified plain text in the form
11 10 10 10 01 10 10 11
11 10 10 01 01 00 10 10
1 0 1 0 0 0 0 0 1 1 0 0 1 0 1 0
00 10 11 11 00 01 01 00
1 1 0 1 0 0 1 0 1 0 1 1 1 0 1 1
10 11 11 10 01 01 00 00
1 0 1 0 0 0 0 0 1 0 1 0 0 1 1 1
11 11 00 10 10 00 10 11
1 0 1 1 1 1 0 1 1 0 0 1 1 1 0 0
10 10 11 11 10 10 01 00
1 0 0 1 0 0 0 0 1 0 0 1 1 1 0 0
10 11 10 11 10 01 11 10
1 1 1 1 0 1 1 0 1 1 0 0 0 1 0 1
On using the algorithm given in Section 2, the modular
0 0 1 1 1 0 1 0 0 1 1 1 1 1 1 1
arithmetic inverse of K can be obtained as
C=1 0 0 0 0 0 0 1 1 1 1 0 0 0 1 0 (3.10)
0 1 0 0 1 0 1 0 1 0 1 1 0 1 0 0
0 1 1 1 0 0 0 1 1 1 0 1 0 0 1 0
0 1 0 1 0 1 1 0 0 1 0 1 1 0 0 1
0 0 0 0 0 0 1 1 0 1 0 0 0 0 1 0
0 1 0 1 1 1 0 1 1 1 1 0 0 1 0 1
0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0
0 0 0 1 1 1 0 1 1 1 1 1 0 0 1 1
0 1 1 0 1 0 1 0 1 1 1 1 0 1 0 1
1 1 1 1 1 0 0 0 1 1 1 1 0 1 0 0
1 0 1 1 0 1 0 1 0 1 1 1 0 0 1 0
0 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1
1 0 1 0 1 0 0 1 1 0 1 1 1 1 1 0
1 0 1 0 1 1 0 0 1 1 1 0 0 1 1 1
0 0 1 1 0 0 0 1 0 0 1 1 0 1 1 1
1 0 1 1 0 0 0 1 0 1 0 0 1 0 1 0
K–1 = 0 0 1 1 0 1 0 1 0 1 0 1 0 1 0 0 (3.7)
On comparing (3.9) and (3.10), we find that the two
0 0 1 0 0 1 0 0 0 1 0 0 1 1 1 1
cipher texts differ in 124 bits, out of 256 bits, which is quite
0 0 0 1 1 0 0 1 1 1 0 0 1 0 0 0
significant.
1 1 0 1 1 0 0 1 1 1 0 1 0 0 0 0
Now let us change the key by one binary bit. To this end
1 0 1 0 1 0 1 1 1 1 0 1 0 1 0 0
we replace the 3rd element 18 of the key k by 19. Then on
0 0 1 0 1 0 1 1 0 0 1 0 0 1 0 0
using the original plain text given by (3.4), we get C in the
1 0 0 0 0 0 1 0 0 0 1 0 1 0 0 1
form
0 0 0 0 1 1 0 1 0 0 1 1 0 0 0 0
0 1 0 1 1 1 0 1 1 0 1 0 1 1 1 0
30 (IJCNS) International Journal of Computer and Network Security,
Vol. 1, No. 1, October 2009