DTTF/NB479: Dszquphsbqiz Day 9 Announcements: Homework 2 due now Homework 2 due now Computer quiz Thursday on chapter 2 Computer quiz Thursday on chapter.

Slides:



Advertisements
Similar presentations
COMP 170 L2 Page 1 L06: The RSA Algorithm l Objective: n Present the RSA Cryptosystem n Prove its correctness n Discuss related issues.
Advertisements

1 Photograph, drawing, diagram, or graph supporting the headline assertion Call-out, if needed: no more than two lines In an assertion-evidence slide,
Cryptography and Network Security
Chapter 8 – Introduction to Number Theory. Prime Numbers prime numbers only have divisors of 1 and self –they cannot be written as a product of other.
Section 4.1: Primes, Factorization, and the Euclidean Algorithm Practice HW (not to hand in) From Barr Text p. 160 # 6, 7, 8, 11, 12, 13.
Having Proofs for Incorrectness
Chapter 8 Introduction to Number Theory. Prime Numbers prime numbers only have divisors of 1 and self –they cannot be written as a product of other numbers.
Primality Testing Patrick Lee 12 July 2003 (updated on 13 July 2003)
Announcements: 1. Congrats on reaching the halfway point once again! 2. DES graded soon 3. Short “pop” quiz on Ch 3. (Thursday at earliest) 4. Reminder:
Public Key Cryptosystems - RSA Receiver Sender Eavesdroppe r p q p q p q p and q prime.
Data encryption with big prime numbers
Chapter 8 More Number Theory. Prime Numbers Prime numbers only have divisors of 1 and itself They cannot be written as a product of other numbers Prime.
22C:19 Discrete Math Integers and Modular Arithmetic Fall 2010 Sukumar Ghosh.
Announcements: Please use pencil on quizzes if possible Please use pencil on quizzes if possible Knuth quotes, part 1 Knuth quotes, part 1Questions?Today:
Announcements: See schedule for weeks 8 and 9 See schedule for weeks 8 and 9 Project workdays, due dates, exam Project workdays, due dates, exam Projects:
Announcements: 1. Pass in Homework 5 now. 2. Term project groups and topics due by Friday 1.Can use discussion forum to find teammates 3. HW6 posted, due.
1 Chapter 7– Introduction to Number Theory Instructor: 孫宏民 Room: EECS 6402, Tel: , Fax :
The RSA Cryptosystem and Factoring Integers (II) Rong-Jaye Chen.
Announcements: Homework 1 returned. Comments from Kevin? Homework 1 returned. Comments from Kevin? Matlab: tutorial available at
Complexity1 Pratt’s Theorem Proved. Complexity2 Introduction So far, we’ve reduced proving PRIMES  NP to proving a number theory claim. This is our next.
Announcements: 1. Congrats on reaching the halfway point once again! 2. Reminder: HW5 due tomorrow, HW6 due Tuesday after break 3. Term project groups.
and Factoring Integers
Announcements: HW3 updated. Due next Thursday HW3 updated. Due next Thursday Written quiz today Written quiz today Computer quiz next Friday on breaking.
Announcements: HW3 updated. Due next Thursday HW3 updated. Due next Thursday Written quiz tomorrow on chapters 1-2 (next slide) Written quiz tomorrow on.
Announcements: 1. Pass in worksheet on using RSA now. 2. DES graded soon 3. Short “pop” quiz on Ch 3 (Thursday at earliest) 4. Term project groups and.
Chapter 8 – Introduction to Number Theory Prime Numbers  prime numbers only have divisors of 1 and self they cannot be written as a product of other numbers.
Chapter 8 – Introduction to Number Theory Prime Numbers
Chapter 8 – Introduction to Number Theory Prime Numbers  prime numbers only have divisors of 1 and self they cannot be written as a product of other numbers.
Announcements: Homework 2 due now Homework 2 due now Quiz this Friday on concepts from chapter 2 Quiz this Friday on concepts from chapter 2 Practical.
Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations Copyright © The McGraw-Hill Companies, Inc. Permission required.

1 Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown Chapter 4 – Finite Fields.
Section 4.3: Fermat’s Little Theorem Practice HW (not to hand in) From Barr Text p. 284 # 1, 2.
Methods of Proof. This Lecture Now we have learnt the basics in logic. We are going to apply the logical rules in proving mathematical theorems. Direct.
Prabhas Chongstitvatana 1 Primality Testing Is a given odd integer prime or composite ? No known algorithm can solve this problem with certainty in a reasonable.
Elements of Coding and Encryption Continuation 1.
Chinese Remainder Theorem Dec 29 Picture from ………………………
Fall 2002CS 395: Computer Security1 Chapters 4 and 8: The Mathematics Required for Public Key Cryptography In case you’re beginning to worry that this.
1 Network and Computer Security (CS 475) Modular Arithmetic and the RSA Public Key Cryptosystem Jeremy R. Johnson.
Network and Computer Security (CS 475) Modular Arithmetic
9/22/15UB Fall 2015 CSE565: S. Upadhyaya Lec 7.1 CSE565: Computer Security Lecture 7 Number Theory Concepts Shambhu Upadhyaya Computer Science & Eng. University.
1 Section Congruences In short, a congruence relation is an equivalence relation on the carrier of an algebra such that the operations of the algebra.
Chinese Remainder Theorem. How many people What is x? Divided into 4s: remainder 3 x ≡ 3 (mod 4) Divided into 5s: remainder 4 x ≡ 4 (mod 5) Chinese Remainder.
The Euler-Fermat Theorem Our text calls this “Euler’s Formula”, but I prefer the above name, giving due credit to Fermat. Obvious question: Can Fermat’s.
Introduction to Number Theory
Introduction to Number Theory Department of Computer Engineering Sharif University of Technology 3/8/2006.
9.1 Primes and Related Congruence Equations 23 Sep 2013.
Great Theoretical Ideas in Computer Science.
Data encryption with big prime numbers DANIEL FREEMAN, SLU.
CS480 Cryptography and Information Security
Lecture 6. RSA Use in Encryption to encrypt a message M the sender: – obtains public key of recipient PU={e,n} – computes: C = M e mod n, where 0≤M
Chapter Applications of Number Theory Some Useful Results
CSE565: Computer Security Lecture 7 Number Theory Concepts
Topic 12: Number Theory Basics (2)
DTTF/NB479: Dszquphsbqiz Day 22
Cryptography and Network Security
Introduction to Number Theory
Cryptography and Network Security Chapter 8
Number Theory (Chapter 7)
Cryptography and Network Security
Cryptography and Network Security
Modular Arithmetic and Change of Base
Applied Symbolic Computation (CS 300) Modular Arithmetic
Systems Architecture I
Applied Symbolic Computation (CS 300) Modular Arithmetic
Applied Symbolic Computation (CS 300) Modular Arithmetic
Applied Symbolic Computation (CS 300) Modular Arithmetic
Applied Symbolic Computation (CS 300) Modular Arithmetic
Rayat Shikshan Sanstha’s S.M.Joshi College, Hadapsar -28
Clements MAΘ October 30th, 2014
Presentation transcript:

