COS433/Math 473: Cryptography. Mark Zhandry Princeton University Spring 2018

Similar documents
COS433/Math 473: Cryptography. Mark Zhandry Princeton University Spring 2017

COS433/Math 473: Cryptography. Mark Zhandry Princeton University Spring 2018

COS433/Math 473: Cryptography. Mark Zhandry Princeton University Spring 2017

COS433/Math 473: Cryptography. Mark Zhandry Princeton University Spring 2017

Notes for Lecture A can repeat step 3 as many times as it wishes. We will charge A one unit of time for every time it repeats step 3.

Lecture 11: Hash Functions, Merkle-Damgaard, Random Oracle

Introduction to Cryptography

Lecture 15 & 16: Trapdoor Permutations, RSA, Signatures

COS433/Math 473: Cryptography. Mark Zhandry Princeton University Spring 2017

Technische Universität München (I7) Winter 2013/14 Dr. M. Luttenberger / M. Schlund SOLUTION. Cryptography Endterm

BEYOND POST QUANTUM CRYPTOGRAPHY

non-trivial black-box combiners for collision-resistant hash-functions don t exist

1 Cryptographic hash functions

Public-Key Cryptography. Lecture 10 DDH Assumption El Gamal Encryption Public-Key Encryption from Trapdoor OWP

5199/IOC5063 Theory of Cryptology, 2014 Fall

Authentication. Chapter Message Authentication

COMS W4995 Introduction to Cryptography October 12, Lecture 12: RSA, and a summary of One Way Function Candidates.

Ex1 Ex2 Ex3 Ex4 Ex5 Ex6

Pseudorandom Generators

1 Cryptographic hash functions

Lecture 7: CPA Security, MACs, OWFs

COS433/Math 473: Cryptography. Mark Zhandry Princeton University Spring 2018

Optimal Constructions of Universal One-way Hash Functions from Special One-way Functions!

CLASSICAL CRYPTOSYSTEMS IN A QUANTUM WORLD

Cryptography: The Landscape, Fundamental Primitives, and Security. David Brumley Carnegie Mellon University

CS 6260 Some number theory

10 Concrete candidates for public key crypto

CS 355: TOPICS IN CRYPTOGRAPHY

COS433/Math 473: Cryptography. Mark Zhandry Princeton University Spring 2018

Pseudorandom Generators

Lecture 10 - MAC s continued, hash & MAC

ASYMMETRIC ENCRYPTION

Theoretical Cryptography, Lectures 18-20

Lecture 17: Constructions of Public-Key Encryption

Course Business. Homework 3 Due Now. Homework 4 Released. Professor Blocki is travelling, but will be back next week

1 Number Theory Basics

COS433/Math 473: Cryptography. Mark Zhandry Princeton University Spring 2017

John Hancock enters the 21th century Digital signature schemes. Table of contents

6.080 / Great Ideas in Theoretical Computer Science Spring 2008

Notes for Lecture 9. Last time, we introduced zero knowledge proofs and showed how interactive zero knowledge proofs could be constructed from OWFs.

14 Diffie-Hellman Key Agreement

From Non-Adaptive to Adaptive Pseudorandom Functions

Lecture 18: Message Authentication Codes & Digital Signa

THE RANK METHOD AND APPLICATIONS TO POST- QUANTUM CRYPTOGRAPHY

SECURE IDENTITY-BASED ENCRYPTION IN THE QUANTUM RANDOM ORACLE MODEL. Mark Zhandry Stanford University

CS 4770: Cryptography. CS 6750: Cryptography and Communication Security. Alina Oprea Associate Professor, CCIS Northeastern University

Modern Cryptography Lecture 4

Lecture 9 Julie Staub Avi Dalal Abheek Anand Gelareh Taban. 1 Introduction. 2 Background. CMSC 858K Advanced Topics in Cryptography February 24, 2004

CPSC 467b: Cryptography and Computer Security

Inaccessible Entropy and its Applications. 1 Review: Psedorandom Generators from One-Way Functions

COS 597C: Recent Developments in Program Obfuscation Lecture 7 (10/06/16) Notes for Lecture 7

CSE 521: Design and Analysis of Algorithms I

Lecture 16 Chiu Yuen Koo Nikolai Yakovenko. 1 Digital Signature Schemes. CMSC 858K Advanced Topics in Cryptography March 18, 2004

Lecture 5: Hard Core Predicates

Pr[C = c M = m] = Pr[C = c] Pr[M = m] Pr[M = m C = c] = Pr[M = m]

Notes for Lecture Decision Diffie Hellman and Quadratic Residues

The Random Oracle Paradigm. Mike Reiter. Random oracle is a formalism to model such uses of hash functions that abound in practical cryptography

