Lecturer: Moni Naor Foundations of Cryptography Lecture 9: Pseudo-Random Functions and Permutations.

Slides:



Advertisements
Similar presentations
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesThe Mighty Mod.
Advertisements

Lecturer: Moni Naor Weizmann Institute of Science
Complexity Theory Lecture 6
Many-to-one Trapdoor Functions and their Relations to Public-key Cryptosystems M. Bellare S. Halevi A. Saha S. Vadhan.
Cryptography and Game Theory: Designing Protocols for Exchanging Information Gillat Kol and Moni Naor.
Foundations of Cryptography Lecture 10 Lecturer: Moni Naor.
Foundations of Cryptography Lecture 11 Lecturer: Moni Naor.
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
Theory of Computing Lecture 3 MAS 714 Hartmut Klauck.
CIS 5371 Cryptography 3b. Pseudorandomness.
Foundations of Cryptography Lecture 5 Lecturer: Moni Naor.
1 Introduction CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell.
Foundations of Cryptography Lecture 13 Lecturer: Moni Naor.
Foundations of Cryptography Lecture 4 Lecturer: Moni Naor.
Foundations of Cryptography Lecture 12 Lecturer: Moni Naor.
Foundations of Cryptography Lecture 8: Application of GL, Next-bit unpredictability, Pseudo-Random Functions. Lecturer: Moni Naor Announce home )deadline.
The Bright Side of Hardness Relating Computational Complexity and Cryptography Oded Goldreich Weizmann Institute of Science.
Foundations of Cryptography Lecture 5: Signatures and pseudo-random generators Lecturer: Moni Naor.
Lecturer: Moni Naor Foundations of Cryptography Lecture 4: One-time Signatures, UOWHFs.
Introduction to Modern Cryptography, Lecture ?, 2005 Broadcast Encryption, Traitor Tracing, Watermarking.
Introduction to Modern Cryptography Homework assignments.
Lecturer: Moni Naor Foundations of Cryptography Lecture 11: Security of Encryption Schemes.
On The Cryptographic Applications of Random Functions Oded Goldreich Shafi Goldwasser Silvio Micali Advances in Cryptology-CRYPTO ‘ 84 報告人 : 陳昱升.
Lecturer: Moni Naor Foundations of Cryptography Lecture 12: Commitment and Zero-Knowledge.
Security Arguments for Digital Signatures and Blind Signatures Journal of Cryptology, (2000) 13: Authors: D. Pointcheval and J. Stern Presented.
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
1 Constructing Pseudo-Random Permutations with a Prescribed Structure Moni Naor Weizmann Institute Omer Reingold AT&T Research.
Theory I Algorithm Design and Analysis (9 – Randomized algorithms) Prof. Dr. Th. Ottmann.
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
On Everlasting Security in the Hybrid Bounded Storage Model Danny Harnik Moni Naor.
Introduction to Computer and Network Security Iliano Cervesato 26 August 2008 – Modern Cryptography.
Foundations of Cryptography Lecture 10: Pseudo-Random Permutations and the Security of Encryption Schemes Lecturer: Moni Naor Announce home )deadline.
Chapter 13: Electronic Commerce and Information Security Invitation to Computer Science, C++ Version, Fourth Edition SP09: Contains security section (13.4)
Foundations of Cryptography Lecture 9 Lecturer: Moni Naor.
Foundations of Cryptography Lecture 8 Lecturer: Moni Naor.
Computer Science CSC 774Dr. Peng Ning1 CSC 774 Advanced Network Security Topic 2. Review of Cryptographic Techniques.
Lecture 4 Cryptographic Tools (cont) modified from slides of Lawrie Brown.
Foundations of Cryptography Lecture 2 Lecturer: Moni Naor.
Foundations of Cryptography Rahul Jain CS6209, Jan – April 2011
Public Key Model 8. Cryptography part 2.
CMSC 414 Computer and Network Security Lecture 3 Jonathan Katz.
8. Data Integrity Techniques
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Network Security (A Very Brief Introduction)
CS548 Advanced Information Security Presented by Gowun Jeong Mar. 9, 2010.
One-Time Pad Or Vernam Cipher Sayed Mahdi Mohammad Hasanzadeh Spring 2004.
CS555Spring 2012/Topic 51 Cryptography CS 555 Topic 5: Pseudorandomness and Stream Ciphers.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
Foundations of Cryptography Lecture 6 Lecturer: Moni Naor.
Computer Security: Principles and Practice First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown Chapter 2 – Cryptographic.
Cryptography Lecture 2 Arpita Patra. Summary of Last Class  Introduction  Secure Communication in Symmetric Key setting >> SKE is the required primitive.
On the Communication Complexity of SFE with Long Output Daniel Wichs (Northeastern) joint work with Pavel Hubáček.
Multicast Security: A Taxonomy and Some Efficient Constructions By Cannetti et al, appeared in INFOCOMM 99. Presenter: Ankur Gupta.
Merkle trees Introduced by Ralph Merkle, 1979 An authentication scheme
NEW DIRECTIONS IN CRYPTOGRAPHY Made Harta Dwijaksara, Yi Jae Park.
Cryptography and Privacy Preserving Operations Lecture 2: Pseudo-randomness Lecturer: Moni Naor Weizmann Institute of Science.
多媒體網路安全實驗室 Anonymous Authentication Systems Based on Private Information Retrieval Date: Reporter: Chien-Wen Huang 出處: Networked Digital Technologies,
Cryptography Lecture 6 Arpita Patra © Arpita Patra.
Derandomized Constructions of k -Wise (Almost) Independent Permutations Eyal Kaplan Moni Naor Omer Reingold Weizmann Institute of ScienceTel-Aviv University.
CS555Spring 2012/Topic 81 Cryptography CS 555 Topic 8: Pseudorandom Functions and CPA Security.
EE 122: Lecture 24 (Security) Ion Stoica December 4, 2001.
COM 5336 Lecture 8 Digital Signatures
1 The RSA Algorithm Rocky K. C. Chang February 23, 2007.
Cryptography Lecture 6 Arpita Patra. Quick Recall and Today’s Roadmap >> MAC for fixed-length messages >> Domain Extension for MAC >> Authenticated Encryption:
Topic 5: Constructing Secure Encryption Schemes
Topic 7: Pseudorandom Functions and CPA-Security
Cryptography Lecture 5.
Cryptography Lecture 8.
Topic 13: Message Authentication Code
Presentation transcript:

