1 Brief PRP-PRF Recap CS255 Winter ‘06. 2 PRPs and PRFs PRF: F: K  X  Y such that: exists “efficient” algorithm to eval. F(k,x) PRP: E: K  X  X such.

Slides:



Advertisements
Similar presentations
Dan Boneh Using block ciphers Modes of operation: one time key Online Cryptography Course Dan Boneh example: encrypted , new key for every message.
Advertisements

Online Cryptography Course Dan Boneh
Cryptography: Review Day David Brumley Carnegie Mellon University.
1 PRPs and PRFs CS255: Winter Abstract ciphers: PRPs and PRFs, 2.Security models for encryption, 3.Analysis of CBC and counter mode Dan Boneh, Stanford.
Authenticated Encryption and Cryptographic Network Protocols David Brumley Carnegie Mellon University.
Cryptography: The Landscape, Fundamental Primitives, and Security David Brumley Carnegie Mellon University.
Dan Boneh Message Integrity A Parallel MAC Online Cryptography Course Dan Boneh.
1 Message Integrity CS255 Winter ‘06. 2 Message Integrity Goal: provide message integrity. No confidentiality. –ex: Protecting public binaries on disk.
CMSC 414 Computer and Network Security Lecture 4 Jonathan Katz.
Asymmetric Cryptography part 1 & 2 Haya Shulman Many thanks to Amir Herzberg who donated some of the slides from
Modes of Operation CS 795. Electronic Code Book (ECB) Each block of the message is encrypted with the same secret key Problems: If two identical blocks.
1 CS 255 Lecture 4 Attacks on Block Ciphers Brent Waters.
1 Intro To Encryption Exercise 4. 2 Defining Pseudo-Random Permutation Let A be alg. with oracle to a function from {0,1} k to {0,1} k Notation: let A.
CMSC 414 Computer and Network Security Lecture 4 Jonathan Katz.
Lecture 23 Symmetric Encryption
Dan Boneh Basic key exchange Public-key encryption Online Cryptography Course Dan Boneh.
Cryptography Overview CS155. Cryptography Is A tremendous tool The basis for many security mechanisms Is not The solution to all security problems Reliable.
Dan Boneh Authenticated Encryption Definitions Online Cryptography Course Dan Boneh.
Dan Boneh Authenticated Encryption Chosen ciphertext attacks Online Cryptography Course Dan Boneh.
Dan Boneh Public Key Encryption from trapdoor permutations Public key encryption: definitions and security Online Cryptography Course Dan Boneh.
Dan Boneh Stream ciphers The One Time Pad Online Cryptography Course Dan Boneh.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
CS555Spring 2012/Topic 111 Cryptography CS 555 Topic 11: Encryption Modes and CCA Security.
Dan Boneh Using block ciphers Modes of operation: many time key (CTR) Online Cryptography Course Dan Boneh Example applications: 1. File systems: Same.
CMSC 414 Computer and Network Security Lecture 5 Jonathan Katz.
BLOCK CIPHER SYSTEMS OPERATION MODES OF DATA ENCRYPTION STANDARD (DES)
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Security.
Dan Boneh Using block ciphers Modes of operation: many time key (CBC) Online Cryptography Course Dan Boneh Example applications: 1. File systems: Same.
Modes of Usage Dan Fleck CS 469: Security Engineering These slides are modified with permission from Bill Young (Univ of Texas) 11 Coming up: Modes of.
Cryptography: Block Ciphers David Brumely Carnegie Mellon University Credits: Slides originally designed by David Brumley. Many other slides are from Dan.
IND-CPA and IND-CCA Concepts Summary  Basic Encryption Security Definition: IND-CPA  Strong Encryption Security Definition: IND-CCA  IND-CPA, IND-CCA.
Dan Boneh Stream ciphers Pseudorandom Generators Online Cryptography Course Dan Boneh.
Cryptography Lecture 2 Arpita Patra. Summary of Last Class  Introduction  Secure Communication in Symmetric Key setting >> SKE is the required primitive.
Dan Boneh Message Integrity CBC-MAC and NMAC Online Cryptography Course Dan Boneh.
Cryptography: The Landscape, Fundamental Primitives, and Security David Brumley Carnegie Mellon University.
Lecture 23 Symmetric Encryption
Odds and ends Tweakable encryption
Cryptography: Review Day David Brumley Carnegie Mellon University.
CS555Spring 2012/Topic 31 Cryptography CS 555 Topic 3: One-time Pad and Perfect Secrecy.
Dan Boneh Stream ciphers Stream ciphers are semantically secure Online Cryptography Course Dan Boneh Goal: secure PRG ⇒ semantically secure stream cipher.
CS555Spring 2012/Topic 71 Cryptography CS 555 Topic 7: Stream Ciphers and CPA Security.
Cryptography Lecture 6 Arpita Patra © Arpita Patra.
Dan Boneh Odds and ends Deterministic Encryption Online Cryptography Course Dan Boneh.
CS555Spring 2012/Topic 81 Cryptography CS 555 Topic 8: Pseudorandom Functions and CPA Security.
Block ciphers What is a block cipher?
Cryptography: Block Ciphers David Brumley Carnegie Mellon University Credits: Many slides from Dan Boneh’s June 2012 Coursera crypto class,
Online Cryptography Course Dan Boneh
Dan Boneh Public Key Encryption from trapdoor permutations Constructions Online Cryptography Course Dan Boneh Goal: construct chosen-ciphertext secure.
Dan Boneh Authenticated Encryption Constructions from ciphers and MACs Online Cryptography Course Dan Boneh.
Cryptography Lecture 10 Arpita Patra © Arpita Patra.
Cryptography: Block Ciphers David Brumely Carnegie Mellon University Credits: Slides originally designed by David Brumley. Many other slides are from Dan.
@Yuan Xue CS 285 Network Security Block Cipher Principle Fall 2012 Yuan Xue.
Using block ciphers Review: PRPs and PRFs
Secrecy of (fixed-length) stream ciphers
PRPs and PRFs CS255: Winter 2017
Cryptography Lecture 12.
Topic 7: Pseudorandom Functions and CPA-Security
Cryptography Lecture 7 Arpita Patra © Arpita Patra.
Cryptography Lecture 7 Arpita Patra © Arpita Patra.
Cryptography Lecture 11.
Symmetric-Key Encryption
Block vs Stream Ciphers
Cryptography Lecture 12 Arpita Patra © Arpita Patra.
Cryptography Lecture 8.
Cryptography Lecture 9.
Cryptography Lecture 12.
Cryptography Lecture 7.
Cryptography Lecture 11.
Cryptography Lecture 10.
Presentation transcript:

1 Brief PRP-PRF Recap CS255 Winter ‘06

2 PRPs and PRFs PRF: F: K  X  Y such that: exists “efficient” algorithm to eval. F(k,x) PRP: E: K  X  X such that: 1. Exists “efficient” algorithm to eval. E(k,x) 2. The func E( k,  ) is one-to-one 3. Exists “efficient” algorithm for inverse D(k,x)

3 Secure PRF For b=0,1 define experiment EXP(b) as: Def: F is a secure PRF if for all “efficient” A: PRF Adv[A,F] = | Pr[EXP(0)=1] – Pr[EXP(1)=1] | is “negligible.” Chal. b Adv. b=0: k  K, f  F(k,  ) b=1: f  Funs[X,Y] x i  X f(x i ) b’  {0,1}

4 Secure PRP For b=0,1 define experiment EXP(b) as: Def: E is a secure PRP if for all “efficient” A: PRP Adv[A,E] = | Pr[EXP(0)=1] – Pr[EXP(1)=1] | is “negligible.” Chal. b Adv. b=0: k  K, f  E(k,  ) b=1: f  Perms[X] x i  X f(x i ) b’  {0,1}

5 PRF Switching Lemma Example PRPs: 3DES, AES, … –For AES: K = {0,1} 128, X = {0,1} 128 –AES PRP Assumption: All 2 80 –time algs A have PRP Adv[A, AES] < PRF Switching lemma: Any secure PRP is also a secure PRF. If E is a PRP over (K,X) then for any q-query adversary A: | PRF Adv[A,E] - PRP Adv[A,E] | < q 2 / 2|X|

6 Using PRPs and PRFs Security always defined using two parameters: –What “power” does adversary have? examples: Adv sees only one ciphertext (i.e. one-time key) Adv sees many PT/CT pairs (CPA) –What “goal” is adversary trying to achieve? example: Semantic security: learn info about PT from CT. one-time key Many-time key (CPA) CCA Sem. Sec. Steam-ciphers Det. ctr-mode (rand) CBC (rand) ctr-mode Later Goal Power