Codes and Cryptography. Jorge L. Villar. MAMME, Fall 2015 PART XII

Pseudo-random Number Generation. Qiuliang Tang

Intro to Public Key Cryptography Diffie & Hellman Key Exchange

Provable security. Michel Abdalla

Practice Final Exam Winter 2017, CS 485/585 Crypto March 14, 2017

CS6750: Cryptography and Communica7on Security

Lecture 1. Crypto Background

Mathematics of Cryptography

Lecture 11: Key Agreement

Public Key Cryptography

Computer Science A Cryptography and Data Security. Claude Crépeau

Lecture 5, CPA Secure Encryption from PRFs

1 Rabin Squaring Function and the Factoring Assumption

Foundation of Cryptography, Lecture 4 Pseudorandom Functions

Cryptographic Hardness Assumptions

Cryptographical Security in the Quantum Random Oracle Model

Limits on the Efficiency of One-Way Permutation-Based Hash Functions

Lecture 17 - Diffie-Hellman key exchange, pairing, Identity-Based Encryption and Forward Security

Leftovers from Lecture 3

Quantum Oracle Classification

Quantum-secure symmetric-key cryptography based on Hidden Shifts

Introduction to Cybersecurity Cryptography (Part 5)

Introduction to Cybersecurity Cryptography (Part 4)

Provable Security for Public-Key Schemes. Outline. I Basics. Secrecy of Communications. Outline. David Pointcheval

A survey on quantum-secure cryptographic systems

Lecture 4 Chiu Yuen Koo Nikolai Yakovenko. 1 Summary. 2 Hybrid Encryption. CMSC 858K Advanced Topics in Cryptography February 5, 2004

Lecture 1. 1 Introduction to These Notes. 2 Trapdoor Permutations. CMSC 858K Advanced Topics in Cryptography January 27, 2004

Semantic Security of RSA. Semantic Security

YALE UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE

Introduction to Cybersecurity Cryptography (Part 4)

CS 282A/MATH 209A: Foundations of Cryptography Prof. Rafail Ostrosky. Lecture 4

1 Maintaining a Dictionary

1 Recommended Reading 1. 2 Public Key/Private Key Cryptography Overview RSA Algorithm... 2

Introduction to Modern Cryptography Recitation 3. Orit Moskovich Tel Aviv University November 16, 2016

Computational Number Theory. Adam O Neill Based on

Lectures 2+3: Provable Security

CSC 5930/9010 Modern Cryptography: Number Theory

Introduction to Machine Learning

CHAPTER 6: OTHER CRYPTOSYSTEMS, PSEUDO-RANDOM NUMBER GENERATORS and HASH FUNCTIONS. Part VI

The Random Oracle Model and the Ideal Cipher Model are Equivalent

ECS 189A Final Cryptography Spring 2011

Lecture 7: Hard-core Predicate and PRG

Lecture Notes, Week 6

Transcription:

COS433/Math 473: Cryptography Mark Zhandry Princeton University Spring 2018

Integer Factorization iven an integer N, find it s prime factors Studied for centuries, presumed difficult rade school algorithm: O(N 1/2 ) Better algorithms using birthday paradox: O(N ¼ ) Even better assuming. Riemann Hyp.: O(N ⅕ ) Still better heuristic algorithms: exp( C (log N) 1/3 (log log N) 2/3 ) However, all require super- polynomial time in bit- length of N

(λ,t,ε)- Factoring Assumption: For any factoring algorithm running in time at most t, Pr[(p,q)ß (N): N=pq and p,q random λ- bit primes] ε Plausible assumption: (λ, t=2 λ⅓, ε=2 -λ⅓ )

Sampling Random Primes Prime Number Theorem: A random λ- bit number is prime with probability 1/λ Primality Testing: It is possible in polynomial time to decide if an integer is prime Fermat Primality Test (randomized, some false positives): Choose a random integer a {0,,N-1} Test if a N = a mod N Repeat many times

Chinese Remainder Theorem Let N = pq for distinct prime p,q Let x Z p, y Z q Then there exists a unique integer z Z N such that x = z mod p, and y = z mod q Proof: z = [py(p -1 mod q)+qx(q -1 mod p)] mod N

Quadratic Residues Definition: y is a quadratic residue mod N if there exists an x such that y = x 2 mod N. x is called a square root of y Ex: Let p be a prime, and y 0 a quadratic residue mod p. How many square roots of y? Let N=pq be the product of two primes, y a quadratic residue mod N. Suppose y 0 mod p and y 0 mod q. How many square roots?

(λ,t,ε)- QR Assumption: For any factoring algorithm running in time at most t, Pr[y 2 =x 2 mod N: yß (N,x 2 ) N=pq and p,q random λ- bit primes xß Z N ] ε

