A Comparison Between ‘Encryption and Decryption’

Embed Size (px)

Citation preview

  • 7/24/2019 A Comparison Between Encryption and Decryption

    1/15

    A Comparison Between Encryption

    And Decryption AlgorithmsSubmitted by

    Name: R!" #A$$NA"%

    Regd& No& '()'*'(*'*

    Department o+ Computer Science , Engineering

    "$ER- SA .N"/ERS"$0- B1.BANES2AR

  • 7/24/2019 A Comparison Between Encryption and Decryption

    2/15

    $ypes o+ Cryptography

    In private key cryptography or symmetric

    key crytography , only one key is used for

    encryption and decryption which is

    shared among sender and receiver.

    In public key cryptography or asymmetric

    key , a user has a pair of cryptographic

    keysa public key and a private key. The

    private key is kept secret, while the public

    key may be widely distributed.

  • 7/24/2019 A Comparison Between Encryption and Decryption

    3/15

    R.S.A

    by Rivest, Shamir !dleman of "IT in #$%%RSAis an algorithm used by modern computers

    to encrypt and decrypt messages.It is an

    asymmetric cryptographic algorithm.

    It is based on the fact that finding the factors ofa integer is hardand e&ponentiation in a finitefield over integers modulo a prime .

  • 7/24/2019 A Comparison Between Encryption and Decryption

    4/15

    RSA AlgorithmThe keys for the RS! algorithm are generated the

    following way'#. (hoose two different large random prime numbers

    pand q

    ). (alculate n=p*q

    nis the modulus for the public key and the private

    keys

    *. (alculate the totient' (n) = (p 1)(q 1)

    +. (hoose an integer esuch that 1 < e < (n), and

    eis coprime to (n) ie: and share no factors

    other than # gcd(e, (n) ) = 1.eis released as the public key e&ponent

    -. (ompute to satisfy the congruence relation

    de 1 mod((n))ie:d 1+k(n) for some

    integer k. d is kept as the private key e&ponent.

  • 7/24/2019 A Comparison Between Encryption and Decryption

    5/15

    Encrypting !essages

    !lice gives her public key n e/ to 0ob andkeeps her private key secret. 0ob wants to send

    message !to !lice.1irst he turns !into a number smaller than n

    by using an agreed2upon reversible protocol

    known as a padding scheme. 3e then computes

    the cipherte&t ccorresponding to' c=(m^e)

    mod nThis can be done 4uickly using the method

    of e&ponentiation by s4uaring. 0ob then sends c

    to !lice.

  • 7/24/2019 A Comparison Between Encryption and Decryption

    6/15

    Decrypting !essages!lice can recover mfrom cby using her

    private key e&ponent dvia computingm= (c^d) mod n

    5iven m, she can recover the original

    message M by reversing the padding

    scheme

    67T8' 0oth of the calculations inencryption and decryption can be

    computed efficiently using the s4uare2and2

    multiply algorithm for modular

    e&ponentiation.

  • 7/24/2019 A Comparison Between Encryption and Decryption

    7/15

    A 2or3ing E4ample

    3ere is an e&ample of RS! encryption and decryption.

    #.(hoose two random prime numbers 'p=61 q=53).(ompute n=pq ; 61*53=3233

    *.(ompute the totient (n) = (p 1)(q 1);60*52=3120

    +.(hoose e>1coprime to 3120 ie e=1.

    -.(hoose d to satisfy de 1 mod((n)); d=253ie

    1*253= !6"01 =1+ 15*3120 The public key isn=3233,e=1/.1or a padded message

    m,the encryption fuction is c=(m^e)mod n 9 (m^1)mod

    3233 The private key isn=3233,d=253/.The decryption

    function is m=(c^d)mod n= (c^253)mod 3233. for e&ample' to encrypt m=123,we calculate c=(123^1)

    mod 3233="55

    to decrypt c ="55, we calculate

    m=("55^253)mod 3233=123

  • 7/24/2019 A Comparison Between Encryption and Decryption

    8/15

    DES5Data Encryption Standard6

    It is a symmertic key algorithm i.e. one key is usedTo accomplish encryption, it uses two main techni4ues

    known as substitution and permutation.Substitution is mapping of one value to another

    whereas permutation is a reordering of the bit positionsfor each of the inputs.:sed a number of times in iterations called rounds.! non2linearity is also introduced into the encryption

    so that decryption will be computationally infeasible

    without the secret key. by S2bo&es/The only issue is the shared key with may be

    breached by intruders.

  • 7/24/2019 A Comparison Between Encryption and Decryption

    9/15

    2or3ing o+ DES AlgorithmThe se4uence of events that occur during an encryption

    operation.''& Initial permutation on the entire ;+ bit block of data. It

    is then split into two *) bit sub2blocks,

  • 7/24/2019 A Comparison Between Encryption and Decryption

    10/15

    Input=64-bit PlainText

    and Secretkey.i= e!t PartRi=Ri"ht Part#i=Subkey #$%6&4'-

    bit(!= )ei*tel bl+ckcipher,utput=64-bitipher

    Text

  • 7/24/2019 A Comparison Between Encryption and Decryption

    11/15

    Comparing DES and RSA

    In the table ne&t, a comparative study between @8S andRS! is presented in to fourteen factors, which areAey SiBe,0lock SiBe,(iphering @eciphering key,

    !lgorithm,8ncryption,@ecryption,Cower (onsumption,Security,

    Inherent Dulnerabilities,Aey used,Rounds,Stimulation Speed,3ardware Software Implementation and

    (iphering @eciphering !lgorithm.

  • 7/24/2019 A Comparison Between Encryption and Decryption

    12/15

    9AC$RS DES RSA

    e/el+ped in year 1977 1978

    #ey Si0e 56 bits >1024 bits

    1l+ck Si0e 64 bits Minimum 512 bits

    ipherin" 2decipherin" key

    Same Diferent

    Al"+rith3 Symmetric A!"rit#m Asymmetric A!"rit#m

    ncrypti+n M"derate S"$er

    ecrypti+n M"derate S"$erP+wer +n*u3pti+n %"$ &i!#

    Security '"t Secure (n"u!# %east Secure

    Inherent5ulnerabilitie*

    )rute *"rced+ %inear anddiferentia cry,tanaysis

    attac-

    )rute *"rced and race

    #ey *ed Same -ey used Diferent -ey used

    R+und* 16/Siteen 1/"ne

    7ardware 2 S+!twareI3ple3entati+n

    )etter in #ard$are t#anin s"t$are

    '"t (3cient

    ipherin" 2eci herin

    Diferent Same

  • 7/24/2019 A Comparison Between Encryption and Decryption

    13/15

    Conclusion8ncryption algorithm plays very important role in

    communication security. The presentation surveyed the performance of

    e&isting encryption techni4ues like @8S and RS!

    algorithms.0ased on the te&t files used and the e&perimental

    result it was concluded that RS! consumes longestencryption time.Ee also observed that @ecryption of d8S algorithm is

    better than RS!algorithm.1rom the simulation result, we evaluated that @8S

    algorithm is much better than RS! .7ur future work will focus on compared and analysed

    e&isting cryptographic algorithm like !8S, @8S and

    RS!. It will include e&periments on image and audio

    data and focus will be to improve encryption time and

    decryption time.

  • 7/24/2019 A Comparison Between Encryption and Decryption

    14/15

    Re+erences

    http'[email protected]'FFglobalHournals.orgF5(STJDolume#*F+2!2Stud

    y2of28ncryption2!lgorithms.pdf

    http'FFwww.cryptographyworld.comFdes.htmlhttps'FFsimple.wikipedia.orgFwikiFRSAJalgorithm/

    https'FFen.wikipedia.orgFwikiF@ataJ8ncryptionJStand

    ard

    https'FFimages.google.com

    http://www.facweb.iitkgp.ernet.in/~sourav/DES.pdfhttps://globaljournals.org/GJCST_Volume13/4-A-Study-of-Encryption-Algorithms.pdfhttps://globaljournals.org/GJCST_Volume13/4-A-Study-of-Encryption-Algorithms.pdfhttp://www.cryptographyworld.com/des.htmlhttps://simple.wikipedia.org/wiki/RSA_(algorithm)https://simple.wikipedia.org/wiki/RSA_(algorithm)https://simple.wikipedia.org/wiki/RSA_(algorithm)https://simple.wikipedia.org/wiki/RSA_(algorithm)https://simple.wikipedia.org/wiki/RSA_(algorithm)https://en.wikipedia.org/wiki/Data_Encryption_Standardhttps://en.wikipedia.org/wiki/Data_Encryption_Standardhttps://images.google.com/https://images.google.com/https://en.wikipedia.org/wiki/Data_Encryption_Standardhttps://en.wikipedia.org/wiki/Data_Encryption_Standardhttps://simple.wikipedia.org/wiki/RSA_(algorithm)https://simple.wikipedia.org/wiki/RSA_(algorithm)https://simple.wikipedia.org/wiki/RSA_(algorithm)https://simple.wikipedia.org/wiki/RSA_(algorithm)https://simple.wikipedia.org/wiki/RSA_(algorithm)http://www.cryptographyworld.com/des.htmlhttps://globaljournals.org/GJCST_Volume13/4-A-Study-of-Encryption-Algorithms.pdfhttps://globaljournals.org/GJCST_Volume13/4-A-Study-of-Encryption-Algorithms.pdfhttp://www.facweb.iitkgp.ernet.in/~sourav/DES.pdf
  • 7/24/2019 A Comparison Between Encryption and Decryption

    15/15

    &A' .