Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Cryptography

Similar presentations


Presentation on theme: "Introduction to Cryptography"— Presentation transcript:

1 Introduction to Cryptography
Lecture 3

2 Division Principle Let m be a positive integer and let b be any integer. Then there is exactly one pair of integers q (quotient) and r (remainder) such that b = qm + r, r < m. If x and y are relatively prime, than exists s and t such that sx + ty = gcd(x,y) = 1. If exist s and t such that sx + ty = 1, than x and y are relatively prime.

3 Modular Arithmetic Definition: Let m be a positive integer. We say that two integers x and y are congruent modulo m if x - y is evenly divisible by m Notation: Example:

4 Modular Arithmetic Rules: Example:

5 Modular Arithmetic Question: What are the possible reminders when the number n is divided by m? {0,1,….,m-1} Example: If we have mod 2 operation, only reminders we will have are {0,1}. 0 - for evens 1 - for odds

6 Modular Arithmetic Example: Make a table of y-values for
We only need to check possible reminder of division by 12. x 1 2 3 4 5 6 7 8 9 10 11 x-11 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 y

7 Modular Arithmetic Theorem: Let m be a positive integer and let 0 < x < m. There is 0 < s < m, such that xs = 1 if and only if gcd(x,m) = 1. Definition: Such s is called the inverse of x mod m. s is unique

8 Modular Arithmetic Example: Let m = 17 and x = 11.
Then gcd(17,11) = 1 and using extended Euclidean algorithm we can find: and 14 is the inverse of 11 mod 17.

9 Fermat’s Little Theorem
If p is prime, then for every x, Example:

10 Methods of Attacks Ciphertext-Only Attack Known-Plaintext Attack
Chosen-Plaintext Attack Chosen-Ciphertext Attack

11 Ciphertext-Only Attack
Know A portion of ciphertext Method of encryption and decryption Find Plaintext Key

12 Known-Plaintext Attack
A portion of ciphertext and corresponding plaintext Method of encryption and decryption Find Key

13 Chosen-Plaintext Attack
Know Method of encryption and decryption Can choose Plaintext Find Key

14 Chosen-Ciphertext Attack
Know Method of encryption and decryption Can choose Ciphertext Find Key

15 Homework Read pg.51-54, Exercises: 4(b,c), 5(b,d), 6 on pg Exercises: 2(a,c) on pg.80. Those questions will be a part of your collected homework.


Download ppt "Introduction to Cryptography"

Similar presentations


Ads by Google