A Novel Block Cipher Involving a Key Bunch Matrix and a Key-based Permutation and Substitution

In this paper, we have developed a block cipher by extending the analysis of a Novel Block Cipher Involving a Key bunch Matrix and a Key-based Permutation and Substitution. Here we have include and additional key matrix, which is supplemented with xor operation. The cryptanalysis carried out in this investigation clearly indicates that this cipher cannot be broken by any attack.


INTRODUCTION
In a recent investigation [1], we have developed a block cipher involving a key bunch matrix and including a pair of functions, called Permute() and Substitute(). In this analysis, we have seen that the permutation and the substitution, which depend effectively on a key, strengthen the cipher in a remarkable manner. This is all on account of the fact that the permutation and the substitution, induced into the plaintext at each and every stage in the iteration process, causes confusion and diffusion.
In the present investigation, our objective is to modify the afore-mentioned block cipher by introducing an additional key matrix supplemented with xor operation. The basic equation governing the encryption of this cipher can be written in the form Here, our interest is to examine, how the additional key matrix, F, would strengthen the cipher when supported by permuted and substitution.
Let us now present the plan of the paper. In section 2, we introduce the development of the cipher. Here, we depict the flowcharts and write the algorithms required in this investigation. Then, we mention the basic ideas of the key based permutation and substitution. In section 3, we mention an illustration of the cipher, and discuss the avalanche effect. We study the cryptanalysis, in section 4. Finally, we deal with the computations carried out in this analysis, and draw conclusions, in section 5.

II. DEVELOPMENT OF THE CIPHER
Consider a plaintext, which can be written in the form of a square matrix P, given by In this analysis, r denotes the number of rounds in the iteration process, and it is taken as 16.
The functions Permute() and Substitute(), which are utilized in encryption, depend upon a key. Let us choose the key, K, in the form   Science and Applications, Vol. 4, No.1, 2013 189 | P a g e www.ijacsa.thesai.org The process of permutation can be explained as follows.
Let x i , i=1 to 16, be a set of 16 numbers. As the table is suggesting (looking at the first row and the third row), we interchange 1 x with 12 x , 2 x with 3 x , 4 x with 6 x , 5 x with 16 x , 7 x with 8 x , 9 x with 13 x , and 14 x with 15 x . It may be noted here that we need not interchange any other numbers as they are already subjected to change in a way. Keeping this basic idea in view, let us now consider the plaintext matrix P = [ ij p ], i=1 to n, j=1 to n, (after xoring with F) in any round of the iteration process. Considering the first two rows of this matrix and representing the elements ij p in their binary form, and writing the binary bits in the vertical manner, we get a matrix of size 16xn. On dividing this matrix into submatrices, where each one of size 16x16, and performing the interchange of rows (firstly) and columns (subsequently), as is done in the case of numbers i x , i=1 to 16, we get the corresponding permuted matrix, in the case of each submatrix. On applying the same procedure for the other submatrices also, we ultimately get n/16 sub-matrices. On representing the binary bits in terms of decimal numbers (converting 8 binary bits in a row as a decimal number), we get a 2xn matrix. On adopting the same procedure on the subsequent pairs of this matrix, we complete the permutation process. However, it is to be remembered that n must be divisible by 16. In case, if n<16, that is say, n=4, then a plaintext matrix of size 4x4 can be written as a matrix of size 8x16, by writing each decimal number as binary bits in a column. Then the procedure of swapping, applied for numbers, can be applied here, for rows firstly and for columns nextly.
However, in the case of rows, we restrict our interchanging process only to 8 rows. Then, on representing the binary bits in terms of decimal numbers (considering the bits in a rowwise manner) we get the permuted matrix. This completes t he process of permutation.
The process of substitution can be mentioned as follows. In the EBCDIC code, the characters can be represented in terms of a table of size 16x16, containing numbers 0 to 255, in a sequential manner. On swapping rows, firstly, and columns, nextly, as it is already done in the case of the numbers 1 x to 16 x , we get a new table (see Table-2).
On using the Table-2, we perform substitution, by noting the correspondence between the number in the plaintext, the number in the EBCDIC table and hence the number in the substitution table. For clarity if this substitution process, we refer to [1].
The functions IPermute() and ISubstitute(), used in the decryption process, denote the reverse processes of the Permute() and the Substitute(). The function Mult() is used to find the decryption key bunch matrix D for the given E.

