A Block Cipher using Feistal’s Approach Involving Permutation and Mixing of the Plaintext and the Additive Inverse of Key Matrix

: In this research, we have developed a block cipher for a block of size 112 bits by using an iterative method involving a permutation of the plaintext and the subkeys generated in each iteration. Here we have represented the plaintext as a matrix of size 14 · 8, comprising binary bits. In the process of encryption, we have used a key matrix (K), which also consists of binary bits and generated subkeys from K for each iteration. For decryption, we have used the Additive inverse (K ¢ i ) - 1 of the subkeys. In this, we have discussed the cryptanalysis and have shown that the cipher cannot be broken by any cryptanalytic attack.

In the present research, we proposed a block cipher with a different approach based on the Feistal structure. Here, we use the concept of permutation and diffusion, in the development of cipher. In this, we have shown that a thorough mixing of the elements of the subkeys generated for each iteration and the plaintext permuted in each iteration will lead to a cipher, which cannot be broken by any cryptanalytic attack.

DEVELOPMENT OF CIPHER
In this study before we discuss the development of cipher, we first discuss the generation of key matrix from the given key, denoted by K 0 . Let klmnop abcdefghij = K 0 (1) Now we convert each element in the key, K 0 to its corresponding 7 bit ASCII code. Since the key, K 0 contains 16 elements, the corresponding ASCII code bits of key, denoted as K 0A will comprise 112 bits. Thus Let us now generate a matrix and denote it as K′ 0 of size 28×4. The process of generation of K′ 0 is as follows: The first element of the 112 bits of K 0A is placed in the 1st row of 1st column of the matrix K′ 0 . The second element in K 0A is placed in the 1st row 2nd column of K′ 0 . Then the third and the fourth elements of K 0A are placed in the 1st row, 3rd and 4th columns of K′ 0 respectively. Now the fifth element of K 0A is placed in the 2nd row 1st column, sixth element is placed in 2nd row 2nd column, the seventh and eighth elements are placed as 2nd row 3rd and 4th columns of K′ 0 respectively. This process continues until all the elements of K 0A are exhausted. Thus, K′ 0 is From K′ 0 let us now generate a 28×8 matrix, wherein the elements of K′ 0 are repeated and permuted to give rise to a matrix of size 28×8, denoted as K′. The procedure for generating K′ is detailed as given under: The 28×4 matrix of K′ 0 are placed as it is. Then, the first element under column 1 in 28th row of K′ 0 is placed in the first row fifth column and the first element in the 27th row is placed in the second row fifth column and so on. Then we get the first column elements of K′ 0 will appear in the descending order in the fifth column of K′ similarly we place the elements in other columns 2, 3, 4 of K′ 0 in the sixth, seventh and eighth columns. Thus K′ is We now once again permute K′ to obtain the key matrix K of size 28×8 the procedure for generating K from K′ is described as follows: The element in the 15th row of the 1st column of the matrix K′ is placed as element in the 1st row 1st column; the element in the 15th row 2nd column of the matrix K′ is placed as the element in the 2nd row fist column and so on. This way the eight elements belonging to the 15th row have now appeared as the first eight elements in the first column of the matrix K. We continue in this fashion till we exhaust the first 4 elements of 18th row of K′ this gives the first column of 28 elements in K. We now use the same procedure and obtain the 2nd, 3rd and 4th column of K from the remaining elements of 18th row (4 bits) till the final element of 28th row. We now come back to row 1 of K′ and place these eight elements as the first eight elements of the fifth column of K. Then we take the eight elements of the second row and third row of K′ respectively and place them as the next sixteen elements of 5th columns of K. We now take the first four elements of the fourth row of K′ and place them as the remaining four elements of 5th column of K. We continue this process till all the remaining elements of the fourth row to end of 14th row. Thus we have generated key matrix, K is given by, Let us now generate the subkeys twenty (20) in number to be used in the twenty (20) iterations with one subkey in each iteration. The procedure involved in the generation of subkeys is discussed below.
The first subkey K 1 is generated from K as follows: The element in the 8th column of the first row of the matrix K is placed as the element in the first row, first column of the matrix K 1 . Then the element in the 7th column first row of the matrix K is placed as the element in the 2nd row of the first column of the matrix K 1 . This process is continued for the remaining elements of the first row of the matrix K. Thus, we have the elements of the first row of the matrix K have appeared in the descending order in the first column as the first eight elements of the matrix K 1 . In a similar manner, this process is continued for the 2nd and 3 rd rows of K. At this stage, we have twenty four (24) elements in the first column of the matrix K 1 . Now, we take the last four (4) elements of the 4th row of K and we place them as the remaining elements in the first column of K 1 . Thus we have 28 elements in the first column of K 1 . Now the first four (4) elements of the 4th row are placed as the first four elements in the second column of K 1 and the elements of 5th, 6th, 7th rows of K appear in descending order in the second column of matrix K 1 . We continue this process of placing the remaining elements of the matrix K as the remaining elements of the matrix K 1 . Thus we have a 28×8 Matrix, K 1 given by Now the subkey K 2 is generated from K 1 as follows: Here, we place the first element of 28th row of K 1 as the element in the first row, first column of the matrix K 2 . We then place the 2nd element of the 28th row of K 1 as the 2nd element of the first column of K 2 . Similarly we place all the remaining six (6) elements of the 28th row of matrix K as the remaining elements of first column of K 2 Proceeding in a similar, we place the elements belonging to 27th and 26th rows of K 1 as the next sixteen (16) elements in the first column of K 2 . We now take the elements of the 25 th row belonging to columns 1, 2, 3 and 4 and place them as the remaining 4 elements of the first column of K 2 . At this stage, we have 28 elements in the first column of K 2 . Similarly the remaining elements of 25th row of the columns 5, 6, 7 and 8 of K 1 are placed as the first four elements of the second column of K 2 . Proceeding in this way we place all the remaining elements of K 1 and obtain K 2 .
K 3 is generated from K 2 like the way K 1 was generated from K. In a similar manner K 5 , K 7 , K 9 …..K 19 are generated from K 4 , K 6 , K 8 …K 18 respectively. K 4 is generated from K 3 using the same procedure adopted in the generation of K 2 from K 1 . In the same manner K 6 , K 8 , K 10 …K 20 are generated from K 5 , K 7 , K 9 …K 19 respectively.
We now use the subkey of each iteration (K 1 , K 2 …K 20 ) which are of size 28×8 matrix and convert each of them in to 14×8 matrix (K′ 1 , K′ 2 … K′ 20 ) by using addition modulo 2 8 . This was done as follows.
First two rows of 28×8 matrix (K 1 ) are taken and addition modulo 2 8 is performed on these two rows to give rise to a single row of 8 bits, this is the first row of a new matrix, K′ 1 of size 14×8, then the next two rows i.e. 3rd and 4th rows of K 1 are taken and addition modulo 2 8 is performed on these two rows, which gives a row of 8 bits which is the 2nd row of K′. In a similar manner the 5th and 6th, 7th and 8th…up to 27th and 28th rows are taken and addition modulo 2 8 is performed on each pair of rows there by generating the complete matrix K′ 1 , of size 14×8.
Let us now consider the plaintext P 0 comprising 16 characters, given by P 0 = network security (9) By taking the 7 bit ASCII code of each character, we have 112 bits of plaintext given by. Let us take the first 8 bits of P 0A given by equation (10) and place them as the first row of a matrix P of size 14×8, the next 8 bits of P 0A are taken and placed as the 2nd row of same matrix. Similarly, we continue this process and generate the matrix P until we exhaust all the 112 bits of the plaintext, P 0A The ciphertext, C corresponding to the plaintext P 0 is generated using the following procedure: It may be noted here that each row of the matrix C i is obtained by performing the modulo 2 8 addition on each row of the matrix K′ I and the corresponding row of the matrix C′ i-l , i.e., C i = (K′ i + C′ i-l ) mod 2 8 (12) where C′ 0 = P and C′ i-l is a permutation of C i-l . Here i takes the values 1-20. Further, C′ 20 is a permutation of C 20 . The procedure used for permutation is the same as we have obtained the matrix K 1 from K. Thus C = C′ 20 , which is given by where C is the ciphertext, which is a 14×8 matrix for the plaintext P 0 given by Eq. 9.
We concatenate each row of C and get 112 ciphertext bits corresponding to 112 plaintext bits. Decryption of the cipher is done using the same algorithm as encryption with the input being the ciphertext. The decryption subkeys used are the additive modular arithmetic inverses of the encryption subkeys with the key roles being reversed from that of the encryption.

