© 2008 Science Publications Modified Hill Cipher for a Large Block of Plaintext with Interlacing and Iteration

In this research, we have developed a large block cipher by modifying the Hill cipher. In this, we have introduced interlacing of the binary bits of the plaintext as the primary concept leading to confusion. This process is strengthened by using iteration. The cryptanalysis and avalanche effect mentioned in this research clearly exhibit the strength of the cipher.


INTRODUCTION
In a recent research [1] , we have developed a block cipher using a large key matrix. In this, we have used interlacing of the binary bits of the plaintext vectors, occurring in the plaintext matrix, as the primary concept. Here, the multiplication of the plaintext with the key causes diffusion and the interlacing of the plaintext at various stages of iteration causes confusion in an effective manner.
In the present research, our objective is to develop a block cipher, wherein the block is taken in the form of a large matrix. In this, we illustrate the cipher by giving a pair of examples. In the first one, the plaintext block is taken in the form of an 8×8 matrix and in the second one, it is taken as a whole in the form of a matrix which has 8 rows and any number of columns, depending on the size of the entire plaintext.

DEVELOPMENT OF THE CIPHER
Consider a plaintext. Let us use ASCII code and represent it in the form of a matrix of size nxm. Thus we have P = [P ij ], i = 1 to n, j = 1 to m (1) Let the key matrix K be given by K = [K ij ], i = 1 to n, j = 1 to n.
Following Hill [2] , the process of encryption is described by using the relation The process of decryption is governed by the relation where k −1 is the modular arithmetic inverse of K.
In the present analysis, we include interlacing (decomposition) in the process of encryption (decryption) and use iteration in both encryption and decryption. Here, it is to be noted that decomposition is a reverse process to that of interlacing.
Let us now illustrate the process of interlacing. For simplicity, consider a plaintext matrix of size 8×8 given by P = [p ij ], i = 1 to 8, j = 1 to 8 Writing each number of (2.5) in its binary form, we get [P ij ] =] Where, i = 1 to 8, l = 1 to 7, j = 1 to 8.
Typically we can write the first column of the matrix[p ij ] as follows: 1  1  1  1  1  1  12  13  14  15  16  17  1  1  1  1  1  1  22  23  24  25  26  27  1  1  1  1  1  1  33  32  34  35  36  37  1  1  1  1  1  1  42  43  44  45  46  47  1  1  1  1  1  1  52  53  54  55  56  57  1  1  1  1  1  1  62  63  64  65  66  67  1  1  1  1  1  1  71  73  74  75  76  77  1  1  1  1  1  1  82  83  84  85  86  87 Similarly, we can have the second column with superscript 2 on all the elements (instead of 1). In the same manner, we can write all the other columns. Now, let us place the eight columns of [P ij ] one after the other. Thus we get a matrix of size 8×56, containing the elements of [ Here, the process of interlacing can be described as follows. Let us focus our attention on the fifty six elements of the first row of the matrix formed above. This set of elements is divided into two equal halves. The first bit of the second half is placed after the first bit of the first half, the second bit of the second half is placed after the second bit of the first half and so on. After mixing in this manner, we place these elements in the form of a matrix which is given below.
Similarly we get seven more matrices by using the rows two to eight of the matrix of the size 8×56 mentioned above.
Thus we get all the eight matrices having binary bits in each row. Basing upon these binary bits, we find the corresponding decimal numbers and hence obtain an 8×8 matrix, which is including the elements of all the columns. This can be considered as the new plaintext matrix (obtained after interlacing).
In a similar manner, it is possible to interlace the plaintext matrix, even when we are having more number of columns.
The procedures interlacing and decomposition are used in encryption and decryption respectively. The development of the cipher is shown in the schematic diagram given in Fig. 1 The algorithms required for encryption and decryption are designed as follows:

RESULTS AND DISCUSSION
Consider the plaintext given below. The policy of the other country is not clear. Let us watch for a few months and take a decision in respect of the external affairs and warfare. (6) Let us focus our attention on the first sixty four characters given by: The policy of the other country is not clear. Let us watch for a (7) On writing the ASCII codes for characters in a columnwise manner, the above plaintext can be written in the form of a matrix given by Here we are to note that we are able to obtain the K −1 as the matrix of K is nonsingular and the determinant of K is relatively prime to 128. Further, it can be readily established that KK −1 mod 128 = K −1 K mod 128 = I.
On taking the C given in (10) and using the algorithm (2) This is the same as the plaintext given in (8).
Let us now consider another example wherein we have taken the complete plaintext, given by (6). This plaintext is containing 143 characters. To represent this in the form of a matrix consisting of n rows and m columns, where n = 8 and m is having an appropriate value, we add one more character ($ is added here) to the plaintext. With this padding, the plaintext can be represented in terms of ASCII codes as follows: Here, we perform the interlacing as we have mentioned earlier 2. Then, on adopting the process of encryption, we get the ciphertext, in hexadecimal notation, as shown below. 80F0B933CC7C103760098E3C5EF00DE82DDD0A2ED1B25585B90D1A69408A060354946C6BE1B272F6D26 B465F562781E777F64BE2992826209AC926BC532DF9D39A4A6A894D1E499E70D69EE1A3420D482AE9BC 4DE28B5E319C4FF13505748923A398151FC2EB302719763000F93599292EC8F49F7E46579BD344CDDBAC3 (16) On using the process of decryption, we readily find that this ciphertext can be brought into the form of the original plaintext.
In what follows, we examine the strength of the cipher by considering cryptanalysis and avalanche effect.

Cryptanalysis:
In this analysis, the key matrix is of size nxn and each element in this matrix is lying between zero and sixty three. Thus, the size of the key space is 2 6n 2 . In view of this fact, this cipher cannot be broken by the ciphertext only attack when n is greater than or equal to four. In the case of the known plaintext attack, we know as many pairs of P and C as we require. P is a matrix of size nxm where m>n and the C is also of the same size. Here as we have introduced interlacing and iteration, we do not have any direct simple relationship between P and C, as we have in the case of the Hill cipher. Thus, this ciphertext cannot be broken by the known plaintext attack.
Here, it is to be noticed that, any special choice of P or C will also not help any attacker in breaking the cipher.
Avalanche effect: Consider the plaintext given by (7). On applying the algorithm 1, the corresponding ciphertext can be obtained as: Here it is to be noted that the T and U represented in terms of binary bits (from their ASCII codes) differ in one bit. On applying the encryption algorithm, the ciphertext corresponding to (18) can be written as: Here we readily notice that (17) and (18) consisting of 448 bits, differ by 242 bits. This is quite significant.
Let us now change the key matrix element K 33 from 46 to 47. These two also differ in one bit. Now we use the modified key and the original plaintext and apply the encryption algorithm. Thus, we get the ciphertext in the form On comparing (17) and (19), having 448 bits, we find that the ciphertexts differ by 235 bits. This departure is also considerable.
From the above analysis, we conclude that the avalanche effect is highly pronounced.

CONCLUSIONS
In this research, we have developed a block cipher by modifying the Hill cipher. In this, the key is represented in the form of a matrix of size nxn and the plaintext is represented in the form of a matrix of size nxm, where m n. Thus we are able to accommodate a large number of characters of the plaintext into the plaintext matrix.
In this analysis, we have adopted an iterative process. In each round of the iteration, we have performed multiplication of the plaintext matrix with the key matrix and modulo operation with 128. In every round, the modified plaintext is represented in terms of binary bits and these binary bits are interlaced so that we get a plaintext matrix of the same size. This sort of interlacing of the binary bits of the plaintext is expected to cause a lot of confusion in the structure of the plaintext.
In this research, we have taken the size of the key matrix as 384 bits. The size of the plaintext block is 448 bits in the first example and 1008 bits in the second example.
The cryptanalysis and avalanche effect discussed in this research, clearly indicate that the cipher is a strong one and it cannot be broken by any cryptanalytic attack.
In the light of the above analysis, we find that the cipher under consideration can be applied to a plaintext of any size (with padding, if needed) and the strength of the cipher is quite significant as interlacing is causing a lot of transposition in the elements of the plaintext.