Lecturer: Moni Naor Foundations of Cryptography Lecture 9: Pseudo-Random Functions and Permutations.

Recap of last week’s lecture Application of GL Theorem to Pseudo-randomness of Subset sum Hybrid arguments: from single bit expansion to many bits expansion Next Bit unpredictability equivalent to Computational Pseudo-Randomness Why extremely long random looking strings are useful Pseudo-random functions definition

The world so far Pseudo-random generators Signature Schemes UOWHFs One-way functions Two guards Identification Will soon see: Computational Pseudorandomness Shared-key Encryption and Authentication P  NP

Reading Assignment Naor and Reingold, From Unpredictability to Indistinguishability: A Simple Construction of Pseudo- Random Functions from MACs, Crypto'98. Gradwohl, Naor, Pinkas and Rothblum, Cryptographic and Physical Zero-Knowledge Proof Systems for Solutions of Sudoku Puzzles – Especially Section 1-3

Homework How to have a one-time signature scheme with shorter public keys –Let f be one-way permutation… How to construct –a signature scheme existentially secure against an adaptively chosen message attack, –from a scheme that is existentially secure against a random message attack.

Pseudo-Random Generators concrete version G n :  0,1  m  0,1  n Instead of passing all polynomial time statistical tests: (t,  )- pseudo-random - no test A running in time t can distinguish with advantage 

Recall: Three Basic issues in cryptography Identification Authentication Encryption Solve in a shared key environment S S B A

Identification: remote login using pseudo-random sequence A and B share a key S  0,1  k In order for A to identify itself to B Generate sequence G n (S) For each identification session: send next block of G n (S) G n (S) G:G: S

