Download presentation
Presentation is loading. Please wait.
1
COMP 170 L2 Page 1 Part 2 of Course Chapter 2 of Textbook
2
COMP 170 L2 Page 2 Part 2 of Course l Objective: Application of Number Theory in Computer security. l Number theory has a long history n E.g.: Chinese Remainder Theorem: 2300 years old l Regarded as useless until recently
3
COMP 170 L2 Page 3 Part 2 of Course l Part 2 of course: n Show how to make e-commerce secure using Number theory. n Three logic lectures: L04-L06
4
COMP 170 L2 Page 4 L04: Intro to Crypto and Modulus l Objective: n Basic mathematical concepts for Part 2 n Introduction to Cryptography l Outline n Modular Arithmetic: mod n n Operations on the set n Introduction Cryptography Private-Key Cryptography Caesar cipher: Using addition mod n Crypto using multiplication mod n Public-Key Cryptography
5
COMP 170 L2 Page 5 Modular Arithmetic
6
COMP 170 L2 Page 6 Euclid’s Division Theorem l If m = n q’ + r’, 0<= r’ <n l Then q’=q, r’=r l Examples n m=25, n=4 25 = 4 x 6 +1 q=6, r=1 n m=-25, n=4 -25 = 4 x (-7) +3 q=-7, r=3 l Will be proved later
7
COMP 170 L2 Page 7 Modular Arithmetic l Applies also to the case when m is negative.
8
COMP 170 L2 Page 8 Modular Arithmetic l Applies also to the case when m is negative.
9
COMP 170 L2 Page 9 Modular Arithmetic/Simple Properties l Note n [-25 mod 4] = 4 - [25 mod 4] l In general Example: 5 mod 4 = 1, (-5) mod 4 = 3 6 mod 4 = 2, (-6) mod 4 = 2
10
COMP 170 L2 Page 10 Modular Arithmetic/Properties
11
COMP 170 L2 Page 11 Modular Arithmetic/Properties l Examples
12
COMP 170 L2 Page 12 Intuition l Adding multiples of n to i changes the quotient, but not the remainder.
13
COMP 170 L2 Page 13
14
COMP 170 L2 Page 14
15
COMP 170 L2 Page 15 l Lemma 2.3 has a second part
16
COMP 170 L2 Page 16 L04: Intro to Crypto and Modulus l Modular Arithmetic: mod n l Operations on the set l Introduction Cryptography n Private-Key Cryptography Caesar cipher: Using addition mod n Cryto using multiplication mod n n Public-Key Cryptography
17
COMP 170 L2 Page 17 Modulo Arithmetic on the Set l Operations on
18
COMP 170 L2 Page 18
19
COMP 170 L2 Page 19 Laws of Arithmetic over Real Numbers
20
COMP 170 L2 Page 20 Properties of Operations on
21
COMP 170 L2 Page 21
22
COMP 170 L2 Page 22
23
COMP 170 L2 Page 23 l Does each n Has additive inverse? Yes. -x mod n n Has multiplicative inverse? Major question to be discussed later. Properties of Operations on
24
COMP 170 L2 Page 24 L04: Intro to Crypto and Modulus l Modular Arithmetic: mod n l Operations on the set l Introduction Cryptography n Private-Key Cryptography Caesar cipher: Using addition mod n Cryto using multiplication mod n n Public-Key Cryptography
25
COMP 170 L2 Page 25
26
COMP 170 L2 Page 26 L04: Intro to Crypto and Modulus l Modular Arithmetic: mod n l Modulo arithmetic on the set l Introduction Cryptography n Private-Key Cryptography Caesar cipher: Using addition mod n Crypto using multiplication mod n n Public-Key Cryptography
27
COMP 170 L2 Page 27 Private-Key Cryptography
28
COMP 170 L2 Page 28 Caeser Cipher and Mod 26
29
COMP 170 L2 Page 29 Caeser Cipher and Mod 26 l Encrypting l Decrypting: l E.G. s=2 n Plaintext message: SEA 18 4 0 n Cipher text: 20 6 2 n Decrypted message: 18 4 0
30
COMP 170 L2 Page 30 Caeser Cipher and Mod 26
31
COMP 170 L2 Page 31 Encrypting/Decrypting as Functions
32
COMP 170 L2 Page 32 L04: Intro to Crypto and Modulus l Modular Arithmetic: mod n l Operations on the set l Introduction Cryptography n Private-Key Cryptography Caesar cipher: Using addition mod n Crypto using multiplication mod n n Public-Key Cryptography
33
COMP 170 L2 Page 33 Cryptography with Multiplication mod n l Also possible to implement crypto system using multiplication mod n l Need to deal with an important new issue. l Plaintext: 5 7 8 l Ciphertext: 1 11 4
34
COMP 170 L2 Page 34 Cryptography with Multiplication mod n
35
COMP 170 L2 Page 35 Cryptography with Multiplication mod n
36
COMP 170 L2 Page 36 Multiplicative Inverse Exists?
37
COMP 170 L2 Page 37 Multiplicative Inverse Exists?
38
COMP 170 L2 Page 38 Multiplicative Inverse Exists?
39
COMP 170 L2 Page 39 Multiplicative Inverse Exists?
40
COMP 170 L2 Page 40 L04: Intro to Crypto and Modulus l Modular Arithmetic: mod n l Operations on the set l Introduction Cryptography n Private-Key Cryptography Caesar cipher: Using addition mod n Crypto using multiplication mod n n Public-Key Cryptography
41
COMP 170 L2 Page 41 Drawback of Private-Key Cryptosystem
42
COMP 170 L2 Page 42 Public-Key Cryptosystem
43
COMP 170 L2 Page 43 Public-Key Cryptosystem
44
COMP 170 L2 Page 44 Public-Key Cryptosystem
45
COMP 170 L2 Page 45 Public-Key Cryptosystem
46
COMP 170 L2 Page 46
47
COMP 170 L2 Page 47 Is Public-Key Cryptosystem Possible? l Need a function whose inverse is DIFFICULT to compute without private key. Sounds almost impossible. l In 1970’s, Rivest, Shamir and Adelman figured out how to do this using modular arithmetic l The result: RSA public-key crypto-system. L06.
48
COMP 170 L2 23-02-2010: Recap Page 48
49
COMP 170 L2 23-02-2010: Recap Page 49
50
COMP 170 L2 25-02-2010: Recap
51
COMP 170 L2 25-02-2010: Recap l Example of Private-Key cryptosystem n Caeser Cipher: cryptosystem using addition mod n
52
COMP 170 L2 25-02-2010: Recap l L04: Examples on multiplicative inverse l L05: n When does multiplicative inverse exist? n How to find it?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.