ENCRYPTION AND DECRYPTION ALGORITHMS
In what follows, we briefly present the algorithms for subkey generation, encryption, decryption and additive inverse of the subkeys respectively.

Algorithm for key generation:
Step 1: Initialize key, K 0 by reading 16 characters Step 2: Generate K 0A , ASCII code of each character from K 0 Step 3: Find K′ 0 from K 0A Step 4: Find K′ from K 0 ′ Step 5: Find K from K′ Step 6: Find K i from K i-l for i = 1-20 where K 0 = K Step 7: Find K i ′ from K i for i = 1-20 Algorithm for encryption: Step 1: Read P, K′ I for i = 1-20 Step 2: for i = 1-20 do C i = (K′ i + C i-l ′) mod 2 8 , where C 0 ′ = P Step 3: C = C 20 ′ Algorithm for decryption; Step 1: Read C, (K′ i ) −1 for i = 1-20 Step 2: Find C 20 from C 20 ′ Step 2: For i = 20-1 do Step 3: P = C 0 ′ Additive inverse of the subkeys: Step 1: Read K′ i for i = 1-20 Step 2: For i = 1-20 do

ILLUSTRATION OF THE CIPHER
Let us consider the plaintext, P 0 given by P 0 = network security (15) This consists of 16 characters including one blank space. By using the ASCII code of each character, we represent the plaintext, P 0 in terms of seven (7) binary bits. Let us now place the seven (7) binary bits of each character in a row and obtain a matrix, P 0A given by Let us now convert the matrix, P 0A into a 14×8 matrix, P given by Let us now consider key, K 0 comprising 16 characters, which is given by Each character can be represented by the corresponding 7 bit ASCII numbers. Hence we get 112 bits (16×7 = 112) and place them in the form of a 28×4 matrix. As discussed in section 2, we generate 20 subkeys K 1 , K 2 ...K 20 . From these, we get K′ i for i = 1 to 20 by adopting the modulo 2 8 addition.
We obtain the corresponding modulo arithmetic inverse (K′ i ) −1 for each K′ i , wherein i takes values 1-20 satisfying the relation Now on using the algorithm for encryption discussed in section 3.2, we obtain the ciphertext, C corresponding to the plaintext P 0 given by Eq. 9. Thus The receiver who has previously obtained the key from the sender uses the decryption algorithm discussed in section 3.3 by using additive modulo inverse 2 8 as shown in Eq. 19, obtains (K′ i ) −1 for i = 1-20 and retrieves the original plaintext.
As the process of encryption involving the iterative scheme contains equations which mix the plaintext and the key very thoroughly, it can therefore, be anticipated that the cipher cannot be broken by any cryptanalytic attack. Now we discuss briefly the cryptanalysis.

