CSE20 Lecture 6: Number Systems 5. Residual Numbers (cont) - PowerPoint PPT Presentation

About This Presentation
Title:

CSE20 Lecture 6: Number Systems 5. Residual Numbers (cont)

Description:

CSE20 Lecture 6: Number Systems 5. Residual Numbers (cont) & 6. Cryptography CK Cheng UC San Diego * Residual Numbers (NT-1 and Shaum s Chapter 11) Introduction ... – PowerPoint PPT presentation

Number of Views:77
Avg rating:3.0/5.0
Slides: 16
Provided by: David3183
Learn more at: https://cseweb.ucsd.edu
Category:

less

Transcript and Presenter's Notes

Title: CSE20 Lecture 6: Number Systems 5. Residual Numbers (cont)


1
CSE20 Lecture 6 Number Systems5. Residual
Numbers (cont) 6. Cryptography
  • CK Cheng
  • UC San Diego

2
Residual Numbers(NT-1 and Shaums Chapter 11)
  • Introduction
  • Definition
  • Operations
  • Inverse Conversion

3
Inverse Conversion
Number x
Mod Operation
Residual number (x1, x2, , xk) , -, x
operations for each xi under mi
Moduli (m1, m2, , mk)
Results
Chinese Remainder Theorem
4
Chinese Remainder Theorem
  • Given a residual number (r1, r2, , rk) with
    moduli (m1, m2, , mk), where all mi are mutually
    prime, set M m1m2 mk, and MiM/mi.
  • 1. Find Si that (MiSi)mi 1 (Si an inverse of
    Mi in mod mi)
  • 2. The corresponding number
  • x (?i1,k(Mi Si ri))M.

5
Example
  • Given (m1,m2,m3)(2,3,7), M23742, we have
  • M1m2m33721 (M1S1)m1(21S1)21
  • M2m1m32714 (M2S2)m2(14S2)31
  • M3m1m2236 (M3S3)m3(6S3)71
  • Thus, (S1, S2, S3) (1,2,6)
  • For a residual number (0,2,1)
  • x(M1S1r1 M2S2r2 M3S3r3)M
  • (2110 1422 661 )42
  • ( 0 56 36 )42 9242 8

6
Example
  • For a residual number (1,2,5)
  • x(M1S1r1 M2S2r2 M3S3r3)M
  • (2111 1422 665)42
  • (21 56 180)42
  • 25742 5

7
Example iClicker
  • Given (m1,m2,m3)(2,3,5), M23530, we have
  • M1m2m33515 (M1S1)m1(15S1)21
  • M2m1m32510 (M2S2)m2(10S2)31
  • M3m1m2236 (M3S3)m3(6S3)51
  • Thus, (S1, S2, S3) is
  • A. (1, 1, 1)
  • B. (1, 2, 1)
  • C. (2, 1, 2)
  • D. None of the above

8
Example iClicker
  • Given (m1,m2,m3)(2,3,5), M23530, we have
  • M1m2m33515 (M1S1)m1(15S1)21
  • M2m1m32510 (M2S2)m2(10S2)31
  • M3m1m2236 (M3S3)m3(6S3)51
  • For a residual number (x1,x2,x3)(1,2,3), the
    corresponding number x is
  • A. 5
  • B. 19
  • C. 23
  • D. None of the above

9
Proof of Chinese Remainder Theorem
  • Let A ?i1,k(Mi Si ri), we show that
  • 1. Amv rv and 2. xAM is unique.
  • 1. Amv ?i1,k(Mi Si ri) mv
  • S(MiSiri) mvmv (MvSvrv)mv
  • (MvSv)mv rvmv mv rvmv rv
  • 2. Proof was shown in lecture 5.

10
6. Cryptography
  1. Introduction
  2. RSA Protocol
  3. Remarks

11
6.1 Cryptography Introduction
  • Application of residual number systems
  • Number theory (skip)
  • Show the basic concept and process
  • Many variations

12
6.2 RSA Protocol
Private M
  • Function P(X)XeN is public.
  • Function S(X)XdN is secret.
  • Message M is private, but P(M) is observed by
    all.
  • Desired feature S(P(M))M.
  • Example (e,N)(7,55), (d,N)(23,55)
  • M12 gt P(12)1275523 gt S(23)23235512
  • M8 gt P(8)87552 gt S(2)22355?

13
6.2 RSA Protocol
  • Npq where p q are primes and kept secret.
  • e is mutually prime to f(N)(p-1)(q-1)
  • d is the inverse of e mod f(N), i.e. (ed)f(N)1
  • Theorem S(P(M))P(S(M))M for 0ltMltN
  • Note that S(P(M))MedN
  • Theorem Mf(N)N1 for 0ltMltN
  • Assumption p q are hard to find. Consequently,
    it is difficult to derive d.

14
6.2 RSA Protocol
  • Npq where p q are primes and kept secret.
  • e is mutually prime to f(N)(p-1)(q-1)
  • d is the inverse of e mod f(N), i.e. (ed)f(N)1
  • Example Npq3x1133, f(N)(3-1)(11-1)20
  • Let e3, then d7 (3x7201).
  • M9 gt P(9)93333 gt S(3)3733?

15
6.3 Remark
  • Residual number system is used in cryptography.
  • RSA protocol uses public key for coding P(X) and
    secret key to decode S(X).
  • Use wide words (gt1000 bits) so that the solution
    is computationally expensive without the
    knowledge of the function S(X).
Write a Comment
User Comments (0)
About PowerShow.com