2014 Sixth International Conference on Computational Intelligence and Communication Networks
A Cryptographic Approach Based On Integrating Running key in Feedback Mode Of ElGamal System Priya Nalwaya Government Woman Engineering College Ajmer, India
[email protected]
Varun P Saxena Government Woman Engineering College Ajmer ,India Varunsaxena
[email protected]
Keywords-One Time Pad; Cipher Feedback; Running Key Cipher; Random Functions and Random Numbers; ElGamal Cipher.
INTRODUCTION
ElGamal System was described by Taher ElGamal in 1985.ElGamel encryption [1] is one of fundamental publickey cryptosystems. ElGamal algorithm is simple and efficient but its chosen-plaintext security is clearly understood. Security overhead in terms of bandwidth, however often become obstacles against its publicity wide use. ElGamal cipher text are typically at least as many bits as the prime modules p. If the plain text size is small comparatively to the size of p, the relative size overhead becomes worse. For example assuming p is a 2048 bit prime, in a hybrid encryption scenario of ElGamal it is approximately ten times the plaintext size. In the future for large public key size more powerful mathematical analyst and computational power methods will be available. More specifically, let’s consider the case where a server should receive from multiple clients, each sharing a secret-key encrypted under hybrid encryption. If number of clients grow linearly in the above example, the size overhead also increases linearly. Thus, efficiency can be improved if router is given an accessory to the multiple cipher text [2]. 978-1-4799-6929-6/14 $31.00 © 2014 IEEE DOI 10.1109/CICN.2014.157 10.1109/.157
Walchand Institute Of Technology Solapur ,India
[email protected]
In 1976, Diffie and Hellmann (DH) [3] proposed the well known public-key distribution scheme, based on the discrete logarithmic problem [4] , to enable two parties to establish a common secret key based on their exchanged public keys. However, their scheme did not provide authentication mechanism for the exchanged public keys. In past years, NIST has published a series of security standards under Federal Information Processing Standard (FIPS) [5]. FIPS Digital Signature Standard (DSS) [6] introduced Digital Signature Algorithm (DSA) Series of security Standard publish by the national institute and technology (NIST) under Federal Information processing Standard (FIPS). Arazi [7] proposed integrating Diffie-Hellmann (DH) key exchange into the Digital Signature Algorithm (DSA). As the original ElGamal algorithm has its own security [8] disadvantage that only one random number is used, in order to improve its security, the schema presented in this paper improved the demerit by adding a random number to the original one and increasing difficulty of deciphering key [9].Federal Information Processing Standard publication 81decribes some of the common standards and common mode for DES operation which is private key cryptosystem in nature. Idea behind this work presented here is to apply concept of feedback operation mode in public key encryption. A simplest approach to do this is by using public key schema in message feedback mode [10] . In the next section we define terminology, in third section we proposed the algorithm in forth section we analysis the performance and in last section we conclude the paper.
Abstract—In this ElGamal Digital Signature schema, security is very challenging and with time it is becoming a serious problem, hence the modifications for this algorithm have been proposed. This paper produce more efficient and effective schema of ElGamal algorithm .This work pertains to a rigid blended process of cryptographic application based upon ordered use of both private key cryptography and public key cryptography by using single public-private key pair. We construct a cryptographic schema by using running key cipher and ElGamal algorithm. In this work we used an approach of symmetric cipher feedback into an asymmetric cryptography schema rather than simple message feedback mode. Main issue with message feedback approach which arrives is that it does not consider the frequency of English alphabet which may be used for cryptanalysis. Further, more of the application relies over x-or of the message block in feedback mode, which seems impractical in the current scenario. For symmetric encryption, we used a running key cipher and for asymmetric module, we used ElGamal in feedback mode. In this schema by using single step of ElGamal we provide security to the entire message block involved, and further we switch to light weight process so the degree of security is maintained and performance is achieved.
I.
Pulkit Nalwaya
II.
TERMINOLOGY AND DEFINITION
A. One Time Pad In cryptography, the onetime pad [11] is type of encryption process. It has been proven to be impossible and infeasible to break if used properly. Each bit/character of plain text is enciphered by a module addition with bit/character from a randomly chosen key having same length equal to the plain text, resulting in cipher. In the case the key is really random, the cipher is impossible and infeasible to decrypt or break with out knowing the PAD or random secret key.
720 719
B. Cipher Feedback FIPS 81 [5] defines four mode of operation for DES, which may be used in wide variety of application. The mode [12] specifies how data will be encrypted and decrypted. There are four mode of operation ECB, CBC, CFB, OFB. In Cbc message to be encrypted is divided into data united(blocks) each containing k bits. In both encryption and decryption initialization vector of l length is used.
of time, while the reverse operation of the power can be computed efficiently. The original public key system proposed by Diffie and Hellmann requires interaction of both parties to calculate a private key which is common for both the parties. This poses issues if the cryptographically designed system should be applied to communication systems where both parties are not able to interact in reasonable time due to delays in transmission or unavailability of the receiving party. Thus ElGamal simplified the Diffie-Hellmann key exchange algorithm by introducing a random exponent k. This exponent is a replacement for the private exponent of the receiver. This simplification means the algorithm can be used to encrypt in single-direction, without having the necessity to the second party to actively participate. The main advantage is that the algorithm can be used for encryption of electronic messages, which are transmitted by the means of public store-andforward services.
C. Running Key Cipher In the running key cipher [13] text are used from book. Running key cipher [14] is type of poly alphabetic substitution cipher .Usually the book used is agreed ahead of time and the key to be used is chosen randomly and along with that the key is secretly indicated some where in the text(indicated by adding line number and page number of the book used). Now suppose we want to send a message “FLEE AT ONCE” for this we have to choose starting point. We have page and a line suppose we chose 63 as a page number and 1 as line number and our running key is “ERRORS CAN OCCOUR AT SEVERAL PLACE” We write plaintext and running key like: Plaintext: F L E E A T O N C E Running key: E R R O R S C A N O Cipher text: J C V S R L Q N P S And send the message 'JCVSR LQNPS'. In other cryptosystems, when the size of message increases from that of key than we repeat the running key again and again but in this we doesn’t repeat the running key, we just continue the line from the book. Now after sending the message we have to inform the receiver about the running key. For doing this, we add a fake block. In this example we make a fake block of five cipher text character, where 3 bits/characters denote page number and the remaining 2 as line number. This block is called the indicator block, and this indicator block is inserted at the second last position. Now we have encoded the page and line numbers (i.e. key) in AGDAB (06301) form. Here 63 is page number and 1 is line number. If we use running key as a random than that key is never used again and also kept secret, which provides perfect security [15] [16] and the result is one time pad, a method.
1) Key Generation: key generation steps are similar to the general schema. With ElGamal , only the receiver needs to create a key in advance and publish it. First we generate p and g, here p is prime and g is generator. Now receiver choose a integer b that is a private key selection and than we compute gb mod p that is public key assembling and than we publish triplet (p, g, gb) that is key publishing. Steps for key generation. 1) Prime and group generation. 2) Private Key Selection 3) Public Key assembling. 4) Public Key publishing. 2) Encryption: To encrypt the message M for the receiver, sender needs to obtain his public key triplet (p, g, gb) from a key server or by receiving it from the receiver via an unencrypted electronic mail. There is no security issue involved in this transmission, as the only secret part, b, is encoded(hidden) in gb. For the encryption of the plaintext message M, sender receives the key triplet than divides M as a set of integer. A random exponent k is then selected and then encryption is done for each mi block of message M, and cipher text is calculated using C i = m1 * ( g b)K . Steps for encryption: 1) Obtain the public key. 2) Prepare M for encoding. 3) Select Random Exponent. 4) Compute public Key. 5) Encrypt plain text.
D. Random functions and random Numbers There are various method to generate random numbers, one of them is RNG [17] ‘random number generator‘. This method generates a sequence of symbol and number that appears random. There is also a different method to generate random numbers which was used in old days. But RNG is widely used at present to generate random numbers.
3) Decryption: After receiving the encrypted message C with randomized public key g k, we have to use the decryption algorithm to be able to read the plaintext M .For each of the cipher text parts ci Receiver computes the plaintext using m i =(g K)-b *C i mod p Steps for Decryption
E. Elgamal Cipher In 1984 Taher ElGamal who is also the inventor of SSL, presented a cryptosystem which is based on the Discrete Logarithmic Problem [17]. It relies on the assumption that the Discrete Logarithm cannot be found in feasible amount
720 721
1) Compute Share Key 2) Decryption III.
Message text used
PROPOSED MODEL
Random number
We will introduce the concept of cipher Relay instead of using conventional phenomenon of cipher feedback. Cipher feedback is a mode defined for a single cryptographic algorithm; we will use hybrid cryptosystem by facilitating use of ElGamal Cryptosystem (Asymmetric Key) with Running Key Cipher (Symmetric Key) in a blended environment. Cipher feedback approach when implemented alone on ElGamal encryption leaves the whole system to be a subject of frequency analysis. So we will first generate some cipher by making use of Running key encryption, then we will relay the output of it as input to ElGamal encryption. This prevents the frequency analysis of English alphabets and text strings of encrypted message. Further we will be able to use cipher feedback in ElGamal encryption. 1.
Text Othello. text
Running Key Encryption
Running key cipher and running key Cr &Kr
Decompose Cr into cipher block as Cr=Cr0+Cr1+Cr2+Cr3+……..
Encryption Kr & Cr using ElGamal C0=ElGamal ( Cr o) Kr=ElGamal (Kr)
Encryption in proposed System:
First we will encrypt the whole message at sender side by using Running Key with the help of some pre-agreed text and a Random function. Here Random function determines the start point of the Running key. This step will give us two entities namely 1. Running key Cipher (Cr) 2. Running Key (Kr : random number used). In next step we will restructure Cr into multiple fixed size cipher streams as Cr = Cr0+Cr1+Cr2+Cr3+……. Now encrypt Cr0 using ElGamal encryption resulting to C0 as C0 = E (ElGamal (Cr0)) Also encrypt running key using ElGamal algorithm. Kr = E (ElGamal (Kr)) And Encrypt rest part into Cipher feedback mode as C n=Cr n Θ C r (n-1) 2. Decryption: Decrypt very first ElGamal cipher part i.e. C0 using ElGamal Decryption will result into Cr0. (Cr0) =D (ElGamal (C0))
Encrypt rest part into cipher feedback using x-or Cr as Cn = Cr n + Cr (n-1) Fig1 Encryption Scheme of Proposed System Decrypt ElGamal part c0 and Kr using ElGamal decryption
Decrypt cipher Feedback part for Cr n for n>0 Cr n=Cn Θ Cr n
Compare Cr by opening block of Cr n in order way as Cr=Cr0+Cr1+Cr2+Cr3+……
Now we decrypt our running key using ElGamal algorithm. (Kr) = D (ElGamal (Kr)) Now we have Cr0, so we can easily decrypt cipher feedback part for Cr n for all n>0 as: C r n =C n Θ Cr (n-1) This will result into a stream of Cr n, recompose Cr by appending these streams of Cr n in ordered way as
Decrypt running key cipher Cr by using k r
Cr = Cr0+Cr1+Cr2+Cr3+……. Now we have both Cr and Kr so we will be able to decrypt the Running Key Cipher by making use of pre-agreed text file.
Original message
Text Othello. text
Fig 2 Decryption Scheme of Proposed System
721 722
IV.
TABLE 2 CIPHER MESSAGE GENERATED THROUGH ELGAMAL APPROACH
RESULT AND DISCUSSION
To determine the correctness of proposed system, let’s have two communication parties, Henna and Ron, where Ron want to send some message to henna. Our plan text message is “BEST WISHES”. We encrypt the message first by using running key cipher, our running key cipher is “HAPPY DAYS ARE” (continues...) from book Othello. txt. Suppose line number is 01 and page number is 63. We encrypt Kr, which is our running key 0163 using ElGamal algorithm. After encryption our running key is (01000111 00111010 10010111) Here in TABEL1 we use plain text message and running key to encrypt the messing using X-Or operation. A large prime p= 107 A primitive root g = 2 A random integer x=67 And Henna’s computation y= 267(mod 107) = 94 Her public key (P, g, y) = (107, 2, 94) and her private key x=67. Now he can chooses a random integer k=45 and encrypt the message, M. For this we calculate the value of K and then calculate the value of c1 and c2 and send the encrypted message (28, 50, 107) to Henna. So in simple ASCII format first 24 bits of cipher will be interpreted in TABLE 2. It is relevant to mention that increasing the size of block and /or key also enhance the security of the overall system. Subsequent part of message will be encrypted in message feedback mode by simple x-or as in TABLE 3
Binary value
cipher generated
B E S T W I S H E S
01000010 01000101 01010011 01010100 00100000 01010111 01001001 01010011 01001000 01000101 01010011
H A P P Y D A Y S
01001000 01000001 01010000 01010000 01011001 00100000 01000100 01000001 01011001 01010011 00100000
00001010 00000100 00000011 00000100 01111001 01110111 00001101 00010010 00010001 00010110 01110011
Bit 17-24
50
107
Binary
00011100
00110010
0110101
00001010 00000100 00000011 00000100 01111001 01110111 00001101 00010010 00010001 00010110 01110011
Generated cipher algorithm
text using ElGamal
000111000011001001101011 00001110 00000111 00000111 01111101 00001110 01111010 00011111 00000011 00000111 01100101
At receiver end After the encryption now we decrypt the message. First, we decrypt our running key after decryption we get 0163. Now we decrypt the first block of message. For decryption Henna use received message (28, 50, 107) and her private key that is 67. Then the first block of message is retrieved and the subsequent parts of message are decrypted using feedback mode by simple x-or as =C n Θ Cr n
Sender end-using Running key cipher runnin g key
Bit 9-16
28
Cipher text is generated by running key cipher
TABLE 1 ENCRYPTION USING RUNNING KEY
Binary value
Bit 1-8
TABLE 3 CIPHER VALUE GENERATED USING FEEDBACK MODE
=Cr n Θ Cr (n-1 )
Plan text
Place
Cipher value
Hence the original message (Table 5) is traced back (decrypted) by applying the running key decryption technique. TABLE 4 DECRYPTION USING ELGAMAL AND FEEDBACK MODE
Cipher Text
722 723
Decrypt using elgamal and xor cn Θ cr n
000111000011001001101011
00001010
00001110
00000100
00000111
00000011
00000111
00000100
01111101
01111001
00001110
01110111
01111010
00001101
00011111
00010010
00000011
00010001
00000111
00010110
01100101
01110011
TABLE 5 DECRYPTION USING RUNNING KEY CIPHER
Complexity Encryption
Running key
Binary value
Plan text
cipher generated
00001010 00000100 00000011 00000100 01111001 01110111 00001101 00010010 00010001 00010110 01110011
H A P P Y D A Y S
01001000 01000001 01010000 01010000 01011001 00100000 01000100 01000001 01011001 01010011 00100000
01000010 01000101 01010011 01010100 00100000 01010111 01001001 01010011 01001000 01000101 01010011
B E S T W I S H E S
Thus we get our original plain text message “BEST WISHES”. V.
PERFORMANCE ANALYSIS
In this section, we analyze efficiency of our encryption schemes in terms of Linear feedback [18][19][20]of Running Key Cipher and its computation efficiency when combined with the ElGamal Scheme. To estimate complexity of the system, we define linear feedback and give an analysis on it. Then we analyze the efficiency of proposed system. Linear Feedbacks are the basic components of many running-key generators for stream cipher applications, because they are appropriate for implementation prospective and they produce sequences with good statistical properties. Linear Feedbacks refers to a feedback scheme with a linear feedback function.
10 parts for each Scheme
1 KB for each Scheme Same as Double Message as Size Message 10 KB Size 20 KB
based
ElGamal
The paper analyse the security of ElGamal digital Signature algorithm under the public key cryptography with simplicity of private key environment. The main issue with message feedback approach which arrives is that it does not consider the frequency cryptanalysis of English alphabet. Furthermore most of such applications rely over XOR-ing the message block in feedback mode, which seems impractical in current scenario as any typical message pattern leaks all the subsequent blocks. Further consideration of only the processing overhead may result into security compromises. Yet this idea laid down foundation for a novel approach of message feedback cryptology. In this work we used an approach of symmetric cipher feedback into an asymmetric cryptographic scheme rather than simple message feedback. For the purpose of symmetric encryption we used Running Key Cipher and in asymmetric module we used ElGamal encryption in feedback mode. Higher level of security offered with lower processing overhead. A hybrid model which try to have advantages of both Public Key and Private Key cryptosystems The exhaustive operations of traditional private key algorithms are eliminated. The security lies totally on ElGamal operations, which is approximately infeasible to break. Terms of security have been greatly improved, which makes its scope of application even greater. The impact due to the increase of computation in the signature and verification
Running key ElGamal Proposed Feedback cipher Cipher Cipher Scheme schema Scheme Size 10 KB for each Scheme
Message (Assumed) Message divided into parts / Blocks Each block size Resulting Cipher size (excluding the size and other components of Key used)
Feedback
VI. CONCLUSIONS
TABLE 6: PERFORMANCE ANALYSIS
Parameter
Proposed
ElGamal encryption in its very original form is probabilistic, that is a single plaintext can be encrypted to many possible cipher texts, with the consequence that a general ElGamal encryption produces a 2:1 expansion in size from plaintext to cipher text. Encryption under ElGamal requires two exponentiations; however, these exponentiations are independent of the message and can be computed ahead of time if need be. Decryption only requires one exponentiation. To encrypt the running key part we can simply utilize the binary XOR function which is simplest one in nature, and over rule any unwanted computational overhead yet providing the best results of One Time Pad when used with a truly random running key. This running key will be further securely passed through next stage for making use of it in decryption purpose by means of encrypting it with the more secure and reliable ElGamal encryption scheme. The 2:1 expansion property of the ElGamal encryption comes into play only for a single part of the whole process while encrypting Kr+Cr1 using ElGamal encryption resulting to C0, this enhances the performance in a very dramatic fashion.
SENDER END-USING RUNNIMG KEY CIPHER Cipher text
of
For Running Key part, Same as Message Size (10 KB). For ElGamal part, only the very first block gets double in size, resulting the Cipher size to be 2(1st Block) +9(rest blocks) = 11 KB. Resulting the final Cipher size to 11 KB (reducing the size the storage requirement by approx. 45%).
723 724
10. Miller, Frank, Telegraphic code to insure privacy and secrecy in the transmission of telegrams. C.M. Cornwell. 1882 11. Steven M. Bellovin , Matt Blaze Cryptographic Modes of Operation for the Internet, AT&T Labs Research. 12. Wikimedia ,”Running Key Cipher” , Wikipedia The Encyclopedia a @http ://en.wikipedia.org/wiki/Running _Key _Cipher retrieved Aug 2013. 13. William Stallings; Cryptography and Network Security, Principles and Practice; Third edition; Pearson Education (Singapore), 2003. 14. Steven M. bellovin ,problem area of ip security protocols , AT& T Labs Research. 15. C.P. Schnorr and M. Jakobsson : Security of Discrete Log Cryptosystems in the Random Oracle and Generic Model.TR report University Frankfurt and Bell Laboratories 1999. 16. Andreas V. Meier, The ElGamal Cryptosystem, June 8, 2005 17. R.A. Rueppel. Analysis and design of stream ciphers. Springer Verlag, 1986. 18. S.W. Golomb. Shift register sequences. Aegean Park Press, revised edition, 1982. 19. Pradheep kumar Singaravelu, R STomar, Shekhar Verma, and GS Tomar, “Cryptographic Overhead in Sensor Networks with HFE Scheme”, IEEE International Conference CSNT 2012, pp 894-899, May 2012. 20. R. Lidl and H. Niederreiter. Finite fields. Cambridge University Press, 1983.
operations will be weakened with the enhancement of the computing power of the processor. REFERENCES 1. 2.
3. 4.
5. 6.
7. 8. 9.
W. Diffie and M. E. Hellman, “New directions in cryptography,” IEEE Trans. Inform. Theory, vol. IT-22, pp. 644–654, Nov. 1976. Myungsunkim , jihyekim , and Jung heecheon ,“compress multiple cipher texts using ElGamal encryption schemes” 2010 mathematics subject classification. W. Diffie and M. E. Hellman, “New directions in cryptography,” IEEETrans. Inform. Theory, vol. IT-22, pp. 644–654, Nov. 1976. L. Adleman, “A sub exponential algorithm for the discrete logarithm problem with applications to cryptography,” in Proc. 20th IEEE Symp. Foundations of Computer Science 1979, pp. 55-60. Federal Information Processing Standards Publication, National Institute of Standards and Technology. National Institute of Standards and Technology, Digital Signature Standard(DSS),“Federal Information Processing Standards Publication, ” , FIPS PUB 186-2, Reaffirmed, January 27, 2000. A. Arazi, “Integrating a key cryptosystem into the digital signature standard, ”Electron. Lett., vol. 29, no. 11, pp. 966–967, 1993. YiannisTsiounis, Moti Yung ,On the Security of ElGamal Based Encryption[J]. Computer Science,1998.Vol.1431:117-134. Xiaofei Li, XuanjingShen and Haipeng Chen, ElGamal Digital Signature Algorithm of Adding a Random Number, IEEE 2011.
724 725