Hybrid Approaches to Block Cipher

This chapter introduces two new approaches to block cipher — one is DNA hybridization encryption scheme (DHES) and the other is hybrid graphical encryption algorithm (HGEA). DNA cryptography deals with the techniques of hiding messages in the form of a DNA sequence. The key size of data encryption standard (DES) can be increased by using DHES. In DHES, DNA cryptography algorithm is used for encryption and decryption, and one-time pad (OTP) scheme is used for key generation. The output of DES algorithm is passed as an input to DNA hybridization scheme to provide an added security. The second approach, HGEA, is based on graphical pattern recognition. By performing multiple transformations, shifting and logical operations, a block cipher is obtained. This algorithm is influenced by hybrid cubes encryption algorithm (HiSea). Features like graphical interpretation and computation of selected quadrant value are the unique features of HGEA. Moreover, multiple key generation scheme combined with graphical interpretation method provides an increased level of security.


Introduction
There exist a number of cryptographic techniques for secure data communication [1], but many are vulnerable to attacks.With the failure of cryptographic algorithms like data encryption standard (DES), new approaches to cipher security are needed [2,3].A cryptographic scheme can be made more secure by combining it with relatively secure techniques.Theoretically, this hybridization method can be applied to any cryptographic scheme but block ciphers provide more rounds for working in terms of permutation and combination.
DNA-based method [4,5] is one such approach that along with one-time pad (OTP) scheme can be applied to DES.OTP is the only unbreakable encryption that uses polyalphabetic randomness for the key [6].So, OTP can be combined with DNA cryptography by taking longer message and key size (≥ 64 bit) so as to make brute force attack difficult and impractical [7].
As the first part of this chapter, DNA hybridization encryption scheme (DHES) is described, in which an improved algorithm named DDHO (that stands for DES and DNA-based hybridization with OTP) is proposed.
Another technique that can be combined with DES is "hybrid graphical encryption algorithms (HGEA), which is based on graphical interpretation by pattern recognition and transformation like hybrid cubes encryption algorithm (HiSea) [8,9].Most of the graphical encryption algorithms use mono-alphabetic or polyalphabetic substitution and their range of input values is limited.But, HGEA uses a range of characters consisting of 256 possible values.It also produces output of 256 characters for single-input plaintext.Moreover, HGEA can be used by software as well as realized by implementing hardware devices.
The rest of this chapter is organized as follows.Section 2 describes DNA hybridization encryption scheme in detail.This section also presents performance analysis of algorithms and methods used by DHES.Similarly, Section 3 presents hybrid graphical encryption with illustrations.This section also presents performance analysis of encryption and decryption algorithms used by HGEA by comparing it with that of DES.

DNA hybridization encryption scheme (DHES)
2.1 DNA cryptography DNA cryptography is an emerging field of cryptography that deals with hiding data in terms of DNA sequences [10,11].It can be implemented by using modern biological techniques as tools and DNA as information carrier to fully exert the inherent advantage of high storage density and high parallelism to achieve encryption [12].The DNA cryptography uses the concept of molecular approach in traditional cryptographic technique to make the system more secure.Some terminologies used in biochemical operations of DNA cryptography are annealing, melting, ligation, amplification, cutting, gel electrophoresis, oligonucleotides, etc. [13,14].

DNA hybridization
DNA hybridization is a process in which two single-stranded DNAs (ssDNAs) are combined together to produce a single DNA sequence [15].The two ssDNAs are complementary to each other and are of same length.That means: if one strand of DNA is 3 0 to 5 0 , then the other strand must be 5 00 .If not, then the hybridization of the pairs fails and fragmentation occurs.To remove such fragmentation, fragment assembly has to be done [16].

OTP scheme
OTP is the only potentially unbreakable encryption method.Plaintext encrypted using an OTP cannot be retrieved without the encryption key.The key generated by an OTP must be random and generated by a non-deterministic, non-repeatable process.The key also must be never re-used.In OTP scheme, the length of the key must be greater than or equal to the length of the plaintext.

Key generation
OTP is used for key generation.The generated key is unique and only the sender and receiver know the key and that generated key is destroyed once it is used.The key generated by computers is not truly random; so, a pseudorandom number generator function is used for generating the key and the generated key is in the DNA.The size of ssDNA key is greater than the original size of the message, which results in a longer size of the encrypted message and that makes it difficult to break.The length of the key is the result of multiplication of the number of bits required to represent each character and total number of bits in the input message.

