*2.2.6 Analysis of DDHO*

The plaintexts chosen for encryption and decryption using the DDHO algorithm are highly diverse. They include short and long texts, purely alphabetical text and text containing alphabets and many other characters. The plaintexts of diverse types are selected, so that they are very representative. With regard to difference of the lengths of the text, four plaintexts with increasing size are selected (**Table 1**).

• If the first digit of binary bit is 0, then no operation is carried out and the next n bases in the OTP key from reverse order are ignored where n

5. Repeat step 3 for all the occurrences of 1 and 0 s and put them all together to

1. Take n leftmost bits from the ciphertext and compare with the last n bits of

• If they are found to be complementary, then binary bit "1" is formed;

2. Repeat step 1 for the subsequent n-bit sequence in the ciphertext till the end

4.Arrange the binary digits (in n bits form) and convert the value into ASCII code.

is the number of bits required to represent nucleotides.

The decryption process consists of the following steps (**Figure 2**):

and put them all together to obtain the binary digit.

obtain the resulting ciphertext.

*Flow chart of DNA hybridization decryption.*

*Computer and Network Security*

else, a binary "0" is formed.

3. Apply reverse replacement algorithm.

5. Convert the ASCII code to plaintext.

*2.2.4 Decryption*

**144**

**Figure 2.**

the OTP key.

The first plaintext contains only alphabetical and digital characters, the second plaintext contains only non-alphabetical and non-digital characters, and the third and the fourth plaintexts contain a combination of characters.

By applying the above test dataset to the DDHO algorithm, the original plaintext size, the resulting ciphertext size and the key size are examined, together with the encryption and decryption time. The encryption and decryption processes are performed five times for each plaintext and the average system time is obtained and listed to make the evaluation of time fair.

The results obtained are shown in the **Table 2**.

The number of bits needed to store the plaintext in ASCII format is eight times that of the length of the plaintext. For the output of DES in binary form, the number of nucleotides used to represent each bit is 10 so that the total size of key is 10 times the length of binary bits (i.e. output of DES). For instance, consider a plaintext of length 64 bits. The output of DES algorithm is also 64 bits, so the length of OTP key is equal to 64 10 bits = 640 bits. The length of ciphertext is 260 bits means that there are only 26 occurrences of number 1 in the output of DES algorithm (i.e. plaintext of DDHO) and the remaining 64 26 = 38 bits are 0 s. Similarly, consider a plaintext of length 400 bits, the output of DES algorithm is equal to 400∕64 = 6.25 blocks of 64 bits. However, this length of plaintext is not an exact multiple of 64 bits. Therefore, it adds 48 bits 0 s at the end of plaintext and makes 7 blocks of 64 bit. The output of 7 blocks of 64 bits of DES is equal to 7 64 bits = 448 bits and hence the length of OTP key in DDHO algorithm is equal to 448 10 bits = 4480 bits. Similarly, there are only 102 occurrences of 1 s in the output of DES algorithm (i.e. plaintext of DDHO) and remaining bits have 0 s. The length of ciphertext depends upon how many 1 s (binary bit) are present in the plaintext. The more the number of 1 s, the more the length of the ciphertext.

key; this is because the length of ciphertext depends upon the number of 1 s present

The hybrid graphical encryption algorithm (HGEA) is a unique graphical encryption algorithm based on mathematical transformations and graphical pattern realization. It is a symmetric key encryption in which a single 64-bit key is shared

As the HGEA is inspired from hybrid cubes encryption algorithm (HiSea), it is

Hybrid cubes encryption algorithm (HiSea) is the symmetric non-binary block cipher. The encryption and decryption keys, plaintext, ciphertext and internal operation in the encryption or decryption processes are based on the integer numbers. HiSea encryption algorithm was developed by Sapiee Jamel in 2011. The plaintext size for the encryption process is 64 bytes ASCII characters. Hybrid cube (HC) is generated based on the inner matrix multiplication of the layers between the two magic cubes (MCs). HC of order 4 4 is a matrix Hi,j, i {1, 2, 879} and j {1, 2, 3, 4}, defined as follows: Hi,j = MCi,j MCi + 1,j where the MCi,j is a jth layer

HGEA performs the operation, like in HiSea, of generating 4 4 matrix, then mixing it with key and again mixing of rows and column. Further, the algorithm

correlation between distributions of two graphical patterns for manipulation of

