Randomness and Computation: Some Prime Examples

Slides:



Advertisements
Similar presentations
Randomness and Computation: Some Prime Examples Great Theoretical Ideas In Computer Science (Steven Rudich) John LaffertyCS Fall 2005 Lecture 22Nov.
Advertisements

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.
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.
Notation Intro. Number Theory Online Cryptography Course Dan Boneh
Great Theoretical Ideas in Computer Science.
1 Fingerprint 2 Verifying set equality Verifying set equality v String Matching – Rabin-Karp Algorithm.
Cryptography Lecture 11: Oct 12. Cryptography AliceBob Cryptography is the study of methods for sending and receiving secret messages. adversary Goal:
Prof. Bart Selman Module Probability --- Part e)
CSE 321 Discrete Structures Winter 2008 Lecture 8 Number Theory: Modular Arithmetic.
Dan Boneh Intro. Number Theory Modular e’th roots Online Cryptography Course Dan Boneh.
CSE 321 Discrete Structures Winter 2008 Lecture 10 Number Theory: Primality.
Quadratic Residuosity and Two Distinct Prime Factor ZK Protocols By Stephen Hall.
ICS 253 Presents Mathematical Induction Sultan Almuhammadi muhamadi
Great Theoretical Ideas in Computer Science.
The Complexity of Primality Testing. What is Primality Testing? Testing whether an integer is prime or not. – An integer p is prime if the only integers.
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.
Prime Hunting Gábor Farkas Department of Computer Algebra Faculty of Informatics Eötvös Loránd University Jena, Germany 26. May 2008.
PRIMES is in P Manindra Agrawal NUS Singapore / IIT Kanpur.
Cryptography Lecture 7: RSA Primality Testing Piotr Faliszewski.
Mathematical Induction I Lecture 4: Sep 16. This Lecture Last time we have discussed different proof techniques. This time we will focus on probably the.
Great Theoretical Ideas In Computer Science Anupam GuptaCS Fall 2006 Lecture 17Oct 24, 2006Carnegie Mellon University Randomness and Computation:
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.
Great Theoretical Ideas in Computer Science.
Great Theoretical Ideas in Computer Science.
Great Theoretical Ideas In Computer Science COMPSCI 102 Fall 2010 Lecture 16October 27, 2010Duke University Modular Arithmetic and the RSA Cryptosystem.
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.
Chebychev’s Theorem on the Density of Prime Numbers Yaron Heger and Tal Kaminker.
Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2007 Lecture 17March 20, 2007Carnegie Mellon University Randomness and Computation:
PRIMES is in P Manindra Agrawal Neeraj Kayal Nitin Saxena Dept of CSE, IIT Kanpur.
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.
Diffie-Hellman-Merkle Ramki Thurimella. 2 Key Exchange Protocol Establishing secret keys for N people Requires N(N-1)/2 separate keys This is a quadratic.
Hubert Chan (Chapters 1.6, 1.7, 4.1)
Assignment 4 is due! Assignment 5 is out and is due in two weeks!
Lecture #5 מבוא מורחב.
Encryption Take 2: Practical details
Modular Arithmetic and the RSA Cryptosystem
High order procedures Primality testing The RSA cryptosystem
CSE565: Computer Security Lecture 7 Number Theory Concepts
Probabilistic Algorithms
CS 2210:0001Discrete Structures Modular Arithmetic and Cryptography
Handbook of Applied Cryptography - CH4, from 4.1~4.3
DTTF/NB479: Dszquphsbqiz Day 22
Randomness and Computation: Some Prime Examples
Advanced Algorithms Analysis and Design
Cryptography and Network Security
Introduction to Number Theory
Material in the textbook on pages
Induction and recursion
PRODUCT MOMENTS OF BIVARIATE RANDOM VARIABLES
Topic 24: Finding Prime Numbers, RSA
Hubert Chan (Chapters 1.6, 1.7, 4.1)
Public Key Cryptosystems - RSA
Number Theory (Chapter 7)
CS 154, Lecture 6: Communication Complexity
Mathematical Background: Prime Numbers
Lecture #5 מבוא מורחב.
Induction and recursion
Great Theoretical Ideas in Computer Science
Material in the textbook on
CSE 321 Discrete Structures
Follow me for a walk through...
Primitive Recursive Predicates
CS151 Complexity Theory Lecture 7 April 23, 2019.
Follow me for a walk through...
Cryptography Lecture 18.
Randomness and Computation: Some Prime Examples
Presentation transcript:

Randomness and Computation: Some Prime Examples Discrete Mathematics for Computer Science COMPSCI 102 Duke University Randomness and Computation: Some Prime Examples

