<<

© IJEDR 2019 | Volume 7, Issue 2 | ISSN: 2321-9939

Avalanche Effect: A Judgement Parameter of Strength in Symmetric Block

Bannishikha Banerjee Assistant Professor Computer Engineering, P.P. Savani University, Surat, India

Abstract – Sharing of data between different nodes needs security. The data is confidential and it is important that no one other than the authorized users can access it. To ensure this, it is important that an provides sufficient to ensure . In this paper, a comparison and analysis has been done among several cryptographic on the basis of their size, execution time and avalanche effect using sensitivity and key sensitivity test. Key Sensitivity Test means when a single bit of the key is changed keeping the plaintext constant, a change in the is noticed. If at least 50% of the ciphertext changes then it is called Avalanche effect. Similarly, in Plaintext Sensitivity Test when a single bit of plaintext is changed keeping the key constant, it is expected that a strong cryptographic algorithm will show avalanche effect.

Index Terms – , Diffusion, Confusion, Confidentiality, Avalanche Effect.

1 INTRODUCTION Cryptography is one of the most important aspects when we with network security. ‘Crypto’ means something that is secret or hidden [1]. Cryptography is the science of writing something in a secret manner so that any malicious party is not able to understand it. This ensures that no one other than the intended party can understand the message [1]. The major parameters for providing security are: : It is the process of confirming that the user or the node is who it claims to be. This is done by using biometrics like face recognition, finger prints, passwords, security questions, digital signatures etc. [1] Confidentiality: It is the process of making sure that no one, other than the authorized user can read the message. This is done by changing the plaintext by encrypting it [1]. Integrity: It is the process of making sure that the data received by the receiver is exactly what it was sent by the sender. It did not get modified or tampered with. This is done by using hash functions [1]. Data Freshness: It is the process of making sure that the data received is the recent data and not some stray or old one. This is done by providing timestamps [1]. In this paper, analysis of various symmetric key block ciphers along with my , Banerjee [2] to provide confidentiality, has been done. Confidentiality is the process of making sure that the message can be read only by the legitimate or the valid user and not any other user or attacker. The secrecy of the message can be maintained by using cryptography. The message or plaintext is encrypted, using a key and the cryptographic algorithm [2]. This generates a ciphertext, which is transferred from the source node to the destination node. Since the packet is encrypted, so even if a malicious user gets its hands on the packet, it still cannot understand it, or decrypt it without the key. The message or the plaintext is encrypted using an algorithm to generate a ciphertext. This is done with the use of a secret key, which specifies how the message is to be encoded. Any adversary that can see the cipher text should not be able to determine anything about the original message. An authorized party, however, is able to decode the cipher text using a decryption algorithm which usually requires a secret decryption key. Encryption schemes are divided into two groups: Symmetric-key: In these schemes same key is used for encryption and decryption it is also known as the secret key encryption [2]. Asymmetric key: In these schemes different keys are used for encryption and decryption it is also known as the public-key encryption [2]. To determine the security of an algorithm, it is important to see whether avalanche effect is taking place or not. Avalanche effect is the phenomenon in which diffusion and confusion of an algorithm is more than 50%. If changing just one bit of the plaintext or the key, while keeping the other constant, changes at least 50% of the ciphertext then it shows that avalanche effect is taking place [2].

2 ALGORITHMS is based on a known as the Feistel block cipher. This was a block cipher developed by the IBM cryptography researcher in the early 70’s [3]. It consists of a number of rounds where each round contains bit-shuffling, nonlinear substitutions using S-boxes and exclusive OR operations. It encrypts the data in blocks of size 64 bits each. Same encryption algorithm and encryption key are used for encryption as well as decryption. Key is 56 bits long. DES is based on two fundamental attributes of cryptography Diffusion and Confusion which is achieved using substitution and permutation. It consists of 16 rounds [3]. In each round, key and data bits are shifted, permuted, XORed and sent through, 8 s-

IJEDR1902026 International Journal of Engineering Development and Research (www.ijedr.org) 116