DTTF/NB479: Dszquphsbqiz Day 9 Announcements: Homework 2 due now Homework 2 due now Computer quiz Thursday on chapter 2 Computer quiz Thursday on chapter 2Questions?Today: Wrap up congruences Wrap up congruences Fermat’s little theorem Fermat’s little theorem Euler’s theorem Euler’s theorem Both really important for RSA – pay careful attention! Both really important for RSA – pay careful attention!

The Chinese Remainder Theorem establishes an equivalence A single congruence mod a composite number is equivalent to a system of congruences mod its factors Two-factor form Given gcd(m,n)=1. For integers a and b, there exists exactly 1 solution (mod mn) to the system: Given gcd(m,n)=1. For integers a and b, there exists exactly 1 solution (mod mn) to the system:

CRT Equivalences let us use systems of congruences to solve problems Solve the system: How many solutions? Find them. Find them. Q

Chinese Remainder Theorem n-factor form Let m 1, m 2,… m k be integers such that gcd(m i, m j )=1 when i ≠ j. For integers a 1, … a k, there exists exactly 1 solution (mod m 1 m 2 …m k ) to the system: Let m 1, m 2,… m k be integers such that gcd(m i, m j )=1 when i ≠ j. For integers a 1, … a k, there exists exactly 1 solution (mod m 1 m 2 …m k ) to the system:

Modular Exponentiation is extremely efficient since the partial results are always small Compute the last digit of Compute (mod 19) Idea: Get the powers of 3 by repeatedly squaring 3, BUT taking mod at each step. Get the powers of 3 by repeatedly squaring 3, BUT taking mod at each step. Q

Modular Exponentiation Technique and Example Compute (mod 19) Technique: Repeatedly square 3, but take mod at each step. Repeatedly square 3, but take mod at each step. Then multiply the terms you need to get the desired power. Then multiply the terms you need to get the desired power. Book’s powermod() (All congruences are mod 19)

Modular Exponentiation Example Compute (mod 152)

Fermat’s Little Theorem: If p is prime and gcd(a,p)=1, then a (p-1) ≡1(mod p) 8 1-2

Fermat’s Little Theorem: If p is prime and gcd(a,p)=1, then a (p-1) ≡1(mod p) Examples: 2 2 =1(mod 3) 2 2 =1(mod 3) 6 4 =1(mod ???) 6 4 =1(mod ???) ( )(mod 19) ( )(mod 19) S= f(1)=2 f(2)=4 f(3)=6 f(4)=1 f(5)=3 f(6)=5 Example: a=2, p=7 1-2

The converse when a=2 usually holds Fermat: If p is prime and doesn’t divide a, Converse: If, then p is prime and doesn’t divide a. This is almost always true when a = 2. Rare counterexamples: n = 561 =3*11*17, but n = 561 =3*11*17, but n = 1729 = 7*13*19 n = 1729 = 7*13*19 Can do first one by hand if use Fermat and combine results with Chinese Remainder Theorem Can do first one by hand if use Fermat and combine results with Chinese Remainder Theorem

Primality testing schemes typically use the contrapositive of Fermat Even? div by other small primes? Prime by Factoring/ advanced techn.? n no yes prime

Primality testing schemes typically use the contrapositive of Fermat Use Fermat as a filter since it’s faster than factoring (if calculated using the powermod method). Even? div by other small primes? Prime by Factoring/ advanced techn.? n no yes prime Fermat: p prime  2 p-1 ≡ 1 (mod p) Contrapositive? Why can’t we just compute 2 n-1 (mod n) using Fermat if it’s so much faster? 3

Euler’s Theorem is like Fermat’s, but for composite moduli If gcd(a,n)=1, then So what’s  (n)? 13 4

 (n) is the number of integers a, such that 1 ≤ a ≤ n and gcd(a,n) = 1. Examples:   (10) = When p is prime,  (p) = ____ 3. When n =pq (product of 2 primes),  (n) = ____ 14 5

The general formula for  (n) Example:  [Bill Waite, RHIT 2007] 6 p are distinct primes

Euler’s Theorem can also lead to computations that are more efficient than modular exponentiation as long as gcd(a,n) = 1 Examples: 1. Find last 3 digits of Find (mod 12) 3. Find (mod 99) 4. Find (mod 101) Basic Principle: when working mod n, view the exponents mod  (n). 7-10