CRYPTANALYSIS
After the first iteration, the ciphertext can be written as: At the end of 2nd iteration the cipher can be written as: It is to be noted here that C′ 1 is the permutation of C 1 while K′ 2 is the permutation of the subkey, K 2 . Similarly as the number of iterations takes the value 1-20 we have: C 20 = (K′ 20 + C′ 19 ) mod 2 8 (23) and C = C 20 ′ Knowing the final value of C for a given P (known plaintext attack), neither K 20 ′ nor C 19 ′ can be obtained. Hence, the cipher can never be broken by the known paintext attack (or) for that matter by any other crypt analytic attack.

AVALANCHE EFFECT
The strength of any cryptographic algorithm is often evaluated by testing the algorithm against the avalanche effect. Here, we test our algorithm by considering the avalanche effect. Consider the plaintext given by P = management study (25) The above plaintext is of 16 characters, which corresponds to 112 ASCII bits.
Taking the key The corresponding 112 ASCII bits of K is given by: On using the key generation algorithm discussed in section 3.1 and the encryption algorithm discussed in section 3.2, we obtain the ciphertext C corresponding to the plaintext P given by Now changing the sixth character in the plaintext from e to d, which is equivalent to changing the plaintext in a single bit position, i.e., managdment study and using the same key, K 0 mentioned in 26 and applying the encryption algorithm discussed in section 3.2, we obtain the ciphertext given by On comparing the Eq. 28 and 29, it is readily observed that the two ciphertexts C and C new differ in 65 bits out of 112 bits. This indicates that the algorithm exhibits a strong avalanche effect. On using the key generation algorithm discussed in 3.1 and the encryption algorithm discussed in section 3.2, we obtain the ciphertext C k new , for the plaintext P given by 25 and the new key given by 30, i.e., On comparing the two ciphers given by 28 and 31, it can be seen that these two ciphers differ in 62 bits out of 112 bits.
This once again clearly proves that the algorithm has a pronounced avalanche effect.

EXPERIMENTAL RESULTS AND CONCLUSIONS
In this study, we have developed a block cipher for a block of size 112 bits. Here, the plaintext size is taken as 112 bits and key size is also taken as 112 bits.
In the generation of the cipher, the plaintexts and the subkey generated in each iteration are permuted. The subkey generation involves a very complex procedure, which provides enough confusion.
The algorithm, which involves the permutation of intermediate ciphertexts and the permutation of subkeys generated in each iteration, provides a very strong diffusion. Hence, the algorithm provides a very strong diffusion and confusion, which are the fundamental requirements for a block cipher.
In this study, we have briefly discussed the cryptanalysis and have logically deduced that no cryptanalytic attack can break the cipher Towards the end, we have evaluated the algorithm against the avalanche effect, which clearly indicated that this algorithm is indeed a very strong one with inherent cryptographic strength and it cannot be broken by any cryptanalytic attack.