Sei sulla pagina 1di 5

ISSN:2249-5789

Prashant Kumar Arya et al , International Journal of Computer Science & Communication Networks,Vol 5(1),17-21

Comparative Study of Asymmetric Key Cryptographic Algorithms

Prashant Kumar Arya Dr Mahendra Singh Aswal Dr Vinod Kumar


Research Scholar, Department of Assistant Professor, Department of Professor, Department of Computer
Computer Science, Faculty Of Computer Science,Faculty of Science, Faculty of Technology,
Technology, Grukula Kangri Technology, Grukula Kangri Grukula Kangri Vishwavidyalaya,
Vishwavidyalaya, Haridwar, India Vishwavidyalaya, Haridwar, India Haridwar, India vks_sun@ymail.com
prashantary@gmail.com mahendra8367@gmail.com

Abstract
to perform these opposite functions each being the
Cryptography is one of the main constituents of
computer security. Public cryptography is the art of inverse of the other as contrasted with conventional
protecting information by transforming it (encrypting it) ("symmetric") cryptography which relies on the same
into an unreadable format, called cipher text. Only key to perform both. The present paper discusses
those who possess a secret key can decrypt the message various aspects of public-key encryption techniques
into plain text. This paper reviews five commonly used with their relative merits and demerits. The description
asymmetric key cryptography algorithms namely RSA, of various categories of public-key cryptography
DiffieHellman, ElGamal, DSA and ECC and present
techniques is presented in Section 2. Section 3 presents
their comparative study.
the comparative study of these algorithms based on
Keywords : Public, assymetric, encryption, security. different security aspects. Section 4 concludes the
paper.
1. Introduction 2. Public-Key Cryptography

Today security is the challenging aspect in internet and


network application. Cryptography is the study of The requirement that both parties have access to the
mathematical techniques related to various aspects of secret key is one of the main drawbacks of symmetric
information security, such as confidentiality or privacy, key encryption, in comparison to public-key encryption.
There exist many symmetric key encryption algorithms.
data integrity and entity authentication. It is not the
only means of providing information security, but rather Several hundreds of these are proposed over the years
one set of techniques. Cryptography systems can be and even though a lot were found not to be secure, there
broadly classified into two categories symmetric-key exist many cryptographically strong ones. The situation
systems that use a single key used by both sender and is quite different for asymmetric algorithms. There are
recipient , and public-key systems that use two keys, a only three major families of public key algorithms
public key known to everyone and a private key that which are of practical relevance. They can be classified
only the recipient of messages uses. Symmetric / based on their underlying computational problem.
Private Key algorithms are a class of algorithms for Integer factorization schemes are based on the fact that
cryptography that use the same cryptographic keys for
it is difficult to factor large integers. The most
both encryption of plaintext and decryption of cipher
prominent representative of this algorithms family is
text. The keys may be identical or there may be a
RSA.
simple transformation to go between the two keys. The
keys, in practice, represent a shared secret between two Discrete Logarithm Schemes are based on what is
or more parties that can be used to maintain a private known as the discrete logarithm problem in finite fields.
information link. The most prominent examples include the Diffie-
Public-key cryptography, also known as asymmetric Hellman key exchange, Elgamal encryption or the
cryptography, refers to a cryptographic algorithm which digital signature algorithm.(DSA).
requires two separate keys, one of which is secret (or
A generalization of the discrete logarithms algorithms
private) and other one is public. Although different, the
are elliptic curve (EC) public-key schemes. The most
two parts of this key pair are mathematically linked.
popular examples include Elliptical Curve Diffie-
The public key is used to encrypt plain text or to verify
Hellman key exchange (ECDH) and Elliptical Curve
a digital signature. whereas the private key is used to
Digital Signature Algorithm(ECDSA). There are no
decrypt cipher text or to create a digital signature. The
known attacks against any of the schemes if the
term "asymmetric" stems from the use of different keys
parameters, especially the operand and key lengths are
17
ISSN:2249-5789
Prashant Kumar Arya et al , International Journal of Computer Science & Communication Networks,Vol 5(1),17-21