Encryption
The encryption process consists of the following steps (Figure 1): 1. Choose the plaintext to be sent.

2.
Replace each letter in the text with its opposite alphabetical character excluding "A" and "a" (replacement algorithm), numerical values and symbols.Then, convert the plaintext into ASCII code and then into binary code.
3. The ssDNA OTP key is generated.(The length of the key depends on (i) the length of binary plaintext and (ii) the number of bits required to represent each nucleotide.) 4.Scan the binary sequence from left to right to find the occurrences of 0 and 1 s.
• If the first digit of binary bit is 1, then this bit is compared with last n bases of OTP key and complementary data of DNA form are produced as the encrypted message where n is the number of bits required to represent the nucleotides.• 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 is the number of bits required to represent nucleotides.
5. Repeat step 3 for all the occurrences of 1 and 0 s and put them all together to obtain the resulting ciphertext.

Decryption
The decryption process consists of the following steps (Figure 2): 1. Take n leftmost bits from the ciphertext and compare with the last n bits of the OTP key.
• If they are found to be complementary, then binary bit "1" is formed; else, a binary "0" is formed.
2. Repeat step 1 for the subsequent n-bit sequence in the ciphertext till the end and put them all together to obtain the binary digit.
4.Arrange the binary digits (in n bits form) and convert the value into ASCII code.
5. Convert the ASCII code to plaintext.Computer and Network Security

DDHO algorithm
Here, the proposed algorithm DDHO (combination of DES algorithm and DNAbased hybridization and OTP scheme) is explained in detail.First, the DES algorithm is performed on the given plaintext and key and the resultant ciphertext is taken as an input to the DNA hybridization and OTP scheme.Further, the algorithm proceeds as per the above illustrated DNA hybridization and OTP scheme.
The encryption algorithm for DDHO is as follows: 1.A block of 64 bits is permutated by an initial permutation called IP.
2. Resulting 64 bits are divided into two equal halves, each containing 32 bits, left and right halves.
3. The right half goes through a function F (Feistel function) 4.The left half is XOR-ed with output from the F function obtained in the above step.
5. The left and right halves are swapped (except the last round).
6.In the last round, apply an inverse permutation (IP-1) on both halves that is the last step which produces a ciphertext in binary form.
7. The ssDNA OTP key is generated and the length of this key depends upon the length of binary plaintext and the number of bits required to represent each nucleotide.
8. Start scanning the binary sequence, obtained in step 6, from left to right to find the occurrences of 0 and 1 s.
• If first digit of binary bit is 1, then this bit is compared with last n bases of OTP key and complementary data of DNA form are produced as the encrypted message where n is the number of bits required to represent the nucleotides.
• If the first digit of the 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 is the number of bits required to represent nucleotides.9. Repeat step 8 for all the occurrences of 1 and 0 s and put them all together to obtain the resulting ciphertext.
The decryption algorithm of DDHO is the reverse process of DDHO encryption algorithm.

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).
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.
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 Computer and Network Security 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.

Hybrid graphical encryption
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 between two parties for encryption and decryption of data.

Hybrid cubes encryption algorithm (HiSea)
As the HGEA is inspired from hybrid cubes encryption algorithm (HiSea), it is explained here in brief.
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 H i,j , i {1, 2, 879} and j {1, 2, 3, 4}, defined as follows: H i,j = MC i,j Â MC i + 1,j where the MC i,j is a jth layer of ith magic cube [17-19].

Hybrid graphical encryption algorithm (HGEA)
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 obtains decision parameters based on remainder value and exploit the correlation between distributions of two graphical patterns for manipulation of intermediate data.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 (Figure 4).

The encryption illustrated
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, (3) selection, (4) plotting, and (5) arrangement and conversion.

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.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.

