*3.3.1 Step 1: conversion and arrangement*

This encryption algorithm can process any "n" plaintext ASCII characters from input file. The input string is split into 8 bytes of m parts. Then, the input ASCII message bit is put up against the standard ASCII table. The plaintext value is then replaced by its ASCII value according to the table. This encryption encompasses numbers, special characters and even spaces.

**Figure 4.** *System architecture diagram of HGEA.*

#### *Hybrid Approaches to Block Cipher DOI: http://dx.doi.org/10.5772/intechopen.82272*

Since this algorithm will be using the entire ASCII table for referencing, the case sensitivity of the message will play a very crucial part in output ciphertext.

After tabulating the plaintext in comparison with the ASCII table, ASCII and decimal values of the plaintext can be derived. Now, the decimal value has to be converted to binary value to move on to the next step. For binary values that do not reach the 8-bit mark, 0 s are added to the back. The obtained binary value is then tabulated in the form of an 8 8 matrix as shown in **Table 3**.

Since HGEA is a symmetric key encryption, a 64-bit binary key is shared for both encryption and decryption processes. These keys are also tabulated in the form of an 8 8 matrix of message bits.

Consider key bits as 64 random bits tabulated in an 8 8 matrix form, similar to message bits.

#### *3.3.2 Step 2: transformation*

The main concept of hybrid graphical encryption algorithm cipher is to realize the input data into 8 8 bit matrix pattern. Then, divide it into four 4 4 matrices by putting it up against XY axis quadrant graph. Again, each quadrant 4 4 matrix is expanded into four possible 16-bit 4 4 matrices by XOR operation with four 4 4 subkeys. Further quadrant selection operation selects one 4 4 bit matrix output for further processing. Finally, after the final XOR operation, each set of 4 4 bit matrix is plotted into XY axis plot

The binary conversion of data and its graphical representation are the key aspects of hybrid graphical encryption algorithm cipher. The five steps involved in the encryption process are: (1) conversion and arrangement, (2) transformation,

This encryption algorithm can process any "n" plaintext ASCII characters from input file. The input string is split into 8 bytes of m parts. Then, the input ASCII message bit is put up against the standard ASCII table. The plaintext value is then replaced by its ASCII value according to the table. This encryption encompasses

(3) selection, (4) plotting, and (5) arrangement and conversion.

(**Figure 4**).

**Figure 4.**

**148**

*System architecture diagram of HGEA.*

**3.3 The encryption illustrated**

*Computer and Network Security*

*3.3.1 Step 1: conversion and arrangement*

numbers, special characters and even spaces.

In this step, initially the 8 8 matrix is divided into quadrant form as shown in **Table 4(a)**. The 8 8 matrix formed from plaintext is divided into four 4 4 matrices, that is, quarters named as M1, M2, M3 and M4 and generalized as Mi Similarly, the 8 8 matrix form key is also divided into four quarters named as K1, K2, K3 and K4, generalized as Ki.

Again, Mi which is a 4 4 matrix is converted into 8 8 matrix by performing XOR operation of Mi with K1, K2, K3 and K4. M1 is XOR-ed with K1, K2, K3 and K4 and obtained value is populated to 1st, 2nd, 3rd and 4th quadrants, respectively, as shown in **Table 4(b)**.



**Table 3.** *Conversion of plaintext to binary.*


**Table 4.** *Reference XY axis and sample conversion of 8 8 matrix into 4 4 matrix.*

Then shifting operation is performed as follows:

For M1 ⊕ K1, M2 ⊕ K1, M3 ⊕ K1 and M4 ⊕ K1 1st row, R1 no shift 2nd row, R2 1 bit 3rd row, R3 2 bits 4th row, R4 3 bits For M1 ⊕ K2, M2 ⊕ K2, M3 ⊕ K2 and M4 ⊕ K2 1st row, R1 3 bit 2nd row, R2 no shift 3rd row, R3 1 bit 4th row, R4 2 bits For M1 ⊕ K3, M2 ⊕ K3, M3 ⊕ K3 and M4 ⊕ K3 1st row, R1 2 bits 2nd row, R2 3 bits 3rd row, R3 no shift 4th row, R4 1 bit For M1 ⊕ K4, M2 ⊕ K4, M3 ⊕ K4 and M4 ⊕ K4 1st row, R1 1 bit 2nd row, R2 2 bits 3rd row, R3 3 bits 4th row, R4 no shift

*3.3.3 Step 3: selection*

As its name suggests, first quadrant selection operation is performed, which gives the selected quadrant value for further processing. In this step, only one 4 � 4 matrix value is selected for further processing for each Mi value. Thus, step. 2 and 3 via series of confusion and logical operations propose four possible 4 � 4 matrix values for further processing, and finally, the selection step selects only one 4 � 4 matrix value for further processing. For this purpose, counters are deployed, which will count the number of 1 s in each quadrant of subkeys K1, K2, K3 and K4 for M1', M2', M3' and M4', respectively. Then, the total number of 1 s in corresponding Ki is divided by 4 and the remainder is found.

$$Remainder(R\_i) = \frac{Total\\_no\\_of\\_1s\\_in\\_K\_i}{4} \tag{1}$$

Depending upon the total number of 1 s in Ki for corresponding Mi, the selected quadrant value will be decided.

$$Q\_s = R\_i + \mathbf{1} \tag{2}$$

Finally, Mi' XOR Ki' is performed and Mi" is generated. Thus, matrices M1\*, M2\*,

<sup>∗</sup> Mis <sup>⊕</sup> Ki

Now, consider the standard matrix distribution of any 4 � 4 matrix as shown in **Table 6**. Each of the four M1\*, M2\*, M3\* and M4\* values will have different transformations when plotted in XY graph. Values of M1" will be populated to 1st quadrant as per graph position, which can be realized by permutation as shown in

In this way, the values of M1", M2", M3" and M4" are populated to the reference

Finally, we have M1", M2", M3" and M4" plotted in 8 � 8 matrix form. Now, each row of the matrix is converted from binay to decimal and then to plaintext

' (3)

Mi

M3\* and M4\* matrix are generated.

*DOI: http://dx.doi.org/10.5772/intechopen.82272*

*Hybrid Approaches to Block Cipher*

*3.3.5 Step 5: arrangement and conversion*

*Reference standard 4* � *4 transposition matrix distribution.*

*Plotting the values to standard XY axis graph.*

*Permutations P1 and P2 for M1 and M2.*

*3.3.4 Step 4: plotting*

**Tables 7** and **8**.

XY graph.

**Table 5.**

**Table 6.**

**Table 7.**

**151**

For instance, let us consider that for M1, the total number of 1 s in K1 is calculated (consider 7, for example) and divided by 4. Now, considering the remainder which will be 3, hence Q <sup>s</sup> = 4, the fourth quadrant is selected for further processing and denoted as Mis.

After this, we pass the Ki via permutation box "P," which will shift the bit position of standard matrix as per bit position of randomly selected transposition matrix shown in the **Table 5**.

Finally, Mi' XOR Ki' is performed and Mi" is generated. Thus, matrices M1\*, M2\*, M3\* and M4\* matrix are generated.

$$\mathbf{M}\_{\mathrm{i}}^{\*} \leftarrow \mathbf{M}\_{\mathrm{is}} \oplus \mathbf{K}\_{\mathrm{i}}^{'} \tag{3}$$
