Great Theoretical Ideas In Computer Science Steven RudichCS 15-251 Spring 2007 Lecture 17March 20, 2007Carnegie Mellon University Randomness and Computation:

Slides:



Advertisements
Similar presentations
Public Key Cryptosystem
Advertisements

Randomness and Computation: Some Prime Examples Great Theoretical Ideas In Computer Science (Steven Rudich) John LaffertyCS Fall 2005 Lecture 22Nov.
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.
Primality Testing Patrick Lee 12 July 2003 (updated on 13 July 2003)
22C:19 Discrete Structures Integers and Modular Arithmetic
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.
מבוא מורחב 1 Lecture 4 Material in the textbook on Pages 44-46, of 2nd Edition Sections and Hanoy towers.
Notation Intro. Number Theory Online Cryptography Course Dan Boneh
David Evans CS588: Security and Privacy University of Virginia Computer Science Lecture 11: Birthday Paradoxes.
Great Theoretical Ideas in Computer Science.
1 Fingerprint 2 Verifying set equality Verifying set equality v String Matching – Rabin-Karp Algorithm.
Elementary Number Theory and Methods of Proof. Basic Definitions An integer n is an even number if there exists an integer k such that n = 2k. An integer.
מבוא מורחב - שיעור 6 1 Lecture 6 High order procedures Primality testing The RSA cryptosystem.
Cryptography Lecture 11: Oct 12. Cryptography AliceBob Cryptography is the study of methods for sending and receiving secret messages. adversary Goal:
CS470, A.SelcukPublic Key Cryptography1 CS 470 Introduction to Applied Cryptography Instructor: Ali Aydin Selcuk.
WS Algorithmentheorie 03 – Randomized Algorithms (Public Key Cryptosystems) Prof. Dr. Th. Ottmann.
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.
Chapter 8 – Introduction to Number Theory Prime Numbers
Sedgewick & Wayne (2004); Chazelle (2005) Sedgewick & Wayne (2004); Chazelle (2005)
Dan Boneh Intro. Number Theory Modular e’th roots Online Cryptography Course Dan Boneh.
Dan Boneh Intro. Number Theory Intractable problems Online Cryptography Course Dan Boneh.
Topic 18: RSA Implementation and Security
CSE 321 Discrete Structures Winter 2008 Lecture 10 Number Theory: Primality.
Quadratic Residuosity and Two Distinct Prime Factor ZK Protocols By Stephen Hall.
Integers Number Theory = Properties of Integers

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.
MA/CSSE 473 Day 11 Primality testing summary Data Encryption RSA.
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.
Introduction to Algorithms Second Edition by Cormen, Leiserson, Rivest & Stein Chapter 31.
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.
22C:19 Discrete Structures Integers and Modular Arithmetic Fall 2014 Sukumar Ghosh.
ENCRYPTION TAKE 2: PRACTICAL DETAILS David Kauchak CS52 – Spring 2015.
מבוא מורחב - שיעור 6 1 Lecture 6 High order procedures Primality testing The RSA cryptosystem.
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.
Umans Complexity Theory Lectures Lecture 7b: Randomization in Communication Complexity.
RSA cryptosystem--preview Suppose n=p  q and  (n)=(p-1)(q-1), where p and q are big primes. Select (find) a and b, such that a  b=1 mod  (n). K=(n,p,q,a,b),
Great Theoretical Ideas in Computer Science for Some.
Modular Arithmetic and the RSA Cryptosystem Great Theoretical Ideas In Computer Science John LaffertyCS Fall 2005 Lecture 9Sept 27, 2005Carnegie.
Great Theoretical Ideas In Computer Science Anupam GuptaCS Fall 2006 Lecture 15Oct 17, 2006Carnegie Mellon University Algebraic Structures: Groups,
Great Theoretical Ideas in Computer Science.
מבוא מורחב 1 Lecture 4 Material in the textbook on Pages 44-46, of 2nd Edition Sections and Hanoy towers.
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.
Great Theoretical Ideas in Computer Science.
Chapter 1 Algorithms with Numbers. Bases and Logs How many digits does it take to represent the number N >= 0 in base 2? With k digits the largest number.
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.
MA/CSSE 473 Day 09 Modular Division Revisited Fermat's Little Theorem Primality Testing.
RSA Cryptosystem Great Theoretical Ideas In Computer Science S. Rudich V. Adamchik CS Spring 2006 Lecture 8Feb. 09, 2006Carnegie Mellon University.
Modular Arithmetic and the RSA Cryptosystem Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2005 Lecture 8Feb 3, 2005Carnegie.
Unary, Binary, and Beyond Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2003 Lecture 2Jan 16, 2003Carnegie Mellon University.
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.
Number-Theoretic Algorithms
Randomness and Computation: Some Prime Examples
Encryption Take 2: Practical details
Randomness and Computation: Some Prime Examples
Introduction to Number Theory
Material in the textbook on pages
Topic 24: Finding Prime Numbers, RSA
Great Theoretical Ideas in Computer Science
Material in the textbook on
Randomness and Computation: Some Prime Examples
Presentation transcript:

Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2007 Lecture 17March 20, 2007Carnegie Mellon University Randomness and Computation: Some Prime Examples

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

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

Their estimates xpi(x)Gauss' LiLegendrex/(log x - 1)

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

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!

Riemann The Riemann Hypothesis [1859]

Slightly easier to show  (n)/n ≥ 1/(2 logn).

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

Random k bit number is a random number from 1..2 k  (2 k ) / 2 k ≥ 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?

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

Picking A Random Prime “Pick a random n-bit prime.” 1)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/e k/2

Picking A Random Prime “Pick a random n-bit prime.” Strategy: 1)Generate random n-bit numbers 2)Test each one for primality For 1000-bit primes, if we try out 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. Earth: X Moon: Y Did you get that file ok? Was the transmission accurate? Uh, yeah.

Are X and Y the same n-bit numbers? p = random 2logn-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? We mess up if p | (X-Y). Define Z = (X-Y). To mess up, p must divide Z. Z is an n-bit number.  Z is at most 2 n. But each prime ≥ 2. Hence Z has at most n prime divisors.

Almost there… Z has at most n prime divisors. How many 2logn-bit primes?  at least 2 2logn /(2*2logn) = n 2 /(4logn) >> 2n primes. Only (at most) half of them divide Z. 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. Let p be a random 2logn-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? EARTH: X MOON: Y Pick k random 2logn-bit primes: P 1, P 2,.., P k Send (X mod P i ) for 1 ≤ i ≤ k k answers to “X = Y mod P i ?”

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