Theorem: If the (λ,t,ε)- factoring assumption holds, then the (λ,t-t,2ε)- QR assumption holds

Proof To factor N: xß Z N yß (N,x 2 ) Output CD(x-y,N) Analysis: Let {a,b,c,d} be the 4 square roots of x 2 has no idea which one you chose With probability ½, y will not be in {+x,-x} In this case, we know x=y mod p but x=-y mod q

Solving Quadratic Equations In general, solving quadratic equations is: Easy over prime moduli As hard as factoring over composite moduli

Other Powers? What about x à x 4 mod N? x à x 6 mod N? The function x à x 3 mod N appears quite different Suppose 3 is relatively prime to p-1 and q-1 Then x à x 3 mod p is injective for x 0 Let a be such that 3a = 1 mod p-1 (x 3 ) a = x 1+k(p-1) = x(x p-1 ) k = x mod p By CRT, x à x 3 mod N is injective for x Z N *

x 3 mod N What does injectivity mean? Cannot base of factoring: Adapt alg for square roots: Choose a random z mod N Compute y = z 3 mod N Run inverter on y to get a cube root x Let p = CD(z-x, N), q = N/p

RSA Problem iven N = pq, e such that CD(e,p-1)=CD(e,q-1)=1, y=x e mod N for a random x Find x Injectivity means cannot base hardness on factoring, but still conjectured to be hard

(e,t,ε)- RSA Assumption: For any factoring algorithm running in time at most t, Pr[xß (N,x 3 mod N) N=pq and p,q random λ- bit primes s.t. CD(3,p-1)=CD(3,q-1)=1 xß Z N* ] ε

Application: PRs Let F(x) = x 3 mod N, h(x) = least significant bit x F h Theorem: If (e,t,ε)- RSA Assumption holds, then (x) = ( F(x), h(x) ) is a (t-t,ε )-secure PR

Crypto from Minimal Assumptions

Many ways to build crypto We ve seen many ways to build crypto SPN networks LFSR s Discrete Log Factoring Questions: Can common techniques be abstracted out as theorem statements? Can every technique be used to build every application?

One- way Functions The minimal assumption for crypto Syntax: Domain D Range R Function F: D à R No correctness properties other than deterministic

Security? Definition: F is (t,ε)-one- Way if, for all in time at most t, Pr[xß (F(x)),xß D] < ε running Trivial example: F(x) = parity of x iven F(x), impossible to predict x

Security Definition: F is (t,ε)-one- Way if, for all running in time at most t, Pr[F(x)=F(y):yß (F(x)),xß D] < ε

Examples Any PR Any Collision Resistant Hash Function (with sufficient compression) F(p,q) = pq F(g,a) = (g,g a ) F(N,x) = (N,x 3 mod N) or F(N,x) = (N,x 2 mod N)

What s Known OWF CRH PR PRF MAC PRP Enc Com Auth Enc

So Far CRH OWF PR PRF PRP Com MAC Enc Plus arrows from everything to one- way functions Auth Enc

Our oal: Fill in Remaining Arrows

Hardcore Bits Let F be a one- way function with domain D, range R Definition: A function h:dà {0,1} is a (t,ε)- hardcore bit for F if, for any running in time at most t, Pr[1ß (F(x), h(x)), xß D] - Pr[1ß (F(x), b), xß D,bß {0,1}] ε In other words, even given F(x), hard to guess h(x)

Examples of Hardcore Bits Define lsb(x) as the least significant bit of x For x Z N, define Half(x) as 1 iff 0 x<n/2

Theorem: Let p be a prime, and F:Z p* à Z p* be F(x) = g x mod p, for some generator g Half is a hardcore bit for F (assume F is one- way) Theorem: Let N be a product of two large primes p,q, and F:Z N* à Z N* be F(x) = x e mod N for some e relatively prime to (p-1)(q-1) Lsb and Half are hardcore bits for F (assuming RSA) Theorem: Let N be a product of two large primes p,q, and F:Z N* à Z N* be F(x) = x 2 mod N Lsb and Half are hardcore bits for F (assuming factoring)

oldreich Levin Hardcore Bit Let F be a OWF with domain {0,1} n and range R Let F :{0,1} 2n à {0,1} n R be: F (r,x) = r,f(x) Define h(r,x) = <r,x> = r i x i mod 2 Theorem (oldreich- Levin): If F is (t,ε)-one- way, then h is a ( poly(t,1/ε), poly(ε) )-hc bit for F

Application: PRs Suppose F was a permutation (D=R and F is one- to- one) Let F, h be from oldreich- Levin F is also a permutation x F h