chosen carefully. It is important to note that each of the insecure communications channel. This key can then be
three families can be used to provide the main public- used to encrypt subsequent communications using a
key mechanisms of key establishment, nonrepudiation symmetric key cipher. The algorithm is itself limited to
the exchange of keys. The DiffieHellman key
through digital signatures and encryption data.
exchange algorithm depends for its effectiveness on the
difficulty of computing discrete logarithms [3].
2.1 RSA Algorithm
2.2.1 Key exchange Algorithm
Let us assume the A and B want to agree upon a key to
RSA is a cryptosystem, which is known as one of the be used for encryption / decrypting messages that would
first practicable public-key cryptosystems and is widely be exchanged between them . The Diffie-Hellman key
used for secure data transmission. In such a exchange algorithm works as follows [2].
cryptosystem, the encryption key is public and differs
from the decryption key which is kept secret. In RSA,
this asymmetry is based on the practical difficulty of 1. Firstly, A and B agree on two large prime
factoring the product of two large prime numbers, ie on numbers n and g. These two integers need not
the factoring problem. RSA stands for Ron Rivest, Adi be kept secret. A and B can use an insecure
Shamir and Leonard Adleman, who first publicly channel to agree on them .
described the algorithm in 1977[1].
2. A chooses another large random number x and
2.1.1. RSA Key generation encryption and calculates c such that
Decryption
c=g x mod n
RSA involves a public key and a private key. The public
key can be known by everyone and is used for 3. A sends the number c to B
encrypting messages. Messages encrypted with the
public key can only be decrypted in a reasonable 4. B independently chooses another large random
amount of time using the private key. The keys for the
integer y and calculate d such that
RSA algorithm are generated in the following way
1.
Choose two distinct prime numbers p and q. d=g y mod n
2.
Compute n = p*q. 5. B sends number d to A
3.
Select the public key ( i.e. the encryption key) 6. A now compute the secreate key K1 as follows
e such that it is not factor of (p-1) and (q-1)
K1= d x mod n
4.
Select the public key ( i.e. the decryption key)
d such that the following equation is true. 7. B now computes the secret key K2 as follows.

(d*e) mod (p-1)*(q-1)=1. K2=c y mod n

5.
For encryption calculate the cipher text CT 2.3 Digital Signature Algorithm
from the plane text PT as follows
The Digital Signature Algorithm (DSA) is a Federal
CT=PT e mod n
Information Processing Standard for digital signatures.
6.
Send CT as the cipher text to the receiver. It was proposed by the National Institute of Standards
and Technology (NIST) in August 1991 for use in their
7.
For decryption, calculate the plane text PT Digital Signature Standard (DSS) and adopted as FIPS
from the cipher text CT as follows. 186 in 1993.

CT d mod n A digital signature algorithm (DSA) typically consists


of three algorithms: A key generation algorithm that
2.2 DiffieHellman Algorithm selects a private key uniformly at random from a set of
possible private keys. The algorithm outputs the private
The DiffieHellman key exchange scheme was first key and a corresponding public key a signing algorithm
published by Whitfield Diffie and Martin Hellman in that, given a massage and a private key, produces a
[1976]. DiffieHellman key exchange is a specific signature. A signature verifying algorithm that, gives a
method of exchanging cryptographic keys. This method massage, public key and a signature, either accept or
allows two parties that have no prior knowledge of each reject the massages clame to authenticity [7].
other to jointly establish a shared secret key over an
18
ISSN:2249-5789
Prashant Kumar Arya et al , International Journal of Computer Science & Communication Networks,Vol 5(1),17-21

2.3.1 Key generation 2. A chooses a random x from {1............(q-1)}


1.
Select a prime q of 160 bits 3. A computes h=gx
2. 511+64t 512+64t
Choose 0t8, select 2 <p<2 with
4. A publishes h along with the description of
q/p-1
G,q,g as her public key. Alice retains x as her
3.
Select g in Zp and a=g(p-1)/q mod p. 1 private key which must be kept secret.
4.
Select 1 a q-1, compute y= b mod p. 2.4.2 ElGamal Key Encryption
The encryption algorithm works as follows: to encrypt a
5.
Public key (p,q, ,y) private key a message m to A under her public key ,(G,q,g.h).
2.3.2 Signing
1. B chooses a random y from {1.........,(q-1)}
Select a random integer k, 0<k< q. then calculates c1 =gy

Compute r= ( k mod p) mod q. 2. B calculates the shared secret s=hy


Compute k-1 mod q.
3. B converts his secret message m into m' an
compute s=k-1*(h(m)+ar) mod q. element of G

Signature=(r,s). 4. B calculates . c2=m'.s