7 Semantic Security for one-time key E = (E,D) a cipher defined over (K,M,C) For b=0,1 define EXP(b) as: Def: E is sem. sec. for one-time key if for all “efficient” A: SS Adv[A, E ] = | Pr[EXP(0)=1] – Pr[EXP(1)=1] | is “negligible.” Chal. b Adv. kKkK m 0, m 1  M : |m 0 | = |m 1 | C  E(k, m b ) b’  {0,1}

8 Semantic security (cont.) Sem. sec.  no “efficient” adversary learns info about PT from a single CT. Electronic Code Book (ECB): not sem. sec. for messages that contain more than one block. –To break ECB adversary uses: m 0 = “ Hello World ” m 1 = “ Hello Hello ” Two blocks

9 Constructions Examples of sem. sec. systems: – SS Adv[A, OTP] = 0 for all A – Deterministic counter mode from a PRF F : E DETCTR (k,m) = Stream cipher built from PRF (e.g. AES, 3DES) m[0]m[1]… F(k,0)F(k,1)… m[L] F(k,L)  c[0]c[1]…c[L]

10 Det. ctr-mode security Theorem:For any L>0. If F is a secure PRF over (K,X,X) then E DETCTR is sem. sec. cipher over (K,X L,X L ). In particular, for any adversary A attacking E DETCTR there exists a PRF adversary B s.t.: SS Adv[A, E DETCTR ] = 2  PRF Adv[B, F] Hence: Since PRF Adv[B, F] is negligible (since F is a secure PRF) then SS Adv[A, E DETCTR ] must be negligible.

11 Proof PRF Chal b SS Adv A (given)PRF Adv B (us) m 0, m 1  X L Choose f r  {0,1} 0, 1, …, L f(0), f(1), …, f(L) c i  m r [i]  f(i)  X (c 0, c 1, …, c L )  X L r’  {0,1} If r=r’ output 0, else output 1 b=1: f  Funs[X,X]  Pr[EXP(1)=0] = Pr[r=r’] = ½ b=0: f  F(k,  )  Pr[EXP(0)=0] = ½  ½  SS Adv[A, E DETCTR ] Hence, PRF Adv[F, B] = ½  SS Adv[A, EDETCTR]

12 Semantic Security for many-time key E = (E,D) a cipher defined over (K,M,C) For b=0,1 define EXP(b) as: Def: E is sem. sec. under CPA if for all “efficient” A: SS CPA Adv[A, E ] = | Pr[EXP(0)=1] – Pr[EXP(1)=1] | is “negligible.” Chal. b Adv. kKkK m 0, m 1  M : |m 0 | = |m 1 | C  E(k, m b ) b’  {0,1} x i  M E(k,x i )

13 Randomized Encryption Fact: stream ciphers are insecure under CPA. Fact: No deterministic encryption can be secure under CPA. If secret key is to be used multiple times  encryption algorithm must be randomized !!

14 Construction 1: CBC Cipher block chaining with a random IV. E(k,  ) m[0]m[1]m[3]m[4]IV  E(k,  )  c[0]c[1]c[3]c[4]IV ciphertext

15 CBC: CPA Analysis CBC Theorem: For any L>0, If F is a secure PRP over (K,X) then E CBC is a sem. sec. under CPA over (K, X L, X L+1 ). In particular, for a q-query adversary A attacking E CBC there exists a PRP adversary B s.t.: SS CPA Adv[A, E CBC ]  2  PRP Adv[B, F] + 2 q 2 L 2 / |X| Note: CBC is only secure as long as qL << |X| 1/2

16 Construction 2: rand ctr-mode m[0]m[1]… F(k,IV)F(k,IV+1)… m[L] F(k,IV+L)  c[0]c[1]…c[L] IV IV - Picked fresh at random for every encryption msg ciphertext

17 rand ctr-mode: CPA analysis Randomized counter mode: random IV. Counter-mode Theorem: For any L>0, If F is a secure PRF over (K,X,X) then E CTR is a sem. sec. under CPA over (K,X L,X L+1 ). In particular, for a q-query adversary A attacking E CTR there exists a PRF adversary B s.t.: SS CPA Adv[A, E CTR ]  2  PRF Adv[B, F] + 2 q 2 L / |X| Note: ctr-mode only secure as long as q 2 L << |X| Better then CBC !