obtains decision parameters based on remainder value and exploit the

between two parties for encryption and decryption of data.

**3.1 Hybrid cubes encryption algorithm (HiSea)**

*Analysis of encryption and decryption times of DDHO algorithm.*

**3.2 Hybrid graphical encryption algorithm (HGEA)**

The encryption and decryption times shown in **Table 2** and **Figure 3** show that the DDHO algorithm's encryption and decryption times for the different lengths of plaintext increase slower with the changes in the length of plaintext. This reveals that the processing time can be very fast even for relatively very long plaintext.

in the input plaintext.

*Hybrid Approaches to Block Cipher*

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

**Figure 3.**

explained here in brief.

of ith magic cube [17–19].

intermediate data.

**147**

**3. Hybrid graphical encryption**

As shown in **Table 2**, the ciphertext lengths are proportional to the corresponding plaintext lengths. The size of key increases hugely as the size of plaintext increases. The length of ciphertext is small as compared to the size of the


**Table 1.**

*Plaintext of different contents for DDHO algorithm.*


#### **Table 2.**

*Performance of DDHO with plaintexts of different lengths and contents.*

The first plaintext contains only alphabetical and digital characters, the second plaintext contains only non-alphabetical and non-digital characters, and the third

By applying the above test dataset to the DDHO algorithm, the original plaintext size, the resulting ciphertext size and the key size are examined, together with the encryption and decryption time. The encryption and decryption processes are performed five times for each plaintext and the average system time is obtained and

The number of bits needed to store the plaintext in ASCII format is eight times

that of the length of the plaintext. For the output of DES in binary form, the number of nucleotides used to represent each bit is 10 so that the total size of key is 10 times the length of binary bits (i.e. output of DES). For instance, consider a plaintext of length 64 bits. The output of DES algorithm is also 64 bits, so the length of OTP key is equal to 64 10 bits = 640 bits. The length of ciphertext is 260 bits means that there are only 26 occurrences of number 1 in the output of DES algorithm (i.e. plaintext of DDHO) and the remaining 64 26 = 38 bits are 0 s. Similarly, consider a plaintext of length 400 bits, the output of DES algorithm is equal to 400∕64 = 6.25 blocks of 64 bits. However, this length of plaintext is not an exact multiple of 64 bits. Therefore, it adds 48 bits 0 s at the end of plaintext and makes 7 blocks of 64 bit. The output of 7 blocks of 64 bits of DES is equal to 7 64 bits = 448 bits and hence the length of OTP key in DDHO algorithm is equal to 448 10 bits = 4480 bits. Similarly, there are only 102 occurrences of 1 s in the output of DES algorithm (i.e. plaintext of DDHO) and remaining bits have 0 s. The length of ciphertext depends upon how many 1 s (binary bit) are present in the plaintext. The more the number of 1 s, the more the length of the ciphertext. As shown in **Table 2**, the ciphertext lengths are proportional to the corresponding plaintext lengths. The size of key increases hugely as the size of plaintext increases. The length of ciphertext is small as compared to the size of the

and the fourth plaintexts contain a combination of characters.

listed to make the evaluation of time fair.

*Computer and Network Security*

The results obtained are shown in the **Table 2**.

**Dataset Description**

*Plaintext of different contents for DDHO algorithm.*

**Dataset Length of**

**plaintext (bits)**

**Table 1.**

**Table 2.**

**146**

Test 1 Only alphabetical and digital characters

Test 3 Combination of characters Test 4 Combination of characters

> **Length of ciphertext (bits)**

*Performance of DDHO with plaintexts of different lengths and contents.*

Test 2 Only non-alphabetical and non-digital characters

**Size of key (bits)**

Test 1 64 260 640 234 413 Test 2 400 1020 4480 244 426 Test 3 800 2330 8320 290 465 Test 4 1600 3740 16,000 517 703

**Encryption time (milliseconds)**

**Decryption time (milliseconds)**

**Figure 3.** *Analysis of encryption and decryption times of DDHO algorithm.*

key; this is because the length of ciphertext depends upon the number of 1 s present in the input plaintext.

The encryption and decryption times shown in **Table 2** and **Figure 3** show that the DDHO algorithm's encryption and decryption times for the different lengths of plaintext increase slower with the changes in the length of plaintext. This reveals that the processing time can be very fast even for relatively very long plaintext.
