Rsa encryption
This presentation is the property of its rightful owner.
Sponsored Links
1 / 14

RSA Encryption PowerPoint PPT Presentation


  • 87 Views
  • Uploaded on
  • Presentation posted in: General

RSA Encryption. William Lu. RSA Background. Basic technique first discovered in 1973 by Clifford Cocks of CESG (part of British GCHQ) Invented in 1977 by Ron Rivest, Adi Shamir and Len Adleman. RSA Uses. Public key encryption Digital signatures. RSA Algorithm.

Download Presentation

RSA Encryption

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Rsa encryption

RSA Encryption

William Lu


Rsa background

RSA Background

  • Basic technique first discovered in 1973 by Clifford Cocks of CESG (part of British GCHQ)

  • Invented in 1977 by Ron Rivest, Adi Shamir and Len Adleman


Rsa uses

RSA Uses

  • Public key encryption

  • Digital signatures


Rsa algorithm

RSA Algorithm

  • Generate two large random primes, p and q, of approximately the same size

    • e.g. for 1024 bit encryption, p and q should be about 512 bits each

  • Compute n = pq and φ = (p-1)(q-1)

  • Choose e where 1<e<φ such that gcd(e,φ) = 1

  • Compute d where 1<d<φ such that ed = 1 mod φ


Rsa algorithm1

RSA Algorithm

  • Public key = (e,n)

  • Private key = (d,n)


Generate primes

Generate Primes

  • Get a pseudo random number

  • Use Fermat’s Little Theorem to test for prime

    • For prime n and any a, an mod n = a

    • For composite n and any a, an mod n ≠ a

  • BUT

  • If an mod n = a, n could be a composite


Generate primes1

Generate Primes

  • Does Fermat’s Little Theorem guarantee primes?

    • NO!

  • What is it for?

    • With enough rounds, n is probably prime

    • Much faster then testing with all primes < n


Generate exponents e and d

Generate Exponents e and d

  • For public exponent, e, pick any prime

    • Common choices are 3, 17 and 65537 (216 + 1)

  • For secret exponent, d, compute the modular inverse of e mod φ

    • Use Extended Euclidean Algorithm


Extended euclidean algorithm

Extended Euclidean Algorithm

  • To find inverse of e mod n:

    • Find quotient and remainder of n/e at each step

    • Also carry an auxiliary number ui = ui-2 – ui-1qi-2 mod n

    • Initialize u0 = 0 and u1 = 1

    • For each step use the previous e as the current n and the previous remainder as the current e

    • Repeat until e = 0 and the auxiliary number is the inverse of e mod n


Extended euclidean algorithm1

Extended Euclidean Algorithm

Inverse of 5 mod 72


Encryption decryption

Encryption/Decryption

  • To encrypt message m

    • Public key = (e,n)

    • c = me mod n

  • To decrypt cipher c

    • Private key = (d,n)

    • m = cd mod n


Encryption decryption1

Encryption/Decryption

  • Public key = (5,91)

  • Private key = (29,91)

  • To encrypt message 17

    • c = 175 mod 91

    • c = 75

  • To decrypt cipher 75

    • m = 7529 mod 91

    • m = 17


Signature

Signature

  • To sign message m

    • Private key = (d,n)

    • [m] = md mod n

  • To verify signature

    • Public key = (e,n)

    • {m} = me mod n


References

References

  • RSA Algorithm

    • DI Management Services

  • Fermat’s Little Theorem

    • Mathworld

  • Extended Euclidean Algorithm

    • Wolfgang Stöcher at Profactor Research

    • Bill Cherowitzo’s references at the University of Colorado at Denver

      • Ph. D (1983) in mathematics at Columbia University


  • Login