Problems... More than two parties Malicious adversaries - add noise Coordinating the location block number Better approach: Challenge-Response

Challenge-Response Protocol B selects a random location and sends to A A sends value at random location AB What’s this?

Desired Properties Very long string - prevent repetitions Random access to the sequence Unpredictability - cannot guess the value at a random location –even after seeing values at many parts of the string to the adversary’s choice. –Pseudo-randomness implies unpredictability Not the other way around for blocks

Authenticating Messages A wants to send message M  0,1  n to B B should be confident that A is indeed the sender of M One-time application: S =(a,b) : where a,b  R  0,1  n To authenticate M : supply aM  b Computation is done in GF[2 n ]

Problems and Solutions Problems - same as for identification If a very long random string available - –can use for one-time authentication –Works even if only random looking a,b AB Use this!

Encryption of Messages A wants to send message M  0,1  n to B only B should be able to learn M One-time application: S = a : where a  R  0,1  n To encrypt M send a  M

Encryption of Messages If a very long random looking string available - –can use as in one-time encryption AB Use this!

Pseudo-random Function A way to provide an extremely long shared string

Pseudo-random Functions Concrete Treatment: F:  0,1  k   0,1  n   0,1  m key Domain Range Denote Y= F S (X) A family of functions Φ k ={F S | S  0,1  k  is (t, , q)- pseudo-random if it is Efficiently computable - random access and...

(t, ,q)- pseudo-random The tester A that can choose adaptively –X 1 and gets Y 1 = F S (X 1 ) –X 2 and gets Y 2 = F S (X 2 )  … –X q and gets Y q = F S (X q ) Then A has to decide whether – F S  R  Φ k  or – F S  R R n  m =  F | F :  0,1  n   0,1  m 

(t, ,q)- pseudo-random For a function F chosen at random from (1) Φ k ={F S | S  0,1  k  (2) R n  m =  F | F :  0,1  n   0,1  m  For all t -time machines A that choose q locations and try to distinguish (1) from (2)  Prob  A  ‘1’  F  R Φ k  - Prob  A  ‘1’  F  R R n  m    

Equivalent/Non-Equivalent Definitions Instead of next bit test: for X  X 1,X 2, , X q  chosen by A, decide whether given Y is –Y= F S (X) or –Y  R  0,1  m Adaptive vs. Non-adaptive Unpredictability vs. pseudo-randomness A pseudo-random sequence generator g:  0,1  m  0,1  n –a pseudo-random function on small domain  0,1  log n  0,1  with key in  0,1  m

Application to the basic issues in cryptography Solution using a shared key S Identification: B to A: X  R  0,1  n A to B: Y= F S (X) B verifies Authentication: A to B: Y= F S (M) replay attack Encryption: A chooses X  R  0,1  n A to B:

Goal Construct an ensemble {Φ k | k  L  such that for any {t k, 1/  k, q k | k  L  polynomial in k, for all but finitely many k’s Φ k is a (t k,  k, q k )- pseudo-random family

Construction Construction via Expansion –Expand n or m Direct constructions

Effects of Concatenation Given ℓ Functions F 1, F 2, , F ℓ decide whether they are –ℓ random and independent functions OR –F S 1, F S 2, , F S ℓ for S 1, S 2, , S ℓ  R  0,1  k Claim: If Φ k ={F S | S  0,1  k  is (t, ,q)- pseudo-random: cannot distinguish two cases –using q queries –in time t’=t - ℓ  q –with advantage better than ℓ 

Proof: Hybrid Argument i=0 F S 1, F S 2, , F S ℓ p 0 … i R 1, R 2, , R i-1,F S i, F S i+1, , F S ℓ p i … i=ℓ R 1, R 2, , R ℓ p ℓ  p ℓ - p 0     i s.t.  p i+1 - p i   /ℓ

...Hybrid Argument Can use this i to distinguish whether – F S  R  Φ k  or F S  R R n  m Generate F S i+1, , F S ℓ Answer queries to first i-1 functions at random (consistently) Answer query to F S i, using (black box) input Answer queries to functions i+1 through ℓ with F S i+1, , F S ℓ Running time of test - t’  ℓ  q

Doubling the domain Suppose we have F (n) :  0,1  k   0,1  n   0,1  m which is (t, ,q)- p.r. Want F (n+1) :  0,1  k   0,1  n+1   0,1  m which is (t’,  ’,q’)- p.r. Use G:  0,1  k   0,1  2k which is (t,  ) p.r G(S)  G 0 (S) G 1 (S) Let F S (n+1) (bx)  F G b (s) (n) (x) G 0 (S)G 1 (S) S G

Claim If G is (t  q,  1 ) -p.r and F (n)  is (t  2q,  2,q) -p.r, then F (n+1)  is (t,  1  2  2,q) -p.r Proof: three distributions (1) F (n+1) (2) F S 0 (n), F S 1 (n) for independent S 0, S 1 (3) Random   1  2  2

...Proof Given that (1) and (3) can be distinguished with advantage  1  2  2, then either (1) and (2) with advantage  1 –G can be distinguished with advantage  1 or (2) and (3) with advantage 2  2 –F (n)  can be distinguished with advantage  2 Running time of test: t’  q

Getting from G to F (n) Idea: Use recursive construction F S (n) (b n b n-1  b 1 )  F G b 1 (s) (n-1) (b n-1 b n-2  b 1 )  G b n (G b n-1 (  G b 1 (S))  ) Each evaluation of F S (n) (x) : n invocations of G

Tree Description G 0 (S) G 1 (S) S G 0 (G 0 (S)) G 1 (G 0 (G 0 (S))) Each leaf corresponds to x 2 {0,1} n. Label of leaf: value of pseudo-random function at x

Security claim If G is (t  qn,  ) p.r, then F (n)  is (t, q,  ’  n  q  ) p.r Proof: Hybrid argument by levels D i : – truly random labels for nodes at level i. – Pseudo-random from i down Each D i : a collection of q functions  i  p i+1 - p i   ’/n  q 

Hybrid S0S0 S1S1 S G 0 (S 0 ) G 1 (G 0 (S 0 )) n-i i DiDi

…Proof of Security Can use this i to distinguish concatenation of q sequence generators G from random. The concatenation is (t, q  ) pseudo-random Therefore the construction is (t, , q) pseudo-random

Disadvantages Expensive - n invocations of G Sequential Deterioration of  But does the job! From any pseudo-random sequence generator construct a pseudo-random function. Theorem: one-way functions exist if and only if pseudo-random functions exist.

Applications of Pseudo-random Functions Learning Theory - lower bounds –Cannot PAC learn any class containing pseudo-random function Complexity Theory - impossibility of natural proofs for separating classes. Any setting where huge shared random string is useful Caveat: what happens when the seed is made public?

Application to Signatures Can make the UOWHF signature scheme into a memoryless/history independent one. Identify the tree of the signature scheme and the tree of pseudo- random function –Can add labels on the internal nodes Add to the secret-key of the signature scheme a key to a pseudo- random function Generate the one-time signatures of the triples using the label on the node –Guarantees consistency To always get the same signature on a message: the path to the leaf used is determined by the message

Construction of UOWHF signatures Key generation : generate the root –Three sets of keys for a one-time signature scheme –A function g  G from a family of UOWHF Signing algorithm: Traverse the tree in a BFS manner –Generate a new triple –Sign the message using the middle part of node –Put the generated triple in the next available node in the current level If all nodes in current level are assigned, create a new one. –The signature consists of: The one-time signature on the message The nodes along the path to the root the one-time signatures on the hashed nodes along the path to the root Keep secret the private keys of all triples Verification of signature: Verify the one-times signature given. triple Size of signature: Depth of tree ¢ triple size

Another paradigm for obtaining Signatures Shared secret seed - can get authentication What about public-key? Can we use the techniques? Yes!? – Private key is S – Public key is commitment to F S –To sign M - provide F S (M) and a proof of consistency with the commitment

Pseudo-Random Permutations Block-Ciphers : Shared-key encryption schemes where: The encryption of every plaintext block is a ciphertext block of the same length. Key BC Plaintext Ciphertext

Block Ciphers Advantages –Saves up on memory and communication bandwidth –Easy to incorporate within existing systems. Main Disadvantage –Every block is always encrypted in the same way. Important Examples: DES, AES

Modeling Block Ciphers Pseudo-random Permutations F :  0,1  k   0,1  n   0,1  n Key Domain Range F -1 :  0,1  k   0,1  n   0,1  n Key Range Domain Want: –X= F S -1 (F S (X)) Correct inverse –Efficiently computable

The Test The tester A that can choose adaptively –X 1 and get Y 1 = F S (X 1 ) –Y 2 and get X 2 = F S -1 (Y 2 ) … –X q and get Y q = F S (X q ) Then A has to decide whether – F S  R Φ k  or – F S  R P (n) =  F | 1-1 F :  0,1  n   0,1  n  Can choose to evaluate or invert any point!

(t, ,q)- pseudo-random For a function F chosen at random from (1) Φ k  ={F S | S  0,1  k  (2) P (n) =  F | 1-1 F :  0,1  n   0,1  n  For all t -time machines A that choose q locations and try to distinguish (1) from (2)  Pr  A= ‘1’  F  R F k  - Pr  A= ‘1’  F  R P (n)    

Construction of Pseudo-Random Permutations Possible to construct pseudo-random permutations from pseudo-random functions (and vice versa...) Based on 4 Feistal Permutations

Feistal Permutation Any function f :  0,1  n   0,1  n defines a Feistal Permutation  0,1  2n   0,1  2n D f (L,R)=(R, L  f(R)) Feistal permutations are as easy to invert as to compute: D f -1 (L,R)=(R  f(L),L) Many Block Cipher based on such permutations, where the function f is derived from secret key

Feistal Permutation f L1L1 R1R1 L2L2 R2R2

Composing Feistal Permutations Make the function f:  0,1  n   0,1  n a pseudo-random function F S  R Φ k This defines a keyed family of permutations  0,1  2n   0,1  2n Clearly it is not pseudo-random –Right block goes unchanged to left block What about composing two such keyed permutations With independent keys Not pseudo-random: D S 2 (D S 1 (L,R))= (F S 1 (L)  R, F S 2 (F S 1 (L)  R)  R) -For two inputs sharing the same left block Looks pretty good for random attacks!

Composing Feistal Permutations Make the function f:  0,1  n   0,1  n a pseudo-random function F S  R Φ k This defines a keyed family of permutations  0,1  2n   0,1  2n Clearly it is not pseudo-random –Right block goes unchanged to left block What about composing two such keyed permutations With independent keys Not pseudo-random: D S 2 (D S 1 (L,R))= (F S 1 (R)  L, F S 2 (F S 1 (R)  L)  R) –For two inputs sharing the same left block –Looks pretty good for random attacks! Protects left block Protects right block

Main Construction Let F 1, F 2,F 3,F 4  R PRF, then the composition of D F 1, D F 2, D F 3, D F 4 is a pseudo-random permutation. Each F i :  0,1  n   0,1  n. Resulting Permutation  0,1  2n   0,1  2n. F 1 and F 4 can be ``combinatorial”: –pair-wise independent. –low probability of collision on first block Error probability is ~ q 2 /2 n

Security Theorem Let (1)   be the set of permutations obtained when The two middle G 2,G 3 are truly random functions and the first and last are (h 1,h 2 ) chosen from a pairwise independent family. (2) P (n) =  F | 1-1 F :  0,1  n   0,1  n  Theorem: For any adversary A –(not necessarily efficient) –that makes at most q queries the advantage in distinguishing between a random permutation from P (n) and a random one from   is at most q 2 /2 n + q 2 /2 2n Corollary: the original construction is computationally secure

Sources Goldreich’s Foundations of Cryptography, volumes 1 and 2 Goldreich, Goldwasser and Micali, How to construct random functions, Journal of the ACM 33, 1986, How to construct random functions Luby-Rackoff: How to construct pseudorandom permutations from pseudorandom functions, SIAM J. Computing, Naor-Reingold: Luby-Rackoff Revisited, Journal of Cryptology, 1999.