ISSN 2249-6343 International Journal of Computer Technology and Electronics Engineering (IJCTEE) Volume 1 , Issue 2 Hyper Secure Cryptographic Algorithm to Improve Avalanche Effect for Data Security Parvez khan Pathan, Basant Verma Abstract— Encryption is the main aspect of cryptography for the secure transformation, which is the focus of this paper. Because it is important to note that while cryptography is necessary for secure transformation of information, it is not by itself sufficient. In this Paper, we are showing a new encryption key model and there decryption part, this encryption algorithm model which will improve avalanche effect as well as execution time as compared with various encryption algorithms. The proposed models will secures information from all the anomalies which is constantly follow-up over public network. It significantly simplifies model written as security purpose while improving the efficiency of cryptography algorithm. Index Terms— Encryption, Decryption, Cryptography, Avalanche Effect. I. INTRODUCTION In this paper I have done study of two Encryption algorithms (TEA and MTEA) [1]. I have also study of key size, security setting and efficiency, speed of an algorithm, and more important thing avalanche effect of an algorithm which is main point of my research. After the detailed study of each algorithm, I am presenting some prone and crones of each algorithm and how we can remove theses with the help of my proposed idea. This Paper is dividing in three sections. In section-I, I am presenting brief description about cryptography, in section-II, I am presenting my proposed work, and in section-III, I am presenting comparison of results and conclusion. Cryptography is the science of writing in secret code and is an ancient art; the first documented use of cryptography in writing dates back to circa 1900 B.C. when an Egyptian scribe used non-standard hieroglyphs in an inscription [2]. There should no be surprise that new forms of cryptography came soon after the widespread development of computer communications. In data and telecommunications, cryptography is necessary when communicating over any un-trusted medium, which includes just about any network, particularly the Internet. Within the context of any application-to-application communication, there are some specific security requirements. Authentication: It is used for identification. Privacy/confidentiality: No one can see message during transmission. Integrity: Integrity protects massage from any type of alteration. Non-repudiation: sender really sent this message; this type of assuring is provided by non-repudiation. Cryptography is the technique for security. It is protecting information form alteration as well as providing authentication. Basically there are three type of cryptography technique are using to accomplish these goals: private/secret key (or symmetric) cryptography, public-key (or asymmetric) cryptography, and hash functions, each of which is described below. Initially simple plan text is converting into cipher text using encryption algorithm and reverse process of encryption is convert cipher text into plan text. The Tiny Encryption Algorithm (TEA) [6, 7 and 8]:- The Tiny Encryption Algorithm is one of the fastest and most efficient cryptographic algorithms in existence. It was developed by David Wheeler and Roger Needham at the Computer Laboratory of Cambridge University. It is a Feistel cipher which uses operations from mixed (orthogonal) algebraic groups - XOR, ADD and SHIFT in this case. This is a very clever way of providing Shannon's twin properties of diffusion and confusion which are necessary for a secure block cipher, without the explicit need for P-boxes and S-boxes respectively. It encrypts 64 data bits at a time using a 128-bit key. It seems highly resistant to differential cryptanalysis, and achieves complete diffusion (where a one bit difference in the plaintext will cause approximately 32 bit differences in the cipher text) after only six rounds. Performance on a modern desktop computer or workstation is very impressive. TEA has a few weaknesses. Most notably, it suffers from equivalent keys—each key is equivalent to three others, which means that the effective key size is only 126 bits [18]. As a result, TEA is especially bad as a cryptographic hash function. This weakness led to a method for hacking Microsoft's Xbox game console, where the cipher was used as a hash function. TEA is also susceptible to a related-key attack which requires 223 chosen plaintexts under a related-key pair, with 232 time complexity [17]. Because of these weaknesses, the XTEA cipher was designed. 140 Fig. 1-Two Feistel rounds (one cycle) of TEA ISSN 2249-6343 International Journal of Computer Technology and Electronics Engineering (IJCTEE) Volume 1 , Issue 2 Encipher procedure: - v is the data to encrypted (input), w is the encrypted data (output), k is the secret key (like a password). n is the number of iterations void encipher(const unsigned long *const v,unsigned long *const w, const unsigned long * const k) { register unsigned long y=v[0],z=v[1],sum=0,delta=0x9E3779B9, a=k[0],b=k[1],c=k[2],d=k[3],n=32; Fig.2- MTEA Single Round While (n-->0) { sum += delta; y += (z << 4) +a ^ z+sum ^ (z >> 5)+b; z += (y << 4) +c ^ y+sum ^ (y >> 5)+d; } w[0]=y; w[1]=z; } Decipher procedure: - v is the data to decipher (input), w is the deciphered data (output), the source data, k is the secret key. n is the number of iterations. void decipher(const unsigned long *const v,unsigned long *const w, const unsigned long * const k) { register unsigned long y=v[0],z=v[1],sum=0xC6EF3720, delta=0x9E3779B9,a=k[0],b=k[1], c=k[2],d=k[3],n=32; /* sum = delta<<5, in general sum = delta * n */ while(n-->0) { z -= (y << 4)+c ^ y+sum ^ (y >> 5)+d; y -= (z << 4)+a ^ z+sum ^ (z >> 5)+b; sum -= delta; } w[0]=y; w[1]=z; } Takes 64 bits of data in v[0] and v[1]. Returns 64 bits of data in w[0] and w[1]. Takes 128 bits of key in k[0] - k[3]. Here a newly developed technique named, “A Modification of TEA Block Cipher Algorithm for Data Security (MTEA)” [1] is discussed. The MTEA algorithm [1]: - MTEA is a symmetric block cipher designed to correct weaknesses in TEA. Like TEA, MTEA is a 64-bit block Feistel network with a 128-bit key and 64 rounds. Figure (2) shows the block diagram of an MTEA single round. In proposed algorithm the magic constants, which was added to the right half of input in TEA, will be eliminated. The proposed algorithm used RC6 [14] algorithm as key generation algorithm to overcome the pervious TEA algorithm weaknesses. The use of sub keys that are generating from RC6 will be diffusion the right half which will be then added to the left half. Key schedule: - The key schedule is an important component of a block cipher; it computes the round keys from the external key. The sub key generation process is designed to preserve the entire entropy of the key and to distribute that entropy uniformly throughout the sub keys. It is also designed to distribute the set of allowed sub keys randomly throughout the domain of possible sub keys. E8 is 8 rounds of RC6 encryption, used for sub key generation. Let K be an inserted key which is 128 bits. Then is used following recursion:K0=K,K1=E8(K0),...,Ki=E8(Ki-1),...K31=E8(K3 0). These sub keys K0, K1… K31 is used as input for each single round for proposing MTEA encryption algorithm. Each of sub keys is 128 bits i.e. K0 (k [0], k[1], k[2], k[3] ). The underlying philosophy behind RC6 is that simplicity of design yields algorithm that is both easier to implement and using a combination of operation. The Proposed algorithm is designed to adapt RC6 algorithm which is used a full menu of “strong operations” supported in modern computers to achieve better security properties, high speed, and implementation flexibility. RC6 algorithm will be used primitive operations (add, subtract, multiply, exclusive-or, and data-dependent rotate). The sub keys must be pre-computed before any data encryption or decryption. The proposed method of sub key calculation requires all sub keys to be calculated advance of any data encryption. In fact, it is impossible to calculate the last sub key without calculating every sub key that comes before. This implementation of pre-computing the sub keys is for increased speed. II. PROPOSED APPROACH I. Our proposed technique emphasizes on improving avalanche effect as compare TEA, and MTEA. Avalanche effect is the phenomenon that describes the effect in the output cipher text if a single or few bits are changed in the plain text. This change that occurs at the output should be sufficient if we want to create a secure algorithm. Our proposed idea “A Modern Block Cipher Approach of Cryptography to Improved Avalanche Effect for Data Security” will extent deals with some of the drawbacks of TEA, MTEA that includes usage of key as it is without inducing any confusion in the primary key I will change by generating two sub-keys from the primary key, similarly the key size 128 bits of proposed concept are fixed. The variation in key introduces the aspect of uncertainty which is a positive aspect when it comes to encryption. 141 ISSN 2249-6343 International Journal of Computer Technology and Electronics Engineering (IJCTEE) Volume 1 , Issue 2 both written by the random number. For DPSK evaluation II. Evaluation Method:-This Paper covers investigation of mode, there are two parameters: the number of evaluated cryptography theory, description of 2 symmetric block cipher plaintexts and the size of evaluated plaintext, where the algorithms and lists design decisions/guidelines (desirable for number of evaluated plaintexts is the number of plaintexts that cryptographic algorithms) inferred from this investigation. are generated randomly and the size of evaluated plaintext can be chosen from six kinds that mention above. In this mode, we This work may be useful in several contexts: do n cycles (that is, the number of the evaluated plaintexts). III. V. Designing ‘secure’ symmetric block cipher algorithms. Reason behind using symmetric encryption This can serve as a reference text for cryptographic concepts and constructs, symmetric ciphers and design algorithm:-Basically private key scheme only one key is used decisions (which act as guidelines in designing secure for encryption and decryption. In this scheme sender and receiver have already know about key before exchange algorithms). Designing symmetric cipher algorithms that suit information securely. Main advantages of private key scheme different applications (like bulk encryption, random bit are its security and high speed. generation, hashing etc.) by choosing proper subset of Proposed Algorithm Steps: design decisions and guidelines. Designing symmetric cipher algorithms that are Input 128 bit plain text and 128 biit key convert in to binary implementable on different platforms (like form. microcontrollers, microprocessors, VLSI hardware, Divide plain text in to two block of 64 bit each. LPT & RPT MATLAB, .Net, JAVA etc.) by choosing proper subset Divide key to two block of 64 bit each. LK & RK. of design decisions and guidelines. Perform 4 bit RCC to Left plain text block. XOR result of step 4 with LK. With the help of literature survey I have analysed that I can XOR RPT and RK. improve efficiency and security of block cipher encryption. In Perform 3 bit RCC to result of step 5 this paper I am concluding study of a research paper which Perform 5 Bit LCC to Right key. defines above and found that every body is trying to Break 128 bit key to 16 sub key of 8 bit from K0……K15. comparing avalanche effect of known cryptography algorithm XOR result of step 5 with K0. with his proposed work. I have found in the survey that the XOR result of step 6 with K3. key size of various algorithms is not fixed which cause of poor Perform XOR result of step 6 with result of step 7 efficiency is. Here I am presenting theory concept of working Perform XOR result of step10 with step 8. model as well as implementation results in section - III. For Perform XOR result of step 8 with K7->fourth block avalanche effect of the known cryptographic algorithm, it is Perform XOR result of step 13 with k15first block necessary to describe the detailed evaluation method, as Perform XOR result of step 12 with k11-> third block Perform XOR result of step 11 with result of step 14 illustrated in Fig.1. We defining one evaluating modes to find whether the key and the plaintext have impact on time Divide the result of step 11 in to two part of 32 bit each consuming of cryptographic algorithms: DPSK (different perform 2 bit LCC to first and 2 Bit RCC to second plaintexts in the same key). Block.-->second block Performing XOR to all the block we get cipher text. Detailed Encryption Architecture of Proposed Algorithm:- Fig 3: Evolution Model IV. This evaluation method will compare Avalanche effect of encrypting plaintext with different cryptographic algorithms, Memory Utilization and CPU Utilization. During processing, the content of the plaintext and the key will be 142 Fig 4:- Encryption Architecture of Proposed Algorithm ISSN 2249-6343 International Journal of Computer Technology and Electronics Engineering (IJCTEE) Volume 1 , Issue 2 Detailed Decryption Architecture of Proposed III. RESULT ANALYSIS Algorithm:TEA Results:Key: - networkssecurity Text: - cryptographyalgo Binary Data:001111110011111100111010000111000111101000011010 001111110011111100001001011011100001111000111111 001111110011100101010000001111110011111101110111 001011100011111100111111001111110011111101011110 010110100100110000011111001111110011111101101000 001111110011111100111111011001110111101100111111 011001110111110100001010000001100001010000111111 001111110011111101110010000100100011111100111111 001111110011111100111111000011000011111101101010 001100000011111100110011001111110010100100000010 01111000000101110011111100111111 Key:- networkssecurity Fig 5:- Decryption Architecture of Proposed Algorithm Change Text: - cryptograpkyalgo Crypto analysis:-Here I am analyzes the security of the Binary Data:Proposed encryption algorithm. Proposed encryption 001111110011111100111010000111000111101000011010 algorithm is a new block cipher recently designed by us with 001111110011111100001001011011100001111000111111 the help our guide. It has a 128 bits word size, a 16 number of 001111110011100101010000001111110011111101110111 rounds, and 128 bits-length secret key. In Proposed 001011100011111100111111001111110011111101011110 encryption algorithm, the secret key is used to fill an 010110100100110000011111001111110011111101101000 expanded key table which is then used in encryption. Both our 001111110011111100111111011001110111101100111111 differential and linear attacks on proposed encryption 011001110111110100001010000001100110101100111111 algorithm recover every bit of the expanded key table without 001111110100110001010111000000110011111100111111 any exhaustive search. However, the plaintext requirement is 001111110011111100111111000011000011111101101010 strongly dependent on the number of rounds. For 128-bit 001100000011111100110011001111110010100100000010 block size, our differential attack on towel-round proposed 01111000000101110011111100111111 encryption algorithm uses 245 chosen plaintext pairs (about Avalanche Effect:- 17 the same as DES), while 262 pairs are needed for 12-round proposed encryption algorithm. Thus, we conclude that 12 MTEA Results: rounds are sufficient to make differential and linear Key:- networkssecurity Text:- cryptographyalgo cryptanalysis of proposed encryption algorithm impractical. Binary Data:Characteristic of Proposed Algorithm: 001111110011111100111010000111000111101000011010 1) No complex architecture: Proposed algorithm has simple 001111110011111100001001011011100001111000111111 architecture so implementation can be done easily. 001111110011100101010000001111110011111101110111 2) Flexibility: Proposed algorithm provides flexibility in 001011100011111100111111001111110011111101011110 terms of Key. We can modify our key size from 128 bit to 010110100100110000011111001111110011111101101000 512 and more. 001111110011111100111111011001110111101100111111 3) Reliability: Proposed algorithm is very reliable, 011001110111110100001010000001100001010000111111 eavesdropper can not easily understand. 001111101111110111001000010010001111110011111100 4) Efficiency: Proposed algorithm is highly efficient due to 111111001111110011111100001100001111110110101000 its simple architecture. 110000001111110011001100111111001010010000001001 5) Response Time: Amount of time it takes from when a 111000000101110011111100111111 request was submitted until the first response is Key: - networkssecurity produced. Proposed algorithm has very short response Change Text: - cryptograpkyalgo Binary Data:time. 6) Memory Utilization: Proposed Algorithm has required 001111110011111100111010000111000111101000011010 001111110011111100001001011011100001111000111111 very less memory space to execute. 7) CPU Utilization: Proposed algorithm has good CPU 001111110011100101010000001111110011111101110111 001011100011111100111111001111110011111101011110 utilization. 8) Security: Key size of proposed algorithm is started from 010110100100110000011111001111110011111101101000 128 bits which is more then sufficient because 2128 time to 001111110011111100111111011001110111101100111111 011001110111110100001010000001100110101100111111 decrypt which is very hard and its impossible task for an 001111110100110001010111000000110011111100111111 eavesdropper or intruder or hacker. 143 ISSN 2249-6343 International Journal of Computer Technology and Electronics Engineering (IJCTEE) Volume 1 , Issue 2 001111110011111100111111000011000011111101101010 Security: - Here table-2 shows the algorithms settings used 001100000011111100110011001111110010100100000010 in this experiment. These settings are used to compare the 01111000000101110011111100111111 results initially with the result obtained from. Avalanche Effect: - 22 Table-3 Algorithms Security Settings Proposed Algorithm: Key: - networkssecurity Enter Text: - cryptographyalgo Binary Data:010010111101001100011101000100010110101111000101 000011101010101100000001110001011000000011111111 11100000101000000100001101111110 Key: - networkssecurity Change Text: - cryptograpkyalgo Binary Data:001000001000101111110010000110110100001011100010 000101110101011101111100100010101110010000100000 00110000101011011001110111011110 Avalanche Effect: - 68 Algorithm Key Size(Bits) Block Size (Bits) Security Required for (100%) Proposed Algorithm 128 64 3 MTEA 128 64 65 TEA 128 64 75 From the study we have analyze that TEA, MTEA algorithm support maximum security settings in other way. We have also analyzed that longer key lengths mean more effort to eavesdropper to crack encrypted information. Evaluated results are tested on 1 GB memory. Result Analysis I am using .Net implementation to present an evaluation system. For avalanche effect evaluation of the known cryptographic algorithm and my proposed cryptography algorithm, it is necessary to describe the detailed evaluation method, as illustrated in Figure- 3. Here I am taking only one evaluating modes to find whether the key and the plaintext have impact on time consuming of cryptographic algorithms: DPSK (different plaintexts in the same key) [46].For our experiment, we use a laptop Pentium® Dual-Core CPU T4400 @2.20Ghz and 32-bit Operating System, in which performance data is collected. In the experiments, the laptop encrypts a text data and calculates avalanche effect and execution time. Two parameters we are using for avalanche effect one is numeric value of avalanche effect and second is percentage ratio of avalanche effect which is shown in table 1. Avalanche Effect with Percentage: In this graph, the evaluated mode is DPSK, and the fixed size of the evaluated plaintexts of 128bits. At this point, the key length of all Encryption algorithm is 128-bit, which is equals to that of the proposed algorithm (PA). Table-1:- Avalanche Comparison of various Encryption Algorithm Encryption Technique Avalanche Effect % Proposed Algorithm 68 97 MTEA 22 32 TEA 17 25 Execution Time: - Table 2 that describes the execution time in the above discussed algorithms. Fig 6:- Avalanche and Percentage Comparison of TEA, MTEA with Proposed Algorithm Avalanche Effect: In this graph, the evaluated mode is DPSK, and the fixed size of the evaluated plaintexts of 128bits. At this point, the key length of all Encryption algorithm is 128-bit, which is equals to that of the proposed algorithm (PA). Table-2:- Execution Time Comparison of various Encryption Algorithm Plain Text File Size of 14 KB sample1.txt TEA 0:00:13 MTEA 0:00:12 Proposed Algorithm 0:00:09 Fig 7:- Avalanche Effect Comparison of TEA, MTEA with Proposed Algorithm 144 ISSN 2249-6343 International Journal of Computer Technology and Electronics Engineering (IJCTEE) Volume 1 , Issue 2 REFERENCES Execution Time: - In this graph I am presenting execution time of various encryption algorithms as well as our proposed [1] Gaidaa Saeed Mahdi “A Modification of TEA Block Cipher Algorithm for Data Security (MTEA)” published in Eng. & Tech. Vol No 29, algorithm. No.5. Journal, 2011. Fig 8:-Execution Time Comparison of TEA, MTEA with Proposed Algorithm Fig 9:-Execution Time Comparison of TEA, MTEA with Proposed Algorithm [2] Bruce Shnier “Applied Cryptography Second Edition Protocols. Algorithms, and Source, and Source Code in C”, John Wiley and Sons, Inc., 1996. [3] Thilo Zieschang, “Combinatorial Properties of Basic Encryption Operations”, Advances in Cryptology Eurocrypt’97, International Conference on the Theory And Application of Cryptographic Techniques Konstanz, Germany, May 11-15, 1997 Proceedings, Springer, 1997. [4] Hong S., Deukjo Hong, Youngdai Ko, Donghoon Chang, Wonil Lee, and Sangjin Lee , “Differential cryptanalysis of TEA and XTEA.” In Proceedings of ICISC 2003, 2003. [5] Ko Y., Seokhie Hong, and Wonil Lee, “Related key differential attacks on 26 rounds of XTEA and full rounds of GOST.”In Proceedings of FSE '04, Lecture Notes in Computer Science, Springer-Verlag, 2004. [6] Hernández, Julio César; Isasi, Pedro; Ribagorda, Arturo ,"An application of genetic algorithms to the cryptoanalysis of one round TEA". Proceedings of the 2002 Symposium on Artificial Intelligence and its Application, 2002. http://www.actapress.com/PDFVie [7] Hernández, Julio César; Sierra, José María; Isasi, Pedro; Ribargorda. Arturo, "Finding efficient distinguishers for cryptographic mappings, with an application to the block cipher TEA". Proceedings of the 2003 Congress on Evolutionary Computation. 2003. [8] Hernández, Julio César; Sierra, José María; Ribagorda, Arturo; Ramos, Benjamín; Mex-Perera, J. C. "Distinguishing TEA from. [9] Rivest, R.L., Robshaw, M.J.B., Sidney, R., & Yin, Y.L (1998a). “The RC6 Block Cipher.”URL: ftp://ftp.rsasecurity.com/pub . [10] Knudsen, L.R., & Meier, W. (1999). “Correlations in RC6.” URL: http://csrc.nist.gov/CryptoToolkit/aes/round2/comments/19990812-lk nudsen.pdf. [11] Nechvatal, J., Barker, E., Bassham, L., Burr, W., Dworkin, M., Foti, J., & Roback, E. (2000). “Report on the Development of the Advanced Encryption Standard (AES).” National Institute of Standards and Technology. [12] O. Baudron, H. Gilbert, L. Granboulan, H. Handschuh, A. Joux, P. Nguyen, F. Noilhan, D. Pointcheval, T. Pornin, G. Poupard, J. Stern, & S. Vaudenay (1999). “Report on the AES candidates.” The Second Advanced Encryption Standard Candidate Conference (National Institute of Standards Technology. [13] Rivest R.L (1997). “The RC5 Encryption Algorithm.” URL:http://theory.lcs.mit.edu/%7Erivest/Rivest-rc5rev.pdf. Fig 10:-Security of TEA, MTEA with Proposed Algorithm Security: - In this graph I am presenting security setting of various encryption algorithms as well as our proposed algorithm. IV. CONCLUSION AND FUTURE WORK The difference of efficiency between our “proposed algorithm” and “TEA”, “MTEA” is very high. If the security and efficiency is of primary concern then one can use our proposed algorithm. From the above discussion we can clearly see that the proposed algorithm has better Avalanche Effect as well as execution time than any of the other compeering algorithms and hence can be incorporated in the process of encryption of any plain text. [14] Rivest, R.L., Robshaw, M.J.B., Sidney, R., & Yin, Y.L (1998b). “The Security of the RC6 Block Cipher.” [15] Rivest, R.L., Robshaw, M.J.B., Sidney, R., & Yin, Y.L (2000a). “The Case for RC6 as the AES.”AES Round 2 Public Comment. [16] Shimoyama, T., Takeuchi, K., & Hayakawa, J. (2000). “Correlation Attack to the Block Cipher RC5 and the Simplified Variants of RC6.” 3rd AES Conference (AES3). [17] Kelsey, John; Schneier, Bruce; Wagner, David (1996). "Key-schedule cryptanalysis of IDEA, G-DES, GOST, SAFER, and Triple-DES". Lecture Notes in Computer Science 1109: 237–251. doi:10.1007/3-540-68697-5_19. [18] Kelsey, John; Schneier, Bruce; Wagner, David (1997). "Related-key 145 cryptanalysis of 3-WAY, Biham-DES, CAST, DES-X NewDES, RC2, and TEA". Lecture Notes in Computer Science 1334: 233–246. doi:10.1007/BFb0028479.