Hardcore Bits A hc bit for any OWF Implies PR from any one- way permutation PR from Dlog (Blum- Micali) PR from RSA PR from Factoring Actually, can construct PR from any OWF Proof beyond scope of course

PRs à PRFs

First: Expanding Length of PRs

A Different Approach

Advantage of Tree- based Approach To expand λ bits into 2 h λ bits, need h levels Can compute output locally: To compute ith chunk of λ bits, only need h PR evaluations In other words, can locally compute in logarithmic time

Advantage of Tree- based Approach Theorem: For any logarithmic h, if is a (t,ε)- secure PR, then tree- based PR is (t-t, L(h)ε)- secure for some function L(h)

Proof Hybrid 0:

Proof Hybrid 1:

Proof Hybrid 2:

Proof Hybrid 3:

Proof Hybrid t:

Proof What is L(h)? PR adversary distinguishes Hybrid 0 from Hybrid t with advantage L(h)ε i such that adversary distinguishes Hybrid i-1 from Hybrid i with advantage ε Can use to construct adversary for with advantage ε

A PRF Domain {0,1} n Set h = n F(k, x) is the xth block of λ bits Computation involves h evals of, so efficient

A PRF k F(k,1) F(k,2) F(k,3) F(k,4) F(k,5) F(k,6) F(k,7) F(k,8) F(k,9) F(k,10) F(k,11) F(k,12) F(k,13) F(k,14)

Problem with Security Proof Suppose I have a PRF adversary with advantage ε. In the proof, what is the advantage of the derived PR adversary?

A Better Proof Hybrid 0:

A Better Proof Hybrid 1:

A Better Proof Hybrid 2:

A Better Proof Hybrid 3:

A Better Proof Hybrid h=n:

A Better Proof Now if PRF adversary distinguishes Hybrid 0 from Hybrid h=n with advantage ε, i such that adversary distinguishes Hybrid i-1 from Hybrid i with advantage ε /n Non- negligible advantage Not quite done: Distinguishing Hybrid i-1 from Hybrid i does not immediately give a PR distinguisher Exponentially many PR values changed!

A Better Proof Hybrid i-1 Hybrid i

Key Observation: Hybrid i-1 Adversary only queries polynomially many outputs Only need to worry about polynomially many PR instances in level i

A Better Proof More Formally: iven distinguisher A for Hybrid i-1 and Hybrid i, can construct distinguisher B for the following two oracles from {0,1} i-1 à {0,1} 2λ H 0 : each output is a fresh random PR sample H 1 : each output is uniformly random If A makes q queries, B makes at most q queries

A Better Proof Now we have a distinguisher B with advantage ε /n that sees at most q values, where either Each value is a random output of the PR, or Each value is uniformly random By introducing q hybrids, can construct a PR distinguisher with advantage ε /qn By setting ε =qnε, we get security

What s Known OWP CRH TCR OWF PR Com PRF MAC Auth Enc PRP Enc What about OWP, CRH?

enerally Believed That Cannot construct OWP from OWF Cannot construct CRH from OWF Cannot construct CRH from OWP Cannot construct OWP from CRH

Black Box Separations How do we argue that you cannot build collision resistance from one- way functions? We generally believe both exist! Observation: most natural constructions treat underlying objects as black boxes (don t look at code, just input/output) Maybe we can rule out such natural constructions

Black Box Separations Present a world where one- way functions exist, but collision resistance does not Hopefully, natural (black box) constructions make sense in this world Can construct PRs, PRFs, PRPs, Auth- Enc, etc

Separating CRH from OWF Starting point: random oracle model H Computation power is unlimited, but number of calls to random oracle is polynomial

Separating CRH from OWF In ROM, despite unlimited computational power, one- way functions exist F(x) = H(x) Can only invert oracle by making exponentially- many calls Unfortunately, collision resistant hashing exists too! F(x) = H(x) To fix, also add collision finding oracle

Separating CRH from OWF Collision- finding oracle H CF

Separating CRH from OWF What does CF do? Takes as input a circuit C Circuit may have oracle gates that make calls to H or CF Outputs a collision for C Impossibility of Collision Resistance? Consider BB construction of CRHF from OWF Replace calls to OWF with H queries Feed circuit computing CRHF to CF to find collision

Separating CRH from OWF So we have a world in which collision resistance does not exist However, maybe CF can be used to invert H So maybe one- way functions don t exist either Must be careful in defining CF Random pair of colliding inputs will allow for inverting H

Separating CRH from OWF Correct CF: Choose random input x to circuit Choose random input y that collides with x Note that x will sometimes equal y. However, if circuit shrinks input, then with probability at least ½ x y Careful analysis shows that H is still one- way

Next Time Begin public key cryptography Key agreement: how to exchange keys without ever meeting