Earth has huge file X that she transferred to Moon. Moon gets Y. Did you get that file ok? Was the transmission accurate? Uh, yeah. Earth: X Moon: Y

Let p(n) be the number of primes between 1 and n Let p(n) be the number of primes between 1 and n. I wonder how fast p(n) grows? Conjecture [1790s]: Legendre Gauss

Their estimates x pi(x) Gauss' Li Legendre x/((lnx )- 1) 1000 168 178 172 169 10000 1229 1246 1231 1218 100000 9592 9630 9588 9512 1000000 78498 78628 78534 78030 10000000 664579 664918 665138 661459 100000000 5761455 5762209 5769341 5740304 1000000000 50847534 50849235 50917519 50701542 10000000000 455052511 455055614 455743004 454011971

Two independent proofs of the Prime Density Theorem [1896]: De la Vallée Poussin J-S Hadamard

The Prime Density Theorem This theorem remains one of the celebrated achievements of number theory. In fact, an even sharper conjecture remains one of the great open problems of mathematics!

The Riemann Hypothesis [1859]

Slightly easier to show (n)/n ≥ 1/(2 log n) (We won’t prove it here.)

Random (log n)-bit number is a random number from 1..n (just add one) (n) / n ≥ 1/2log n means that a random (log n)-bit number has at least a 1/2log n chance of being prime.

Random k-bit number is a random number from 1..2k (2k) / 2k ≥ 1/2k means that a random k-bit number has at least a 1/2k chance of being prime.

Really useful fact A random k-bit number has at least a 1/2k chance of being prime. So if we pick 2k random k-bit numbers the expected number of primes on the list is at least 1

Picking A Random Prime Many modern cryptosystems (e.g., RSA) include the instructions: “Pick a random n-bit prime.” How can this be done efficiently?

“Pick a random n-bit prime.” Picking A Random Prime “Pick a random n-bit prime.” Strategy: Generate random n-bit numbers Test each one for primality [more on this later in the lecture]

Tremendously Useful Inequality x, 1 + x ≤ ex (for small x, 1 + x ≈ ex) Corollaries x, 1 – x ≤ e-x x≠0, 1 - 1/x ≤ e-1/x x>0, (1 - 1/x)x ≤ 1/e

Picking A Random Prime “Pick a random n-bit prime.” Generate kn random n-bit numbers Each trial has a ≥ 1/2n chance of being prime. Pr[ all kn trials yield composites ] ≤ (1-1/2n)kn = (1-1/2n)2n * k/2 ≤ 1/ek/2

Picking A Random Prime “Pick a random n-bit prime.” Strategy: Generate random n-bit numbers Test each one for primality For 1000-bit primes, if we try out 10000 random 1000-bit numbers, chance of failing ≤ e-5

Moral of the story Picking a random prime is “almost as easy as” picking a random number. (Provided we can check for primality. More on this later.)

Earth has huge file X that she transferred to Moon. Moon gets Y. Did you get that file ok? Was the transmission accurate? Uh, yeah. Earth: X Moon: Y

Are X and Y the same n-bit numbers? p = random (2 log n)-bit prime Send (p, X mod p) Answer to “X  Y (mod p) ?” Earth: X Moon: Y

Why is this any good? Easy case: If X = Y, then X  Y (mod p)

Why is this any good? Harder case: What if X  Y? Mess up if p | (X-Y), i.e., X  Y (mod p) Define Z = (X-Y). To mess up, p must divide Z. Z is an n-bit number.  Z is at most 2n. But each prime ≥ 2. Hence Z has at most n prime divisors.

A random k-bit number has at least a 1/2k chance of being prime. Almost there… Z has at most n prime divisors. How many (2log n)-bit primes? at least 22logn/(2*2 log n) = n2/(4 log n) >> 2n primes. Only (at most) half of them divide Z. Make mistake with probability at most ½. A random k-bit number has at least a 1/2k chance of being prime.

Theorem: Let X and Y be distinct n-bit numbers Theorem: Let X and Y be distinct n-bit numbers. Let p be a random (2 log n)-bit prime. Then Prob [X = Y mod p] < 1/2 Earth-Moon protocol makes mistake with probability at most 1/2!

Are X and Y the same n-bit numbers? Pick k random (2 log n)-bit primes: P1, P2, .., Pk Send (X mod Pi) for 1 ≤ i ≤ k k answers to “X = Y mod Pi ?” EARTH: X MOON: Y

Exponentially smaller error probability If X=Y, always accept. If X  Y, Prob [X = Y mod Pi for all i] ≤ (1/2)k