© IJEDR 2019 | Volume 7, Issue 2 | ISSN: 2321-9939 boxes. In the first round, the 64-bits plaintext is handed over to the initial permutation (IP). Then IP generates two halves, left plaintext and right plaintext. Each go through 16 rounds. At last, the two halves are re-joined. Decryption is same process which is performed in reverse order. AES is an iterative rather than . It is based on substitution–permutation network. It comprises of a series of operations which are linked, some of which involve replacing inputs by specific outputs using substitutions and others involve shuffling bits around using permutations [5]. AES performs all its computations on per bytes basis rather than bits. Hence, AES treats the 128 bits of a plaintext block as 16 bytes. These 16 bytes are arranged in four columns and four rows for processing as a matrix [5]. The number of rounds in AES algorithm is variable and it depends on the length of the key, unlike DES. AES uses 10 rounds for 128-bit keys, 12 rounds for 192-bit keys and 14 rounds for 256-bit keys. Each of these rounds uses a different 128-bit round key, which is calculated from the original AES key [6]. is a symmetric key block cipher that can be used as a drop-in replacement for DES or IDEA. It takes a variable-length key which ranges from 32 bits to 448 bits, making it suitable for both domestic and exportable use [5]. Blowfish was designed in 1993 by as a comparatively fast, free alternative to existing encryption algorithms. Since then it has been studied and it is slowly gaining attention for use as a strong encryption algorithm. is a symmetric block cipher; a single key is used for encryption and decryption. Twofish has a block size of 128 bits, and accepts a key of any length up to 256 bits. It is flexible as it can be used in network applications where keys are changed frequently and in applications where there is little or no RAM and ROM available. In [2], a 256 bits key is generated and it is divided in two subkeys, left half and right half. A plaintext of block size 128 bits is chosen. This plaintext is XORed with the most significant, i.e. left half of the key. Now the XORed plaintext is divided into individual bytes. Then the most significant byte of the right half of the key is chosen and the number of 1s in it is counted. If the number of 1s in the byte is even, then swap each bit of the corresponding plaintext byte with its consecutive bit [2]. If the number of 1s in the byte is odd, then swap each bit of the corresponding plaintext byte with the bit next to its consecutive bit. In [2] take the plaintext block size as 128 bits, and of 256 bits. Then divide the 256 bits pseudorandom bit sequence into two 128 bits halves, left half and right half. This is because, during crossover and mutation a byte will be chosen for every consecutive byte of the right half of the pseudorandom bit sequence. Then XOR the 128 bits plaintext with most significant 128 bits pseudorandom bit sequence. Count the no. of 1’s i.e i in each byte of least significant half of 128 bits of pseudorandom bit sequence and perform crossover operation. Then count the number of 1’s in the resulting crossovered plaintext and convert it to binary. Then XOR that binary with the crossovered plaintext. Now using i as the index, flip the bits of the resulting XORed plaintext. Do this to the entire 128 bits block. Decryption will be the reverse of the encryption process.

IJEDR1902026 International Journal of Engineering Development and Research (www.ijedr.org) 117

© IJEDR 2019 | Volume 7, Issue 2 | ISSN: 2321-9939

Fig. 1. Encryption

IJEDR1902026 International Journal of Engineering Development and Research (www.ijedr.org) 118

© IJEDR 2019 | Volume 7, Issue 2 | ISSN: 2321-9939

Fig. 2. Decryption 3 IMPLEMENTATION AND RESULTS The algorithms are implemented in Jupyter Notebook using Python. Time consumption is calculated and analysis shows that Blowfish and Banerjee [2] are the most time efficient algorithms. By performing plaintext and key sensitive test, the following

IJEDR1902026 International Journal of Engineering Development and Research (www.ijedr.org) 119

© IJEDR 2019 | Volume 7, Issue 2 | ISSN: 2321-9939 tables show that AES, Twofish and Banerjee [2] show the occurrence of avalanche effect which ensures the security of the encryption algorithms.

Table 1. Execution Time

Algorithm Block Size (bits) Key Size (bits) Time (ms)

Blowfish 128 32-448 14.587 DES 64 56 19.354 AES 128 128, 192, 256 21.268 Twofish 64 128 21.998 Banerjee 128 256 15.563

Table 2. PlaintextKey1 Pair Plaintext: banerjeesaha Key: 12345678 Algorithm Ciphertext Blowfish 75F8F5F18AAA1DB903A754CCC0372A89

DES 91DEE425ECAB68226077D06D552F6506

AES E830891936F4A961AABF828F717E4846

Twofish 0A26557E6EE629932A6AEA3E329A8B0C

Banerjee DB260112334112A560EEFD15EB3C3423

Table 3. Plaintext2 Key1 Pair Plaintext: banerjeesahb Key: 12345678 Algorithm Ciphertext Blowfish 75F8F5F18AAA1DB9AD906D1FB9764C60

DES 91DEE425ECAB68229C9D230046F292B3

AES 049BB44D522E0F20D8DE1433332FEB9E

Twofish 44FC88F4BEC933271D4D11170AF5390D

Banerjee CB140518105E19S0107EFDF5EB3CA23D

Table 4. Plaintext1 Key2 Pair Plaintext: banerjeesaha Key: 12345679 Algorithm Ciphertext

Blowfish 9E05C18234F19C3A9680664F5CECB314

DES 91DEE425ECAB68226077D06D552F6513

AES 70121A56C8090392C8B1F83EBC420816

Twofish 94B99AAC1309670ED829A198B981A666

Banerjee EB2685ABCC16EFAA560EAE1D5EB3C309

IJEDR1902026 International Journal of Engineering Development and Research (www.ijedr.org) 120

© IJEDR 2019 | Volume 7, Issue 2 | ISSN: 2321-9939

Table 5. Sensitivity Test

Algorithm Plaintext Sensitivity (%) Key Sensitivity (%)

Blowfish 31.25% 28.12% DES 37.50% 21.87% AES 93.75% 90.62% Twofish 87.50% 84.37% Banerjee 62.50% 59.37%

