CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.

Slides:



Advertisements
Similar presentations
Prof. Shachar Lovett Clicker frequency: CA CSE 20 Discrete math Prof. Shachar Lovett
Advertisements

WS Algorithmentheorie 03 – Randomized Algorithms (Primality Testing) Prof. Dr. Th. Ottmann.
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.
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:
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.
Lecture 8: Primality Testing and Factoring Piotr Faliszewski
Introduction to Modern Cryptography Lecture 6 1. Testing Primitive elements in Z p 2. Primality Testing. 3. Integer Multiplication & Factoring as a One.
COM 5336 Cryptography Lecture 7a Primality Testing
Great Theoretical Ideas in Computer Science.
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.
Announcements: 1. Short “pop” quiz on Ch 3 (today?) 2. Term project groups and topics due midnight 3. HW6 due Tuesday. Questions? This week: Primality.
Cryptography Lecture 11: Oct 12. Cryptography AliceBob Cryptography is the study of methods for sending and receiving secret messages. adversary Goal:
Announcements: 1. Congrats on reaching the halfway point once again! 2. Reminder: HW5 due tomorrow, HW6 due Tuesday after break 3. Term project groups.
Prof. Bart Selman Module Probability --- Part e)
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.
CSE 321 Discrete Structures Winter 2008 Lecture 8 Number Theory: Modular Arithmetic.
Theory I Algorithm Design and Analysis (9 – Randomized algorithms) Prof. Dr. Th. Ottmann.
CSE 20 DISCRETE MATH Prof. Shachar Lovett Clicker frequency: CA.
CSE 20 DISCRETE MATH Prof. Shachar Lovett Clicker frequency: CA.
CSE 20 DISCRETE MATH Prof. Shachar Lovett Clicker frequency: CA.
Chapter 8 – Introduction to Number Theory Prime Numbers
Cryptography and Network Security Chapter 8. Chapter 8 – Introduction to Number Theory The Devil said to Daniel Webster: "Set me a task I can't carry.
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.
RSA Question 2 Bob thinks that p and q are primes but p isn’t. Then, Bob thinks ©Bob:=(p-1)(q-1) = Á(n). Is this true ? Bob chooses a random e (1 < e
CSE 321 Discrete Structures Winter 2008 Lecture 10 Number Theory: Primality.
CSE 311 Foundations of Computing I Lecture 12 Primes, GCD, Modular Inverse Spring
CSE 20 DISCRETE MATH Prof. Shachar Lovett Clicker frequency: CA.

CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
RSA Parameter Generation Bob needs to: - find 2 large primes p,q - find e s.t. gcd(e, Á (pq))=1 Good news: - primes are fairly common: there are about.
MA/CSSE 473 Day 08 Randomized Primality Testing Carmichael Numbers Miller-Rabin test.
Cryptography Dec 29. This Lecture In this last lecture for number theory, we will see probably the most important application of number theory in computer.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
MA/CSSE 473 Day 11 Primality testing summary Data Encryption RSA.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Cryptography Lecture 7: RSA Primality Testing Piotr Faliszewski.
Analyzing and Testing justified Prime Numbers
Primes in P Deterministic polynomial-time algorithm of Agrawal, Kayal and Saxena Presented by Vladimir Braverman.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
CSE 311: Foundations of Computing Fall 2014 Lecture 12: Primes, GCD.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
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.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Elliptic Curves Number Theory and Cryptography. A Pile of Cannonballs A Square of Cannonballs.
CSE 311: Foundations of Computing Fall 2013 Lecture 12: Primes, GCD, modular inverse.
CSE 311: Foundations of Computing Fall 2013 Lecture 11: Modular arithmetic and applications.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Implementation of Public Key Encryption Algorithms
MA/CSSE 473 Day 10 Primality Testing. MA/CSSE 473 Day 10 In-class exam: Friday, Sept 28 –You may bring a two-sided 8.5x11 inch piece of paper containing.
Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2007 Lecture 17March 20, 2007Carnegie Mellon University Randomness and Computation:
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
A Prime Example CS Lecture 20 A positive integer p  2 is prime if the only positive integers that divide p are 1 and p itself. Positive integers.
RSA Encryption Greg Gronn Laura Trimmer. RSA Encryption  Requires two 30 digit prime numbers to create an encoding/decryption key.  Goal: analyze different.
Randomness and Computation: Some Prime Examples
CSE565: Computer Security Lecture 7 Number Theory Concepts
Randomness and Computation: Some Prime Examples
Introduction to Number Theory
Public Key Cryptosystems - RSA
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett
MATH 15A – Discrete Mathematics
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett
Mathematical Background: Prime Numbers
Presentation transcript:

CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett

Today’s Topics: 1. Prime factorization 2. Primality testing 2

1. Prime factorizations Primes are the atoms of integers 3

Primes 4

 Which of the following is prime? A. 1 B. 6 C. 7 D. 21 5

Prime factorization  Basic theorem of number theory: any integer can be factored as a product of primes (we will prove this soon)  Moreover, this factorization is unique  Example: 36=2*2*3*3 6

Existence of prime factorization 7

8

How to find the prime factorization?  What is the prime factorization of 100? A. 2*5 B. 2*2*5 C. 10*10 D. 2*2*5*5 E. Other 9

How to find the prime factorization?  What is the prime factorization of ? 10

How to find the prime factorization?  What is the prime factorization of ?  Not so easy anymore…  The security of RSA (which for example, protects your bank accounts) is based on the assumption that it is hard to factor numbers  We cannot prove it.  In fact, maybe somebody knows how to factor numbers fast (lets wait for more Snowden revelations…) 11

2. Primality testing 12

Primality testing  If it’s hard to factor numbers into primes, lets focus on an easier problem  Test if a given integer is prime  How can you do it? Try and come up with the best algorithm you can 13

Primality testing  Algorithm 1: isPrime(n): 1. For i=2..n If n MOD i=0: return False 2. Return True 14

Primality testing  Algorithm 1: isPrime(n): 1. For i=2..n If n MOD i=0: return False 2. Return True 15 How many steps? A. ~n B. ~n 2 C. ~log(n) D. Doesn’t depend on n E. Other

Better primality testing? 16

Primality testing  Algorithm 1: isPrime(n): 1. For i=2..n If n MOD i=0: return False 2. Return True 17

Primality testing (II) 18

Primality testing (II) 19 How many steps? A. ~n B. ~n 2 C. ~log(n) D. Doesn’t depend on n E. Other

An even faster algorithm?  The prime numbers used in RSA are very big, with 100s of digits  These algorithms will take forever  There are much faster algorithms, which run in time ~log(n); they are randomized algorithm (e.g. Miller-Rabin) 20

Log vs poly time 21