[ieee 2012 12th international conference on intelligent systems design and applications (isda) -...

6
An Implementation of a New public key System based on RSA which leads hackers solve multiple hard problems to break the cipher Rasmi P S Dept of Information Technology TIST Kochi, India e-mail: [email protected] Dr. Varghese Paul Dept of Information Technology TIST Kochi, India e-mail: [email protected] Abstract—A public key system is a form of crypto system in which the encryption and decryption are performed using different keys, one is public and other one is private. The mostly used public key systems like RSA, knapsack system, Elliptical curve etc are based on a single hard problem like factoring or discrete logarithm. Even if these algorithms are very secure now, in future the situation can be changed and someone can solve the single hard problem easily. In this work, a new paired cipher text public key System based on RSA is designed, which incorporates two hard mathematical problems (Both Discrete logarithms and Factoring) to make the algorithm too secure. Keywords-cryptography, public key System, hard problem I. INTRODUCTION Cryptography of today is a cost-effective means of securing and protecting large amounts of electronic data that is stored and communicated across corporate networks worldwide. The art of protecting information by transforming it into an unreadable format, called cipher text, is called encryption. Only those who possess a secret key can decipher the message into plain text. Encrypted messages can sometimes be broken by cryptanalysis Based on the number of keys used, the cryptographic system can be divided into secret key system and public key system. Secret key system only needs one key to encrypt the message and both users only need the same key to encrypt and decrypt the message. Public key system needs two different keys- public key and private key. Everyone can see the public key and only the person who has private key can decode the message. Even though the computational complexity of the public key system is high, they are more secure than secret key systems. Currently available public key systems are based on single hard mathematical problem. In our system, we incorporate two hard mathematical problems .So the hackers find difficulty to break the cipher as he has to solve two hard mathematical problems simultaneously. In this paper the back ground works are explained in section II, the hard mathematical problems are described in section III. The new public key algorithm is explained in section IV, and the results are discussed in section V. Finally the paper is concluded in section VI. II. BACK GROUND DETAILS The existing RSA algorithm, its security and performance are studied in [1,3,4] .The factoring problem (It’s a hard mathematical problem for large n with large prime factors) to attacking RSA mathematically is identified. RSA is an algorithm for public-key cryptography that is based on the presumed difficulty of factoring large integers. RSA stands for Ron Rivest, Adi Shamir and Leonard Adleman, who first publicly described it in 1977. A user of RSA creates and then publishes the product of two large prime numbers, along with an auxiliary value, as their public key. The prime factors must be kept secret. Anyone can use the public key to encrypt a message, but with currently published methods, if the public key is large enough, only someone with knowledge of the prime factors can feasibly decode the message. In paper [4][5] the three approaches to attacking RSA mathematically were identified. In first approach, the hackers factor n into its two prime factors. This enables calculation (n)=(p-1)×(q-1) which in turn, enables determination of d= e -1 (mod (n)). In second approach, (n) is determined directly, without determining p and q. Again this enables determination of d= e -1 (mod (n)). In third approach,d is determined directly, without determining (n). Rabin crypto system is a variation of RSA System. It is also based on factoring problem. The Rabin crypto system can be thought of as RSA crypto system in which the value of e and d are fixed; e=2 and d=1/2 . in other words, the encryption is C=p 2 (modn) and the decryption is P=C 1/2 ( mod n). Here if Bob is using RSA, he can keep d and n and discard p, q and Ø(n) after key generation. If bob is using rabin system, he needs to keep p and q [3,4,12]. Elgamal Crypto system is based on discrete logarithm problem. If P is a large prime, e 1 is a primitive root in the group G= <Z p *,×> and r is an integer, then e 2 =e 1 r mod p is easy to compute using fast exponential algorithm(square and multiply method), but given e 1 , e 2 and P it is infeasible to 656 978-1-4673-5119-5/12/$31.00 c 2012 IEEE

Upload: varghese

Post on 23-Dec-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: [IEEE 2012 12th International Conference on Intelligent Systems Design and Applications (ISDA) - Kochi, India (2012.11.27-2012.11.29)] 2012 12th International Conference on Intelligent

An Implementation of a New public key System based on RSA which leads hackers solve multiple hard problems to break the cipher

Rasmi P S Dept of Information Technology

TIST Kochi, India

e-mail: [email protected]

Dr. Varghese Paul Dept of Information Technology

TIST Kochi, India

e-mail: [email protected]

Abstract—A public key system is a form of crypto system in which the encryption and decryption are performed using different keys, one is public and other one is private. The mostly used public key systems like RSA, knapsack system, Elliptical curve etc are based on a single hard problem like factoring or discrete logarithm. Even if these algorithms are very secure now, in future the situation can be changed and someone can solve the single hard problem easily. In this work, a new paired cipher text public key System based on RSA is designed, which incorporates two hard mathematical problems (Both Discrete logarithms and Factoring) to make the algorithm too secure.

Keywords-cryptography, public key System, hard problem

I. INTRODUCTION Cryptography of today is a cost-effective means of

securing and protecting large amounts of electronic data that is stored and communicated across corporate networks worldwide. The art of protecting information by transforming it into an unreadable format, called cipher text, is called encryption. Only those who possess a secret key can decipher the message into plain text. Encrypted messages can sometimes be broken by cryptanalysis

Based on the number of keys used, the cryptographic system can be divided into secret key system and public key system. Secret key system only needs one key to encrypt the message and both users only need the same key to encrypt and decrypt the message. Public key system needs two different keys- public key and private key. Everyone can see the public key and only the person who has private key can decode the message. Even though the computational complexity of the public key system is high, they are more secure than secret key systems. Currently available public key systems are based on single hard mathematical problem. In our system, we incorporate two hard mathematical problems .So the hackers find difficulty to break the cipher as he has to solve two hard mathematical problems simultaneously.

In this paper the back ground works are explained in section II, the hard mathematical problems are described in section III. The new public key algorithm is explained in

section IV, and the results are discussed in section V. Finally the paper is concluded in section VI.

II. BACK GROUND DETAILS The existing RSA algorithm, its security and performance

are studied in [1,3,4] .The factoring problem (It’s a hard mathematical problem for large n with large prime factors) to attacking RSA mathematically is identified. RSA is an algorithm for public-key cryptography that is based on the presumed difficulty of factoring large integers. RSA stands for Ron Rivest, Adi Shamir and Leonard Adleman, who first publicly described it in 1977. A user of RSA creates and then publishes the product of two large prime numbers, along with an auxiliary value, as their public key. The prime factors must be kept secret. Anyone can use the public key to encrypt a message, but with currently published methods, if the public key is large enough, only someone with knowledge of the prime factors can feasibly decode the message. In paper [4][5] the three approaches to attacking RSA mathematically were identified. In first approach, the hackers factor n into its two prime factors. This enables calculation (n)=(p-1)×(q-1) which in turn, enables determination of d= e -1 (mod (n)). In second approach,

(n) is determined directly, without determining p and q. Again this enables determination of d= e -1 (mod (n)). In third approach,d is determined directly, without determining

(n). Rabin crypto system is a variation of RSA System. It is

also based on factoring problem. The Rabin crypto system can be thought of as RSA crypto system in which the value of e and d are fixed; e=2 and d=1/2 . in other words, the encryption is C=p2 (modn) and the decryption is P=C1/2

(mod n). Here if Bob is using RSA, he can keep d and n and discard p, q and Ø(n) after key generation. If bob is using rabin system, he needs to keep p and q [3,4,12].

Elgamal Crypto system is based on discrete logarithm problem. If P is a large prime, e1 is a primitive root in the group G= <Zp*,×> and r is an integer, then e2=e1

r mod p is easy to compute using fast exponential algorithm(square and multiply method), but given e1, e2 and P it is infeasible to

656978-1-4673-5119-5/12/$31.00 c©2012 IEEE

Page 2: [IEEE 2012 12th International Conference on Intelligent Systems Design and Applications (ISDA) - Kochi, India (2012.11.27-2012.11.29)] 2012 12th International Conference on Intelligent

calculate [3,12].The system is implemented and compared with the other systems.

The Elliptical curve cryptographic system is based on elliptical curve logarithm problem. Here Alice selects P ,a point on the curve , as her plain text. She then calculates a pair of points on the text as cipher text C1=r×e1 and C2=p+r×e2.After receiving C1 and C2 calculates P=C2-d×C1.the security of ECC depends on the difficulty of solving elliptical curve logarithm problem. The system is implemented and compared with other systems[1,3,4,8]. The two hard mathematical problems were analyzed in [6,7,8,9,10,11].

III. HARD MATHEMATICAL PROBLEMS

A. Factoring First, Given a positive composite integer N, to find an integer x, with 1 < x <N, such that x divides N. In number theory, integer factorization or prime factorization is the decomposition of a composite number into smaller non-trivial divisors, which when multiplied together equals the original integer. When the numbers are very large, no efficient, non-quantum integer factorization algorithm is known; an effort concluded in 2009 by several researchers factored a 232-digit number (RSA-768), utilizing hundreds of machines over a span of 2 years. The presumed difficulty of this problem is at the heart of widely used algorithms in cryptography such as RSA

Not all numbers of a given length are equally hard to factor. The hardest instances of these problems (for currently known techniques) are semi primes, the product of two prime numbers. When they are both large, for instance more than 2000 bits long, randomly chosen, and about the same size, even the fastest prime factorization algorithms on the fastest computers can take enough time to make the search impractical; that is, as the number of digits of the primes being factored increases, the number of operations required to perform the factorization on any computer increases drastically.

Many cryptographic protocols are based on the difficulty of factoring large composite integers or a related problem, the RSA problem. An algorithm that efficiently factors an arbitrary integer would render RSA-based public-key cryptography insecure. That means anyone who can factor the modulus can hack the messages. The security of RSA depends on the factoring problem being difficult and the presence of no other types of attack. Unfortunately, it has not been proven that factoring must be difficult, and there remains a possibility that a quick and easy factoring method might be discovered.

B. Discrete Logarithm

Given a prime integer p, a generator g of (Z/pZ)*, and an element y € (Z/pZ)*, to find an integer such that ga = y. The first is the problem of finding the prime factorization of an integer N, considered particularly in the most difficult and relevant case where N = p × q for large primes p and q.

In general, let G be a finite cyclic group with n elements. We assume that the group is written multiplicatively. Let b be a generator of G; then every element g of G can be written in the form g = bk for some integer k. Furthermore, any two such integers k1 and k2 representing g will be congruent modulo n. We can thus define a function

(where Zn denotes the ring of integers modulo n) by assigning to each g the congruence class of k modulo n. This function is a group isomorphism, called the discrete logarithm to base b.

The familiar base change formula for ordinary logarithms remains valid: If c is another generator of G, then we have

Discrete logarithms are perhaps simplest to understand in the group (Zp)×. This is the set {1, …, p 1} of congruence classes under multiplication modulo the prime p.If we want to find the kth power of one of the numbers in this group, we can do so by finding its kth power as an integer and then finding the remainder after division by p. This process is called discrete exponentiation. For example, consider (Z17)×. To compute 34 in this group, we first compute 34 = 81, and then we divide 81 by 17, obtaining a remainder of 13. Thus 34 = 13 in the group (Z17)×.

Discrete logarithm is just the inverse operation. For example, take the equation 3k 13 (mod 17) for k. As shown above k=4 is a solution, but it is not the only solution. Since 316 1 (mod 17), it also follows that if n is an integer then 34+16 n 13 × 1n 13 (mod 17). Hence the equation has infinitely many solutions of the form 4 + 16n. Moreover, since 16 is the smallest positive integer m satisfying 3m 1 (mod 17), i.e. 16 is the order of 3 in (Z17)×., these are the only solutions. Equivalently, the solution can be expressed as k 4 (mod 16).No efficient classical algorithm for computing general discrete logarithms logb g is known.

IV. THE NEW PUBLIC KEY ALGORITHM The algorithm, which we designed, is based on two hard

problems discrete logarithm and factoring .So this algorithm is much more secure than the existing public key algorithms.

A. BlockDiagram The block diagram of proposed system is as shown in figure1.The plain text M is subjected to first stage of encryption where it is encrypted using public key e and n. The output of the first stage of encryption (Me mod n) is

2012 12th International Conference on Intelligent Systems Design and Applications (ISDA) 657

Page 3: [IEEE 2012 12th International Conference on Intelligent Systems Design and Applications (ISDA) - Kochi, India (2012.11.27-2012.11.29)] 2012 12th International Conference on Intelligent

given to second stage of encryption where it is again encrypted using another public key r and a random number k.The first element of the paired cipher text is Cf= Memod n-rk mod n. The second element of the paired cipher text is obtained as Cs=tk mod n where t is the primitive element t in with order n satisfying tn-1=1(modn).

Figure 1.Block Diagram of Encryption

Figure 1.Block Diagram of Decryption This algorithm has 3public keys and 3 private keys and it

consists of 3 stages key generation, Encryption and Decryption

B. Key generation 1. Select two prime numbers p and q . Where p# q

and p and q are expected to be very large prime numbers

2. Calculate Here n is used as the modulus for the public keys

3. Find out Euler’s totient function (n)=(p-1)×(q-1) 4. Select an integer e from Z*

n such that 1<e< (n)

and gcd(e, (n)=1) i.e. e and (n) are coprime . e

is released as the public key exponent. 5. Select another integer s from Z*

n such that1<s<n. s acts as one of the private keys

6. Find the primitive element t in multiplicative group Z*

n={z/gcd(z,n)=1}with order n satisfying tn-

1=1(modn). 7. Calculate r= ts (modn) . t and r are the elements of

public key

8. Find d=e -1 mod (n) i.e., d is the multiplicative

inverse of e mod (n). This is more clearly stated as solve for d given (de) mod (n) = 1.This is often computed using the extended Euclidean algorithm.

9. Public key=(e,r,n) private key=(d,s.n)

C. Encryption

1. Pick a random integer k from Z*n

2. Select the plain text M<n

3. Cf=(M)emodn -rk modn

4. Cs=tk(modn)

Cipher text C =(Cf,Cs)

D. Decryption

1. M=(Cf+Css)dmod n

E. Numerical Example Key generation 1. Select two prime numbers p =11 q=3

C

Private Key

(s,d,n) Decryption with

the help of private Keys

(Cf,Cs

M

Primitive Element t

Cf= Memod n-

rk mod n

Cs=tk mod n

(M)e mod n

k

k

Plain Text M

Encryption

Using Public

key

Encryption Using another Public key and

a random number (DLP)

Random Number

Generator

Encryption Using Primitive element t

( tn-1=1 mod n) (DLP)

Public key (e, n)

Public key (r, n)

(Cf, Cs)

658 2012 12th International Conference on Intelligent Systems Design and Applications (ISDA)

Page 4: [IEEE 2012 12th International Conference on Intelligent Systems Design and Applications (ISDA) - Kochi, India (2012.11.27-2012.11.29)] 2012 12th International Conference on Intelligent

2. n=11×3=33 3. Find out Euler’s totient function n)=(11-1)×(3-

1)=20 4. Select an integer e =3 from Z*n ( 1<3<20 and

gcd(3, 20)=1 ) 5. Select another integer s=4 from Z*n ( 1<4<33) 6. t=10 .(Since 1032=1 mod 33) 7. r= 104 (mod33) =1 8. d=7 (Since 3×7-1 is divisible by 20) 9. public key=(e,r,n)=(3,1,33)

public key=(d,s,n)=(7,4,33) Encryption

1. K=7

2. M=8

3. Cf=(8)3 mod33-17 modn=17-1=16

4. Cs=107(mod33)=10

5. (Cf,Cs)=(16,12)

Decryption

1. M=(16+104)7mod 33=1100167mod33=8.

V. IMPLEMENTATION RESULTS AND DISCUSSION In this section, we show that our algorithm is

theoretically correct , compare the performance efficiency of the algorithm with RSA and analyze the security of the system from the point of view of a cryptanalyst.. A. Correctness of the Algorithm Theorem (Cf+Cs

s)dmod n = M

if Cf= (M)emodn -rk modn, Cs=tk(modn), r= ts (modn) Proof LHS =(Cf+Cs

s)dmod n =((M)emodn -rk modn+ tks(modn))d modn =((M)emodn- tsk(modn) modn+ tks(modn))d modn =((M)emodn )d modn

= Medmodn (Apply Fermat’s Little Theorem) =M =RHS

B. Performance Efficiency Comparison of RSA Encryption time and the Encryption time of newalgorithm for different messages is shown in table 1 and figure3 Here the Encryption parameters are made fixed.From this we can understannd that as the size the input message is increased, the encryption time is also increased for both the algorithm.

TABLE 1. RSA ENCRYPTION TIME VS. NEW ENCRYPTION TIME

Figure 3.RSA Encryption Time Vs.New Encryption time Comparison of RSA Decryption time and MMCS Decryption time for different messages is shown in Table 2 and Figure 4. ( the encryption parameters are made fixed). Here also for both algorithm the decryption time increases with size of the input message.

size of Message in bits

RSA Encryption Time(Milli

seconds)

Encryption Time of new Algorithm (MMCS) (Milliseconds)

2 0.0769 0.7976

3 0.0798 0.9881

4 0.0813 0.9934

5 0.0837 0.9997

6 0.0938 1.0666

7 0.943 1.0714

2012 12th International Conference on Intelligent Systems Design and Applications (ISDA) 659

Page 5: [IEEE 2012 12th International Conference on Intelligent Systems Design and Applications (ISDA) - Kochi, India (2012.11.27-2012.11.29)] 2012 12th International Conference on Intelligent

TABLE 2. RSA DECRYPTION TIME VS. NEW DECRYPTION TIME

Figure 4.RSA Decryption Time Vs.New decryption time

C. Security of the Algorithm The security of our algorithm is highest because a hacker has to solve two hard mathematical problems to hack the message, which is quite impractical now.

Figure 5. Security based on number of hard problems

We have implemented this algorithm in VB.Dot Net and the output screen is shown in the figure 6.Here the the plaintext 85 is encrypted to cipher text pair(-131,160) by using encryption parameters p=7, q=23, 131,e=5, d=53, r=160, s=99. The elements of public key are (5,160,161) and the elements of private key are (53,99,161).

Figure 6. Output screen of the Algorithm

VI. CONCLUSION We designed a new multi mode cryptographic algorithm based on two hard mathematical problems . We proved that our algorithm is theoretically correct. Even though the existing RSA algorithm is enough secure , our algorithm will be more secure for preserving the privacy of critical, personal, financial, medical, and ecommerce data while they are circulated among the network. It’s well known that most of the existing schemes are based on single problems and if a cryptanalyst could find an algorithm to solve the related problem the scheme is broken. Our scheme is prevented from this problem since it’s based on two hard problems.

ACKNOWLEDGMENT We acknowledge the technical resource support received from Toc H Institute of science & Technology, Research center, Anna University, Coimbatore.

REFERENCES

[1] Deepak Garg, Seema VermaThapar University, Improvement over Public Key Cryptographic Algorithm, 2009 IEEE International Advance Computing Conference (IACC 2009)Patiala, India, 6-7 March 2009

size of Message in bits

RSA Decryption Time(Milli

seconds

MMCS Decryption

Time (Milliseconds)

2 0.0606 0.0808 3 0.0625 0.1703 4 0.063 0.2585 5 0.0644 0.4017 6 0.0678 0.4113 7 0.0683 0.5112

660 2012 12th International Conference on Intelligent Systems Design and Applications (ISDA)

Page 6: [IEEE 2012 12th International Conference on Intelligent Systems Design and Applications (ISDA) - Kochi, India (2012.11.27-2012.11.29)] 2012 12th International Conference on Intelligent

[2] WU Xing-hui , MING Xiu-jun, Research of the Database Encryption Technique Based on Hybrid Cryptography, 2010 International Symposium on Computational Intelligence and Design

[3] William Stallings, Cryptography and network Security principles and practices, Fourth Edition, Prentice –Hall of India private limited-New Delhi -110001 2008

[4] Jan C A , Basic Methods of Cryptography ,Cambridge University Press

[5] Baocang, W. and H. Yupu, 2005. Public key cryptosystem based on two cryptographic assumptions.IEE Proc. Commun., 152: 861-865. http://ieeexplore.ieee.org/stamp/stamp.jsp? tp=&arnumber= 1561963

[6] E. Bach. Discrete lograrithms and factoring. Technical report UCB 84/186. Com-puter Science Division (EECS), University of California, Berkeley, June 1984.

[7] J. Hastad, A. Schrift, A. Shamir. The Discrete Logarithm Modulo a Composite Hides O(n) Bits. J. of Computer and System Sciences. Vol 47(3), pp 376-404,1993.

[8] ElGamal, T.: A public key cryptosystem and a signature scheme based on discrete logarithms. IEEE Trans. Inform. Theory 31(4), 469–472 (1985)

[9] Pohlig, S.C. and Hellman, M.E. An Improved Algorithm for Computing Logarithms in GF(P) and Its Cryptographic Significance, IEEE Transactionson Information Theory, v. 24, n. 1, Jan. 1978, pp.106-111.

[10] Baocang, W. and H. Yupu, 2005. Public key cryptosystem based on two cryptographic assumptions. IEE Proc. Communi., 152: 861-865. DOI: 10.1049/ip-com:20045278

[11] S.D. Galbraith and K.G. Paterson (Eds.): Pairing 2008, LNCS 5209, pp. 89–99, 2008._c Springer-Verlag Berlin Heidelberg 2008

[12] Behrouz A Forouzan, Pradeep Mukhopadhyay. Cryptography and network Security, Second Edition, Tata McGraw Hill Education Private Limited.

2012 12th International Conference on Intelligent Systems Design and Applications (ISDA) 661