Step 2: transformation
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 M 1 , M 2 , M 3 and M 4 and generalized as M i Similarly, the 8 Â 8 matrix form key is also divided into four quarters named as K 1 , K 2 , K 3 and K 4 , generalized as K i .
Again, M i which is a 4 Â 4 matrix is converted into 8 Â 8 matrix by performing XOR operation of Mi with K 1 , K 2 , K 3 and K 4 .M 1 is XOR-ed with K 1 , K 2 , K 3 and K 4 and obtained value is populated to 1st, 2nd, 3rd and 4th quadrants, respectively, as shown in Table 4(b).Then shifting operation is performed as follows: 2 bits 3rd row, R 3 3 bits 4th row, R 4 no shift

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 K 1 , K 2 , K 3 and K 4 for M 1 ', M 2 ', M 3 ' and M 4 ', respectively.Then, the total number of 1 s in corresponding K i is divided by 4 and the remainder is found.
Depending upon the total number of 1 s in K i for corresponding M i , the selected quadrant value will be decided.
For instance, let us consider that for M 1 , the total number of 1 s in K 1 is calculated (consider 7, for example) and divided by 4. Now, considering the remainder which will be 3, hence Q s = 4, the fourth quadrant is selected for further processing and denoted as M is .
After this, we pass the K i 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, M i ' XOR K i ' is performed and M i " is generated.Thus, matrices M 1 *, M 2 *, M 3 * and M 4 * matrix are generated.

Step 4: plotting
Now, consider the standard matrix distribution of any 4 Â 4 matrix as shown in Table 6.Each of the four M 1 *, M 2 *, M 3 * and M 4 * values will have different transformations when plotted in XY graph.Values of M 1 " will be populated to 1st quadrant as per graph position, which can be realized by permutation as shown in Tables 7 and 8.
In this way, the values of M 1 ", M 2 ", M 3 " and M 4 " are populated to the reference XY graph.

Step 5: arrangement and conversion
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 Hybrid Approaches to Block Cipher DOI: http://dx.doi.org/10.5772/intechopen.82272characters by referring the standard ASCII table, as illustrated in Table 9, and this is our ciphertext.

The decryption process
Decryption is also performed in the same manner as encryption but in reverse order.The steps involved in decryption are: (1) conversion and arrangement, (2) plotting, (3) selection, (4) transformation and (5) arrangement and conversion.

The algorithms
In this section, the algorithms of HGEA encryption and decryption are explained step by step.First, the encryption algorithm is given below.Output: Ciphertext C, where C can be decrypted using key K to its corresponding plain-text P. 3: for, (i = 0; i < 4; i++); Table 8.Permutations P 3 and P 4 for M 3 and M 4 .
Example conversion of ASCII cipher into binary.

Performance evaluation
Performance measurement criterion is the time taken by the algorithms to perform encryption and decryption of the input text file, that is, the encryption computation time and decryption computation time.[20]

Computation time for encryption and decryption
The encryption computation time of the encryption algorithm is the time taken by the algorithm to produce the ciphertext from the plaintext.The encryption time can be used to calculate the encryption throughput of the algorithms.
The decryption computation time is the time taken by the algorithms to produce the plaintext from the ciphertext.The decryption time can be used to calculate the decryption throughput of the algorithms.
Computer and Network Security features like graphical interpretation and computation of selected quadrant value are the unique features of this algorithm, which is different from existing standard encryption algorithms.Also, the multiple transformation, multiple key generation provides, combined with graphical interpretation provided added security to the algorithm.The realization of computation model proved the proposed encryption algorithm is practically realizable.Further comparative analysis of computation time of realized model was made.
Although the comparative analysis of proposed model is proven to be more secure, the model was slower than DES.However, the processing units of modern day computer system are extremely high and developing rapidly, the implementation of HGEA possible.

Figure 1 .
Figure 1.Flow chart of DNA hybridization encryption.

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

Algorithm 1 :
HGEA encryptionInput: Plaintext p, which is divided into n 8-bit characters.Each 8-bit value ASCII character is converted into 64-bit binary values in 8 Â 8 matrix Mp, which is the input for the algorithm.Similarly, 64-bit random key (K) is used.

Table 1 .
Plaintext of different contents for DDHO algorithm.

Table 2 .
Performance of DDHO with plaintexts of different lengths and contents.

Table 3 .
Conversion of plaintext to binary.

Table 6 .
Plotting the values to standard XY axis graph.

Table 7 .
Permutations P 1 and P 2 for M 1 and M 2 .
M 4 ⊕ K 3 and M 4 ⊕ K 4 ; Ciphertext C which is divided into n 8-bit characters.Each 8-bit value ASCII character is converted into 64-bit binary values in 8 Â 8 matrix M c , which is the input for the algorithm.Similarly, 64 bit random key (K) is used.