4 CONCLUSION AND FUTURE WORK The results show that time consumption of Blowfish and Banerjee [2] is minimum and when it comes to security, the performance of AES, Twofish and Banerjee [2] is good. These algorithms show above 50% diffusion and confusion, leading to avalanche effect. Hence ensuring security. In future, better algorithm can be designed by combining the best features of all these algorithms.

REFERENCES [1] Shailesh N. Sisat, Shrikant J. Honade, Review on Security and Privacy in Wireless Sensor Network, Volume 2, Issue 3, IJARCSSE-2014, March 2014, p. 21-26. [2] Bannishikha Banerjee, Jalpa T. Patel, A Symmetric Key Block Cipher to Provide Confidentiality in Wireless Sensor Networks, Volume 15 Issue 1, INFOCOMP Journal of Computer Science, June 2016, p. 12-18. [3] Tingyuan Nie, Teng Zhang, A study of DES and Blowfish encryption algorithm, IEEE – TENCON, January 2010, p.23- 26. [4] Ako Muhammad Abdullah, Advanced Encryption Standard (AES) Algorithm to Encrypt and Decrypt Data, IEEE – Cryptography and Network Security, June 2017, p.11-17 [5] M. Anand Kumar, Karthikeyan Subramanian, Investigating the Efficiency of Blowfish and Rejindael (AES) Algorithms, Computer Network and Information Security, 2012, p. 22-28. [6] Heba Harahsheh, Mohammad Qatawneh, Performance Evaluation of Twofish Algorithm on IMAN1 Supercomputer, International Journal of Computer Applications, June 2018, p.1-7. [7] Bruce Schneier, John G Kelsey, Doug Whiting, David Wagner, The Twofish Encryption Algorithm, September 2000, p. 1-69. [8] Nishtha Mathur, Rajesh Bansod, AES Based Text Encryption Using 12 Rounds with Dynamic Key Selection, Elsevier Procedia Computer Science, Volume 79, 2016, p. 1036-1043. [9] Kamanashis Biswas, Vallipuram Muthukkumarasamy, Elankayer Sithirasenan, and Kalvinder Singh, A Simple Lightweight Encryption Scheme for Wireless Sensor Networks, ICDCN, Springer-2014, p.499-504 [10] Kamanashis Biswas, Vallipuram Muthukkumarasamy, Kalvinder Singh, An Encryption Scheme Using Chaotic Map and Genetic Operations for Wireless Sensor Networks, IEEE sensors journal, IEEE-2014, p. 581-588. [11] Nivedita Mukherjee, A Dynamic Cryptographic Algorithm to Provide Nodal Level Security in Wireless Sensor Network, IEEE-2010, p.189-194. [12] S. Lucks, Ciphers Secure against Related-Key Attacks, Proc. of Fast Software Encryption, LNCS 3017, 2004, pp. 359- 370. [13] Mitul K. Patel, Vasundhara V. Uchhula, Bannishikha Banerjee, Comparative Analysis of Routing Protocols in MANET Based on Packet Delivery Ratio using NS2, IJARCSSE, Volume 3, Issue 11, November 2013, p. 172-177. [14] Mitul K. Patel, Vasundhara V. Uchhula, Bannishikha Banerjee, Comparative Evaluation of AODV, DSDV and AOMDV based on end-to-end delay and routing overhead using Network Simulator, IJCSIT, Vol. 5 (2), 2014, p. 1638- 1641 [15] Bannishikha Banerjee, Jalpa T. Patel, Fault Tolerance and Congestion Control in Mobile AD – HOC Networks: A Survey, International Journal of Advance Engineering and Research Development, Volume 2, Issue 10, October-2015, p. 10-15. [16] Priyadarshini Patil, Prashant Narayankar, Narayan D.G, Meena S.M, A Comprehensive Evaluation of Cryptographic Algorithms: DES, 3DES, AES, RSA and Blowfish, Elsevier Procedia Computer Science, Volume 78, 2016, p. 617-624. [17] Biham, E., Birykov, A., Shamir A., of Reduced to 31 Rounds Using Impossible Differentials. J. of Cryptology, 291–311 (2005). [18] Canteaut, A., Linear Feedback Shift Register. In: Encyclopedia of Cryptography and Security, pp. 355–358. Springer (2002). [19] NIST, Download Documentation and Software, http://csrc.nist.gov/groups/ST/toolkit/rng/documentation software.html, 2014. [20] . Fang, Y. Liu and X. Zhao, A chaos-based secure cluster protocol for WSNs, Kybernetika, vol. 44(4), pp. 522–533, 2008. [21] J.Yang, D. Xiao, and T. Xiang, Cryptanalysis of a chaos block cipher for WSN, Communication Nonlinear Science Numerical Simulation, vol. 16(2), pp. 844–850, Elsevier, 2011. [22] Claude E. Shannon, A Mathematical Theory of Cryptography, Bell System Technical Memo MM 45-110-02, Sept. 1, 1945.

IJEDR1902026 International Journal of Engineering Development and Research (www.ijedr.org) 121