Applications of Number Theory - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

Applications of Number Theory

Description:

... R efficiently is by factoring m = pq, retrieving p and ... As of today, no efficient factoring algorithm is known. It is a hotly researched subject! ... – PowerPoint PPT presentation

Number of Views:477
Avg rating:3.0/5.0
Slides: 23
Provided by: isabellebi
Category:

less

Transcript and Presenter's Notes

Title: Applications of Number Theory


1
Applications of Number Theory
2
Learning Objectives
  • Further results in number theory.
  • Some applications of number theory
  • computer arithmetic with large numbers
  • public key cryptography

3
Number Theory
  • Theorem 1 gcd(a,b) sa yb (This is called
    the Extended Euclidean Algorithm).
  • Examplegcd(57, 23)
  • Execute the Euclidean algorithm keeping track of
    the quotients and remainders
  • r0 57, r1 23
  • 57 23 . 2 11 r2 11 q1 2
  • 23 11 . 2 1 r3 1 q2 2
  • 11 11x1 0 r4 0 q3 1
  • gcd (57,23) 1.
  • To obtain the desired linear combination
  • 23 11.2 1 gt 1 23 2. 11
  • 57 23.2 11 gt 11 57 2. 23
  • Thus gcd(57,23) 1 23 2. 11 23 2.(57
    2.23) -2. 57 5.23

4
Number Theory
  • Definition if ab mod c 1 we say that a is the
    inverse of b mod c. Can also be written ab ? 1
    (mod c).
  • Note If a has an inverse mod c, then it has an
    inverse which is lt c. Indeed if b is an inverse
    of a MOD c then so are all the integers b nc.
  • A 1,2,4,5,8,10,11,13,16,17,19,20 are all the
    integers lt 21 that are relatively prime to 21.
    That is ?n?A (gcd(21,n) 1).
  • Note 2x11 mod 21 1 8x8 1 mod 21 5x17
    1 mod 21. A little more effort and you can
    quickly check that ?n ? A ?m (nm mod 21 1). (In
    words every member of A has an inverse mod 21
    belonging to A).

5
Number Theory
  • Lemma 1 a,b and c are positive integers.
    gcd(a,b) 1 (p) and a bc (q) then a c (r).
  • (We have here 3 propositions, p, q and r. The
    lemma states that the compound proposition p ? q
    ? r is TRUE).
  • Proof
  • p ? 1 sa tb (Theorem 1).
  • c sac tbc (multiplication by c)
  • since a bc (q) a sac ? a tbc
  • thus a sac tbc c. QED.
  • Remark if a c ? b c MOD e then a ? b MOD e.
    That is in modular arithmetic a cancellation rule
    for addition holds. On the other hand, if ac ? bc
    MOD e there is no general cancellation rule.
  • For example 14 ? 8 MOD 6 but 14 / 2 ? 1 (mod 6)
    while 8/2 ? 4 (mod 6).

6
Number Theory
  • Theorem 2 Let m, a, b, c be positive integers.
    Let ac ? bc (mod m) and gcd(c,m) 1 then a ? b
    (mod m). (the compound proposition p ? q ? r is
    TRUE where p ac ? bc (mod m), q gcd(c,m) 1
    and r a ? b (mod m) ).
  • Proof
  • p ? m ac bc c(a b) (m divides ac-bc)
  • q ? m (a b) (by Lemma 1).
  • But this means that a ? b (mod m) QED.
  • Observations
  • 1. If p is prime and p a1a2 . . . an then ?j
    such that p aj.2. Every integer n has a unique
    factorization into a product of primes.

7
Number Theory
  • Theorem 3 if a and b are relatively prime
    integers (b gt 1), then an inverse of a modulo b
    exists. Furthermore, this inverse is unique
    modulo b.
  • This is a direct consequence of the Extended GCD.
    Indeed if GCD(a,b) 1 then there are integers n1
    and n2 such that n1a n2b 1. Or n1a MOD b 1
    because n1b ? 0 (mod b). So n1 is an inverse of a
    modulo b.
  • In the example above gcd(57,23) 1 thus 57 has
    an inverse MOD 23.
  • We have gcd(57,23) 1 -2x57 5x23.
  • Thus 2 is an inverse of 57 MOD 23 and so is 2
    23 21. Indeed 5721 1197 2352 1.

8
Number Theory
  • Linear Congruences ax ? b (mod m)
  • Example Solve 35x ? 36 (mod 41)
  • Answer x 35.
  • Verify 3535 1225 4129 36
  • 3535 ? 36 (mod 41)
  • How do we solve it?
  • Recall a is the inverse of b (mod m) if ab ? 1
    (mod m)
  • How to solve ax ? b (mod m)?
  • Let y be the inverse of a (mod m).
  • x by (mod m)

9
Number Theory
  • Example solve 72x ? 47 (mod 133)
  • Step 1 find 72-1 (mod 133)
  • 133 721 61
  • 72 611 11
  • 61 115 6
  • 11 61 5
  • 6 51 1
  • gcd(133,72) 1.
  • 1 6 5 26 11 261 1111
  • 1361 1172 13133 2472 ( 1729 1728)
  • so 72-1 (mod 133) 133 24 109.
  • x 10947 (mod 133) 13338 69 (mod 133)
    69
  • Verify 6972 (mod 133) 4968 (mod 133)
  • 37133 47 (mod 133) 47.