III. ILLUSTRATION OF THE CIPHER AND THE AVALANCHE EFFECT
Consider the plaintext given below.
Dear Madam! I have received your letter. Please do not run away from our country in that manner. I am coming within this month. I will not continue my Ph.D. programme. I may leave this research activity but I cannot leave you. It is indeed a surprise. Though there was no response from the selection committee for a span of one year, very recently I got selected in our country for IAS. I think I am lucky. Tell you father and mother about this news and tell them in a nice manner that you are running p8third month. I hope that all these issues will end up very soon and we will become one undoubtedly. Tell my father and mother that I am coming there. Yours loving husband  Vol. 4, No.1, 2013 190 | P a g e www.ijacsa.thesai.org Now, on making use of the plaintext P, the encryption key bunch matrix E and the additional key matrix F, and applying the encryption algorithm, given in section 2, we get the ciphertext matrix C in the form (3.7) On using this C, the F, and the decryption key bunch matrix D, given by (3.5), and the decryption algorithm, given in section 2, we get back the plaintext P, which is in the form (3.3). Now let us study the avalanche effect. On replacing the 4th row 4th column element, 129 in the plaintext (3.3) by 193, we have a one binary bit change in the plaintext. On using this modified plaintext, the E, the F, and the encryption algorithm, we get the new ciphertext in the form, given by (3.8).
On comparing (3.8) and (3.7), after converting them into their binary form, we notice that there is a change of 72 bits out of 128 bits. This shows that the cipher is a strong one. Now, let us have one binary bit change in the key bunch matrix E. To this end, we replace the 3rd row 2nd column element 19 in E by 18. On using this modified E, the original P, given by (3.3), and the F, given by (3.6), and applying the encryption algorithm, we get the corresponding ciphertext C, in the form (3.9) Now, let us convert (3.7) and (3.9) into their binary form and compare them. From this, we find that these two ciphertexts differ by 74 bits out of 128 bits. This also shows that the cipher is having appreciable strength. Now, on making use of the plaintext P, the encryption key bunch matrix E and the additional key matrix F, and applying the encryption algorithm, given in section 2, we get the ciphertext matrix C in the form On using this C, the F, and the decryption key bunch matrix D, given by (3.5), and the decryption algorithm, given in section 2, we get back the plaintext P, which is in the form (3.3). Now let us study the avalanche effect. On replacing the 4th row 4th column element, 129 in the plaintext (3.3) by 193, we have a one binary bit change in the plaintext. On using this modified plaintext, the E, the F, and the encryption algorithm, we get the new ciphertext in the form Now, let us convert (3.7) and (3.9) into their binary form and compare them. From this, we find that these two ciphertexts differ by 74 bits out of 128 bits. This also shows that the cipher is having appreciable strength.

IV. CRYPTANALYSIS
The study of cryptanalysis plays a prominent role in the development of every cipher. The different types of attacks that are available in the literature of cryptography are 1. Ciphertext only attack (Brute force attack), 2. Known plaintext attack, 3. Chosen plaintext attack, and 4. Chosen ciphertext attack.

years 
As this time is very large, it is simply impossible to break this cipher by the brute force attack.
Let us now examine the known plaintext attack. In order to carry out this approach, we have plaintext and ciphertext pairs, as many as we want, at our disposal. If we focus our attention on only one round of the iteration process, that is if r=1, then the basic equations governing the encryption process are given by P = ([ ij e × ij p ] mod 256)  F, i = 1 to n, j=1 to n, (4.1) P = Permute(P), (4.2) P = Substitute(P), (4.3) and C = P (4.4) In this attack, the ciphertext C in (4.4), is known to us. On using this one, we can know the P, occurring in the left side of (4.3). As key is unknown, we do not know ISubstitute(). Hence P occurring on the right hand side of (4.3) cannot be determined. Hence this cipher cannot be broken by the known plaintext attack. Luckily, if key K is known (a very stray case), then we can obtain P, occurring on the left hand side of (4.1). Then, though ij p is known to us, we cannot determine the ij e , by any means, as the equation (4.1) is containing several unknowns related to F, and is including mod and xor operations. Thus this cipher cannot be broken by the known plaintext attack, even when r=1, and the key matrix K, used in the permutation process is known to the attacker.
In view of the equations, involved in the encryption process, we do not find any possibility to choose either a plaintext or a ciphertext for breaking this cipher.
In the light of the above facts, we conclude that this cipher is a very strong one.

V. COMPUTATIONS AND CONCLUSIONS
In this investigation, we have developed a block cipher involving a key bunch matrix and an additional key matrix, and involving key-based permutation and substitution. The strength of the cipher is highly remarkable due to permutation and substitution, and it is further supplemented with the additional key matrix.
The programs for encryption and decryption are written in Java.
The EK and FK are encrypted by using the E, the F, and applying the encryption algorithm. The resulting ciphertexts of the keys EK and FK are as follows, in (5.4) and (5.5).