RSA Use in Encryption - PowerPoint PPT Presentation

About This Presentation
Title:

RSA Use in Encryption

Description:

Lecture 6 RSA Use in Encryption to encrypt a message M the sender: obtains public key of recipient PU={e,n} computes: C = Me mod n, where 0 M – PowerPoint PPT presentation

Number of Views:118
Avg rating:3.0/5.0
Slides: 15
Provided by: ner101
Category:
Tags: rsa | encryption | number | prime | use

less

Transcript and Presenter's Notes

Title: RSA Use in Encryption


1
Lecture 6
2
RSA Use in Encryption
  • to encrypt a message M the sender
  • obtains public key of recipient PUe,n
  • computes C Me mod n, where 0Mltn
  • to decrypt the ciphertext C the owner
  • uses their private key PRd,n
  • computes M Cd mod n
  • note that the message M must be smaller than the
    modulus n (block if needed)

3
RSA Example - En/Decryption
  • sample RSA encryption/decryption is
  • given message M 88
  • Publish public key PU7,187
  • Keep secret private key PR23,187
  • encryption
  • C 887 mod 187 11
  • decryption
  • M 1123 mod 187 88

4
Assignments
  • Perform encryption and decryption using RSA
    algorithm, as in Figure 1, for the following
  • p 3 q 11, e 7 M 5
  • p 5 q 11, e 3 M 9
  • In a public-key system using RSA, you intercept
    the ciphertext C 10 sent to a user whose public
    key is e 5, n 35. What is the plaintext M?

5
Why RSA Works
  • because of Euler's Theorem
  • aø(n)mod n 1 where gcd(a,n)1
  • in RSA have
  • np.q
  • ø(n)(p-1)(q-1)
  • carefully chose e d to be inverses mod ø(n)
  • hence e.d1k.ø(n) for some k
  • hence Cd Me.d M1k.ø(n) M1.(Mø(n))k
  • M1.(1)k M1 M mod n

6
Efficient Encryption
  • Encryption uses exponentiation to power e
  • Hence if e small, this will be faster
  • often choose e65537 (216-1)
  • also see choices of e3 or e17
  • But if e too small (eg e3) can attack
  • using Chinese remainder theorem 3 messages with
    different moduli

7
Efficient Decryption
  • Decryption uses exponentiation to power d
  • this is likely large, insecure if not
  • can use the Chinese Remainder Theorem (CRT) to
    compute mod p q separately. then combine to get
    desired answer

8
Exponentiation
  • can use the Square and Multiply Algorithm
  • a fast, efficient algorithm for exponentiation
  • concept is based on repeatedly squaring base
  • and multiplying in the ones that are needed to
    compute the result
  • look at binary representation of exponent
  • only takes O(log2 n) multiples for number n
  • eg. 75 74.71 3.7 10 mod 11
  • eg. 3129 3128.31 5.3 4 mod 11

9
Exponentiation
  • The algorithm for computing ab mod n
  • The b integer is expressed as as binary number
    bk , bk-1 ,, b0

10
Example
  • Get 7 5 mod 11 ?? ? ab mod n as in th
    algorithm
  • So b 5 ? 101
  • n 11 a 7
  • The final result is 10

1 0 1
b0 b1 b2
d c Ask? b(k) k
1 0
1 0 2
7 1 Yes b2 1
5 2 1
No
3 4 0
10 5
11
Example
  • Get 10 3 mod 60 ?? ? ab mod n as in th
    algorithm
  • So b 3 ? 11
  • n 60 a 10
  • The final result is 40

1 1
b0 1b2
d c Ask? b(k) k
1 0
1 0 1
10 1 Yes b1 1
40 2 0
40 3 Yes b0 1
12
RSA Security
  • three approaches to attacking RSA
  • brute force key search (infeasible given size of
    numbers)
  • mathematical attacks (based on difficulty of
    computing ø(N), by factoring modulus N)
  • timing attacks (on running of decryption)

13
Factoring Problem
  • mathematical approach takes 3 forms
  • factor Np.q, hence find ø(N) and then d
  • determine ø(N) directly and find d
  • find d directly
  • currently believe all equivalent to factoring
  • have seen slow improvements over the years
  • as of Aug-99 best is 130 decimal digits (512) bit
    with GNFS
  • biggest improvement comes from improved algorithm
  • cf Quadratic Sieve to Generalized Number Field
    Sieve
  • barring dramatic breakthrough 1024 bit RSA
    secure
  • ensure p, q of similar size and matching other
    constraints

14
Summary
  • have considered
  • prime numbers
  • Fermats and Eulers Theorems
  • Primality Testing
  • Chinese Remainder Theorem
  • Discrete Logarithms
  • principles of public-key cryptography
  • RSA algorithm, implementation, security
Write a Comment
User Comments (0)
About PowerShow.com