2.3.3. Verification :
5. B sends the ciphertext (c1, c2 )= (gy ,m'.hy) =(
1. Verify 0<r<q and 0<s<q, if not, invalid. gy ,m'.(gx )y) to A.
2. Compute w=s-1 mod q and h(m). Note that one can easily find hy if one knows m'.
3. Compute u1=w*h(m) mod q. u2=r*w mod q. Therefore, a new y is generated for every message to
improve security. For this reason, y is also called an
4. Compute v=( u1yu2 mod p)mod q.
ephemeral key.
5. Valid if v=r.
2.4.3 ElGamal Decryption
2.4 ElGamal Algorithm
In cryptography, the ElGamal encryption system is an
The decryption algorithm works as follows: to decrypt a
asymmetric key encryption algorithm for public-key
ciphertext (c1,c2 ) with her private key x,
cryptography which is based on the DiffieHellman key
exchange. It was described by Taher Elgamal in 1984. 1.
A calculates the shared secret s=c1x
ElGamal encryption is used in the free GNU Privacy
2.
Guard software, recent versions of PGP, and other A then computes m'=c2.s-1 is converted back
cryptosystems. The Digital Signature Algorithm is a into the plaintext message m , where s -1 is
variant of the ElGamal signature scheme, which should inverse of s in the group . (E.g. modular
not be confused with ElGamal encryption. ElGamal multiplicative inverse if G is a subgroups of a
encryption can be defined over any cyclic group G Its multiplicative group of integers modulo n).
security depends upon the difficulty of a certain
problem in G related to computing discrete logarithms The decryption algorithm produces the intended
The ElGamal is a public key algorithm, which can be message, since
used for both digital signature as well as encryption. Its
c2.s-1=m'.hy.(gxy)-1=m'.gxy .g-xy =m'
security is based on the difficulty of computing discrete
logarithms in a finite field.
2.5 Elliptic Curve Cryptography Algorithm
ElGamal encryption consists of three components: the
Elliptic curve cryptography (ECC) is an approach to
key generator, the encryption algorithm, and the
public-key cryptography based on the algebraic
decryption algorithm [2].
structure of elliptic curves over finite fields. The use of
2.4.1 ElGamal Key generation
elliptic curves in cryptography was suggested
The key generator works as follows: independently by Neal Koblitz and Victor S. Miller in
1985. Elliptic curve cryptography algorithms entered
1. A generates an efficient description of a wide use in 2004 to 2005. The algorithm was approved
multiplicative cyclic group G of q order with by NIST in 2006. Let E be an elliptic curve over finite
generator g. A a discussion on the required field Fp . Let p be a point on E(Fp ) and suppose that P
properties of this group is given below.
19
ISSN:2249-5789
Prashant Kumar Arya et al , International Journal of Computer Science & Communication Networks,Vol 5(1),17-21

has prime order n. then the cyclic subgroup E(Fp ) 1. Compute Pm =C2-d*C1
generated P is <P>={ ,P, 2P, 3P, 4P...........(n-1)P}.The
prime P , the equation of the Elliptic curve E, and the 2. Compute ( Pm ).
point P and its order n are the public domain parameter.
A private key is an integer d that is selected uniformly
at random from the range [1,(n-1)] and the
corresponding public key is Q=d*P [4], [5]. 3. Comparative Study

2.5.1 Key pair generation All three of the established public-key algorithms
Input Elliptic curve domain parameter (p,E,P,n) families are based on number theoretic functions. One
of their distinguishing feature is that they require
Output Public key Q and private key d. arithmetic with very long operands and keys. Not
surprisingly, the longer the operand and keys, the more
1. Select d =R[1,(n-1)] secure the algorithm become. In order to compare
different algorithms, one often considers the security
2. Compute Q=d*P. level. An algorithms is said to have a secure level of n
bit if the best known attack requires 2n steps. This is a
3.Return (Q,d) quite natural definition because symmetric algorithms
with a security level of n have a key of length of n bit.
The first task is to encode the plane text message m to
Table 1 show recommended bit length for public key
be sent as an x-y point Pm. It is the point Pm that will be
algorithms for the four security levels 80, 128, 192, and
encrypted as cipher text and subsequently decrypted. To
256 bit. We see from the table the RSA-like schemes
encrypt and send a message Pm to B, A Chosses a
and discrete logarithms schemes require very long
random positive intger k and produces the the cipher
operands and keys. The key length of elliptical key
text Cm ={K*P, Pm + k*Q}, where Q is B's public key.
schemes is significantly smaller, and hence require less
The sender transmits the point C1=k*P and
computing power. The advantages and disadvantages
C2=Pm+K*q to the recipent. To decrypt the cipher text,
of each algorithm are also pointed out in the table
B multiplies by the first point in the pair by B's secret
1.[6], [7], [8]
key and subtract the result from the second point as
Pm+k*q-d(k*P)=Pm+k(d*P)-d(kP)=Pm..
4. Conclusion
2.5.2 Elliptic Curve Encryption
Input : Elliptic curve domain parameter (p,E,P,n), The paper reviews asymmetric key algorithms RSA ,
public key Q, plane text m DSA, ECC, Diffie-Hellman and ElGamal. RSA is the
most widely used public key technology today but the
Output : Cipher text Cm use of more simpler connected devices and demand for
higher level of security will make continued reliance
1. Represent the plane text m as a point on RSA more challenging over time. These trends
highlight a clear need for an efficient public key
Pm in E (Fp). cryptosystem that can lower the capacity threshold for
small devices to perform strong cryptography and
2. Select k [1,(n-1)]. increase a server's capacity to handle the secure
communication. The RSA keys will need to grow to
2048 bits. ECC is an efficient alternative of RSA as a
3. Compute C1=k*p
mean of improving SSL performance without restoring
to expensive special purpose hardware. Compared to its
4. Compute C2=Pm+K*q.
traditional counterparts, ECC offers the same level of
security using much smaller keys .This results in faster
5. Return (C1,C2).
computations and saving in memory power and band
2.5.3 Elliptical Curve Decryption width that are especially important in constrained
Input : Elliptic curve domain parameter (p,E,P,n), environment, e.g. mobile phones, PDA's and smart
cards. ECC offers equal security for a far smaller key
private key d, Cipher text Cp.
size, thereby reducing processing overhead[8].

Output : Plane Text m. It looks though public-key schemes can provide all
functions required by modern security protocols., but

20
ISSN:2249-5789
Prashant Kumar Arya et al , International Journal of Computer Science & Communication Networks,Vol 5(1),17-21

the major drawback in practice is that encryption of International Conference on Intelligent Network and
data is extremely slow- with public key algorithms. Computing(ICINC 2010), pp V2-475-V2-478.
Many block and stream ciphers can encrypt about one
[4] Vivak Kapoor, Vivak Sonny Abraham, Ramesh Singh,
hundred to one thousand times faster than public key
Elliptic Curve Cryptography, ACM Ubiquity Volume 9,
algorithms. Thus somewhat ironically, public key Issuse 20, May 2008 .
cryptography is rarely used for actual encryption of
data. On the other hand, symmetric algorithms are poor [5] P. K. Shau, Dr. R. K. Chhotray, Dr. Gunamani Jena, Dr. S
at providing non-repudiation and key establishment Pattnaik, An Implementation of Elliptic Curve
functionality. In order to use the best of both worlds, Cryptography, International Journal of Engineering Research
and Technology(IJERT) ISNN: 2278-0181, Vol 2 Issue 1,
most practical protocols are hybrid protocols which
January 2013.
incorporate both symmetric and public key algorithms.
example include the SSL/TLS protocols that is [6] Swadeep Singh, Anupriya Garg, Anshul Sachdeva,
commonly used for secure web connection, or IPsec, Comparision of Cryptograpic Algorithms ECC and RSA,
the security part of the Internet communication International Journal of Computer Science and
protocol. Communication Engineering (IJCSC), Special issue on
Recent Advances in Engineering & Technology NCRAET-
5. References 2013, ISSN 2319-7080.

[1] William Stalling, Cryptography and Network Security [7] S Nithya, Dr E. George, Pankaj Raj, Survey on
Principal and Practice, Third Edition, Pearson 2006. Asymmetric key Cryptography Algorithms, Journal of
Advanced Computing Technologies (ISSN: 2347-2804)
[2] Atul Kahate, Cryptography and Network Security, Tata
Volume NO. 2 Issue No. 1, Febuary 2014.
McGraw Hill Education Private Limited, Seventh Edition
2009. [8] Christof Paar, Jan Pelzl, Understanding Cryptography,
[3] Himanshu Gupta, Dr Vinod Kumar Sharma, Multiphase Sprigner, ISBN 978-3-642-04100-6, 2010, page no. 170-172.
Encryption: A New Concept in Modern Cryptography,
Algorithm Crypto Security Level( in bit) Advantage Disadvantage
Family system
80 128 192 256

Integer RSA 1024 307 7680 15360 Only intended user can read Many secret key encryption
factorization 2 the message using their private methods that is significantly
key. faster than any current
available public-key
encryption.

Discrete logarithm DH 1024 307 7680 15360 The shared key (i.e the secret) Lack of authentication.
2 is never itself transmitted over
the channel.

Discrete logarithm DSA 1024 307 7680 15360 It is used for authentication and The security of private key
2 integrity. depends entirely on the security
of the computer.

Discrete logarithm ElGamal 1024 307 7680 15360 The same planetext gives a The need for randomness and
2 different ciphertext(with near slower speed and has long
certainly ) each time it is ciphertext.
encrypted.

Elliptic Curves ECC 160 256 384 512 Short key is faster and requires It is more expensive and it
less computing power. shortens the life time of
batteries.

Table 1
21

Potrebbero piacerti anche