10
Number Theory
  • Theorem 1 gcd(a,b) sa yb (This is called
    the Extended Euclidean Algorithm).
  • Lemma 1 a,b and c are positive integers.
    GCD(a,b) 1 (p) and a bc (q) then a c (r).
  • Theorem 2 Let m, a, b, c be positive integers.
    Let ac ? bc (mod m) and gcd(c,m) 1 then a ? b
    (mod m). (the compound proposition p ? q ? r is
    TRUE where p ac ? bc (mod m), q gcd(c,m) 1
    and r a ? b (mod m) ).
  • Theorem 3 if a and b are relatively prime
    integers (b gt 1), then an inverse of a modulo b
    exists. Furthermore, this inverse is unique
    modulo b.

11
Number Theory
  • Examplesgcd(35,78) a . 35 b . 78 29 . 35
    - 13 . 7878 2 . 35 835 4 . 8 38 2 .
    3 23 1 . 2 1gcd(35, 78) 11 3 -
    1.22 8 - 2 . 3 1 3 - 8 2 .3 3 . 3 - 83
    35 - 4 . 81 3 . 35 - 12 . 8 - 8 3 . 35 -
    13 .88 78 - 2 . 351 3 . 35 - 13 . 78 26 .
    35 29 . 35 - 13 . 78

12
Number Theory
  • Examples937 is an inverse of 13 modulo
    2436937 . 13 ? 1 (mod 2436) 937 . 13 12181
    5 . 2436 1

13
Number Theory
  • Examplesfind an inverse of 19 modulo
    141gcd(19, 141) 1, so there is an inverse of
    19 modulo 141.141 7 . 19 819 2 . 8
    38 2 .3 23 1 . 2 11 3 - 1 . 2 3
    - 8 2 . 3 - 8 3 . 31 -8 3 . (19 - 2 .
    8) -7 . 8 3. 191 -7. 141 49 . 19 3 .
    19 -7 . 141 52 . 19inverse of 19 (mod 141)
    52

14
Number Theory
  • Examplessolve the congruence 4x ? 5 (mod 9)x
    4 -1 . 5 an inverse of 4 (mod 9) is -2
    because 9 2. 4 1, which means 1 -2.4
    9x -2 . 5 -10 ? 8 (mod 9)

15
Number Theory
16
Number Theory
17
Number Theory
18
Number Theory
  • Some of The Mathematics used in Encryption.
  • Private key encryption both sender and receiver
    share the same secret key. For instance the key
    might be a 128 bit long binary sequence B. To
    encode break your message into 128 bit long
    chunks. For each chunk C send the 128 bit
    sequence B ? C. To decode, the receiver will
    retrieve B by calculating B ? (B ? C) C.
  • There are two problems with this scheme
  • Each pair of (sender, receiver) must have their
    own private keys.
  • The key must be somehow sent to the sender (or
    receiver).
  • To overcome this difficulty, Diffie and Hellman
    developed the idea of breaking each key into two
    parts a public part which every one can see and
    use and a private part which only the intended
    party will have. Thus, if a sender wishes to send
    a message to a receiver, hell use the receivers
    public key to encode the message. Only the person
    knowing the private key will be able to decode
    the message.
  • A mathematical implementation of this idea was
    developed by Rivest, Shamir and Adelman (3
    mathematicians at MIT).

19
Number Theory
  • The RSA (Rivest, Shamir, Adelman) encryption
  • Select two large primes p and q. Let m pq.
  • Select a number e such that gcd(e, (p-1)(q-1))
    1.
  • Tell the world that if anyone wants to send you
    a message R, send f(R) Re mod m. (if R gt m,
    then break R into chunks, each smaller than m,
    encrypt each chunk separately).
  • How do we decrypt?
  • Calculate d e-1 mod (p-1)(q-1).
  • Decrypt assume k Re mod m.
  • Calculate kd mod m. This is R.

20
Number Theory
  • Why?
  • kd mod m Red mod m Ra(p-1)(q-1) 1 mod m
  • R(R(p-1)(q-1))a mod m
  • R(p-1) mod p 1 (Fermat)
  • R(q-1) mod q 1 (Fermat)
  • Therefore R(p-1)(q-1) mod pq 1
  • And (R(p-1)(q-1))a mod pq 1
  • So R(R(p-1)(q-1))a mod pq R
  • Can anyone else retrieve R? Currently, the
    only way we know how to calculate R efficiently
    is by factoring m pq, retrieving p and q,
    calculate (p-1)(q-1). Calculate e-1, the inverse
    of e mod (p-1)(q-1).
  • As of today, no efficient factoring algorithm
    is known. It is a hotly researched subject!

21
RSA Encryption
  • Caesar cipher f(p) (p 3) mod
    26Decryption f-1(p) (p - 3) mod 26
  • RSA (Rivest /Shamir / Adleman) system for public
    key cryptography
  • encryption key n pq (p, q large primes)
  • exponent e relatively prime to (p-1)(q-1)

22
RSA Encryption
  • RSA encryption plaintext --gt integer M --gt
    integer C Me mod n
  • RSA decryptiond decryption key an inverse
    of e mod (p-1)(q-1)integer P Cd mod n
Write a Comment
User Comments (0)
About PowerShow.com