symmetric key encryption constructions
play

Symmetric-Key Encryption: constructions Lecture 5 PRF , Block - PowerPoint PPT Presentation

Symmetric-Key Encryption: constructions Lecture 5 PRF , Block Cipher PRG from One-Way RECALL Permutations One-bit stretch PRG, G k : {0,1} k {0,1} k+1 k k G R 1 Increasing the stretch Can use part of the PRG output as a new seed


  1. Pseudorandom Function (PRF) A PRF can be constructed from any PRG K 00 G is a length- G K 0 doubling PRG K 01 G K K 10 G K 1 K 11

  2. Pseudorandom Function (PRF) A PRF can be constructed from any PRG K 000 G K 00 G is a K 001 length- G K 0 doubling K 010 G PRG K 01 K 011 G K K 100 G K 10 K 101 G K 1 K 110 G K 11 K 111

  3. Pseudorandom Function (PRF) A PRF can be constructed from any PRG K 000 G K 00 G is a K 001 length- G K 0 doubling K 010 G PRG K 01 K 011 G ... K K 100 G K 10 K 101 G K 1 K 110 G K 11 K 111

  4. Pseudorandom Function (PRF) A PRF can be constructed from any PRG K 000 G K 00 G is a K 001 length- G K 0 doubling K 010 G PRG K 01 K 011 G ... K K 100 G K 10 K 101 G K 1 K 110 G K 11 K 111

  5. Pseudorandom Function (PRF) A PRF can be constructed from any PRG K 000 G K 00 G is a K 001 length- G K 0 doubling K 010 G PRG K 01 K 011 G ... K K 100 G K 10 K 101 G K 1 K 110 G K 11 K 111 r

  6. Pseudorandom Function (PRF) A PRF can be constructed from any PRG K 000 G K 00 G is a K 001 length- G K 0 doubling K 010 G PRG K 01 K 011 G ... K K 100 G K 10 K 101 G K 1 K 110 G K 11 K 111 r

  7. Pseudorandom Function (PRF) A PRF can be constructed from any PRG K 000 G K 00 G is a K 001 length- G K 0 doubling K 010 G PRG K 01 K 011 G ... K K r K 100 G K 10 K 101 G K 1 K 110 G K 11 K 111 r

  8. Pseudorandom Function (PRF) A PRF can be constructed from any PRG

  9. Pseudorandom Function (PRF) A PRF can be constructed from any PRG Not blazing fast

  10. Pseudorandom Function (PRF) A PRF can be constructed from any PRG Not blazing fast Faster constructions based on specific number-theoretic computational complexity assumptions

  11. Pseudorandom Function (PRF) A PRF can be constructed from any PRG Not blazing fast Faster constructions based on specific number-theoretic computational complexity assumptions Fast heuristic constructions

  12. Pseudorandom Function (PRF) A PRF can be constructed from any PRG Not blazing fast Faster constructions based on specific number-theoretic computational complexity assumptions Fast heuristic constructions PRF in practice: Block Cipher

  13. Pseudorandom Function (PRF) A PRF can be constructed from any PRG Not blazing fast Faster constructions based on specific number-theoretic computational complexity assumptions Fast heuristic constructions PRF in practice: Block Cipher K BC r

  14. Pseudorandom Function (PRF) A PRF can be constructed from any PRG Not blazing fast Faster constructions based on specific number-theoretic computational complexity assumptions Fast heuristic constructions PRF in practice: Block Cipher K BC Extra features/requirements: r

  15. Pseudorandom Function (PRF) A PRF can be constructed from any PRG Not blazing fast Faster constructions based on specific number-theoretic computational complexity assumptions Fast heuristic constructions PRF in practice: Block Cipher K BC Extra features/requirements: r Permutation: input block (r) to output block

  16. Pseudorandom Function (PRF) A PRF can be constructed from any PRG Not blazing fast Faster constructions based on specific number-theoretic computational complexity assumptions Fast heuristic constructions PRF in practice: Block Cipher K BC Extra features/requirements: r Permutation: input block (r) to output block Key can be used as an inversion trapdoor

  17. Pseudorandom Function (PRF) A PRF can be constructed from any PRG Not blazing fast Faster constructions based on specific number-theoretic computational complexity assumptions Fast heuristic constructions PRF in practice: Block Cipher K BC Extra features/requirements: r Permutation: input block (r) to output block Key can be used as an inversion trapdoor Pseudorandomness even with access to inversion

  18. CPA-secure SKE with a Block Cipher

  19. CPA-secure SKE with a Block Cipher Suppose Alice and Bob have shared a key (seed) for a block-cipher (PRF) BC

  20. CPA-secure SKE with a Block Cipher Suppose Alice and Bob have shared a key (seed) for a block-cipher (PRF) BC For each encryption, Alice will pick a fresh pseudorandom pad, by picking a fresh value r and setting pad=BC K (r)

  21. CPA-secure SKE with a Block Cipher Suppose Alice and Bob have shared a key (seed) m for a block-cipher (PRF) BC (block) Enc For each encryption, Alice will pick a fresh K BC pseudorandom pad, by picking a fresh value r and ⊕ setting pad=BC K (r) r

  22. CPA-secure SKE with a Block Cipher Suppose Alice and Bob have shared a key (seed) m for a block-cipher (PRF) BC (block) Enc For each encryption, Alice will pick a fresh K BC pseudorandom pad, by picking a fresh value r and ⊕ setting pad=BC K (r) r Bob needs to be able to generate the same pad, so Alice sends r (in the clear, as part of the ciphertext) to Bob

  23. CPA-secure SKE with a Block Cipher Suppose Alice and Bob have shared a key (seed) m for a block-cipher (PRF) BC (block) Enc For each encryption, Alice will pick a fresh K BC pseudorandom pad, by picking a fresh value r and ⊕ setting pad=BC K (r) r Bob needs to be able to generate the same pad, so Alice sends r (in the clear, as part of the ciphertext) to Bob

  24. CPA-secure SKE with a Block Cipher Suppose Alice and Bob have shared a key (seed) m for a block-cipher (PRF) BC (block) Enc For each encryption, Alice will pick a fresh K BC pseudorandom pad, by picking a fresh value r and ⊕ setting pad=BC K (r) r Bob needs to be able to generate the same pad, so Alice sends r (in the clear, as part of the ciphertext) to Bob K BC ⊕ Dec m

  25. CPA-secure SKE with a Block Cipher Suppose Alice and Bob have shared a key (seed) m for a block-cipher (PRF) BC (block) Enc For each encryption, Alice will pick a fresh K BC pseudorandom pad, by picking a fresh value r and ⊕ setting pad=BC K (r) r Bob needs to be able to generate the same pad, so Alice sends r (in the clear, as part of the ciphertext) to Bob Even if Eve sees r, PRF security guarantees that BC K (r) is pseudorandom. (In fact, Eve could have K BC ⊕ picked r, as long as we ensure no r is reused.) Dec m

  26. CPA-secure SKE with a Block Cipher Suppose Alice and Bob have shared a key (seed) m for a block-cipher (PRF) BC (block) Enc For each encryption, Alice will pick a fresh K BC pseudorandom pad, by picking a fresh value r and ⊕ setting pad=BC K (r) r Bob needs to be able to generate the same pad, so Alice sends r (in the clear, as part of the ciphertext) to Bob Even if Eve sees r, PRF security guarantees that BC K (r) is pseudorandom. (In fact, Eve could have K BC ⊕ picked r, as long as we ensure no r is reused.) How to pick a fresh r? Dec m

  27. CPA-secure SKE with a Block Cipher Suppose Alice and Bob have shared a key (seed) m for a block-cipher (PRF) BC (block) Enc For each encryption, Alice will pick a fresh K BC pseudorandom pad, by picking a fresh value r and ⊕ setting pad=BC K (r) r Bob needs to be able to generate the same pad, so Alice sends r (in the clear, as part of the ciphertext) to Bob Even if Eve sees r, PRF security guarantees that BC K (r) is pseudorandom. (In fact, Eve could have K BC ⊕ picked r, as long as we ensure no r is reused.) How to pick a fresh r? Pick at random! Dec m

  28. CPA-secure SKE with a Block Cipher

  29. CPA-secure SKE with a Block Cipher How to encrypt a long message (multiple blocks)?

  30. CPA-secure SKE with a Block Cipher How to encrypt a long message (multiple blocks)? Can chop the message into blocks and independently encrypt each block as before. Works, but ciphertext size is double that of the plaintext (if |r| is one-block long)

  31. CPA-secure SKE with a Block Cipher How to encrypt a long message (multiple blocks)? Can chop the message into blocks and independently encrypt each block as before. Works, but ciphertext size is double that of the plaintext (if |r| is one-block long) Extend output length of PRF (w/o increasing input length)

  32. CPA-secure SKE with a Block Cipher How to encrypt a long message (multiple blocks)? Can chop the message into blocks and independently encrypt each block as before. Works, but ciphertext size is double that of the plaintext (if |r| is one-block long) Extend output length of PRF (w/o increasing input length) r r ... F K F K F K

  33. CPA-secure SKE with a Block Cipher How to encrypt a long message (multiple blocks)? Can chop the message into blocks and independently encrypt each block as before. Works, but ciphertext size is double that of the plaintext (if |r| is one-block long) Extend output length of PRF (w/o increasing input length) r sequential r ... F K F K F K

  34. CPA-secure SKE with a Block Cipher How to encrypt a long message (multiple blocks)? Can chop the message into blocks and independently encrypt each block as before. Works, but ciphertext size is double that of the plaintext (if |r| is one-block long) Extend output length of PRF (w/o increasing input length) r r sequential r r,1 r,2 r,t ... F K F K F K F K F K F K ...

  35. CPA-secure SKE with a Block Cipher How to encrypt a long message (multiple blocks)? Can chop the message into blocks and independently encrypt each block as before. Works, but ciphertext size is double that of the plaintext (if |r| is one-block long) Extend output length of PRF (w/o increasing input length) input length r r sequential slightly decreased, r r,1 r,2 r,t based on ... F K F K F K F K F K F K an a priori ... limit on t

  36. CPA-secure SKE with a Block Cipher How to encrypt a long message (multiple blocks)? Can chop the message into blocks and independently encrypt each block as before. Works, but ciphertext size is double that of the plaintext (if |r| is one-block long) Extend output length of PRF (w/o increasing input length) input length r r sequential slightly decreased, r r,1 r,2 r,t based on ... F K F K F K F K F K F K an a priori ... limit on t Output is indistinguishable from t random blocks (even if input to F K known/chosen)

  37. CPA-secure SKE with a Block Cipher

  38. CPA-secure SKE with a Block Cipher Various “modes” of operation of a Block-cipher (i.e., encryption schemes using a block-cipher). All with one block overhead.

  39. CPA-secure SKE with a Block Cipher Various “modes” of operation of a Block-cipher (i.e., encryption schemes using a block-cipher). All with one block overhead. Output Feedback (OFB) mode: Extend the pseudorandom output using the first construction in the previous slide

  40. CPA-secure SKE with a Block Cipher Various “modes” of operation of a Block-cipher (i.e., encryption schemes using a block-cipher). All with one block overhead. r Output Feedback (OFB) mode: Extend the pseudorandom output using the first construction in the previous slide

  41. CPA-secure SKE with a Block Cipher Various “modes” of operation of a Block-cipher (i.e., encryption schemes using a block-cipher). All with one block overhead. r Output Feedback (OFB) mode: Extend the pseudorandom output using the first construction in the previous slide m 1 ⊕ m 2 ⊕ m t ⊕ c 1 c 2 c t

  42. CPA-secure SKE with a Block Cipher Various “modes” of operation of a Block-cipher (i.e., encryption schemes using a block-cipher). All with one block overhead. r Output Feedback (OFB) mode: Extend the r+1 r+2 r+t pseudorandom output using the first construction in the previous slide F K F K F K ... Counter (CTR) Mode: Similar idea as in the m 1 ⊕ m 2 ⊕ m t ⊕ second construction. No a priori limit on number of blocks in a message. Security from c 1 c 2 c t low likelihood of (r+1,...,r+t) running into (r’+1,...,r’+t’)

  43. CPA-secure SKE with a Block Cipher Various “modes” of operation of a Block-cipher (i.e., encryption schemes using a block-cipher). All with one block overhead. Not a PRF (Why?) r Output Feedback (OFB) mode: Extend the r+1 r+2 r+t pseudorandom output using the first construction in the previous slide F K F K F K ... Counter (CTR) Mode: Similar idea as in the m 1 ⊕ m 2 ⊕ m t ⊕ second construction. No a priori limit on number of blocks in a message. Security from c 1 c 2 c t low likelihood of (r+1,...,r+t) running into (r’+1,...,r’+t’)

  44. CPA-secure SKE with a Block Cipher Various “modes” of operation of a Block-cipher (i.e., encryption schemes using a block-cipher). All with one block overhead. Not a PRF (Why?) r Output Feedback (OFB) mode: Extend the r+1 r+2 r+t pseudorandom output using the first construction in the previous slide F K F K F K ... Counter (CTR) Mode: Similar idea as in the m 1 ⊕ m 2 ⊕ m t ⊕ second construction. No a priori limit on number of blocks in a message. Security from c 1 c 2 c t low likelihood of (r+1,...,r+t) running into m 1 m t m 2 r (r’+1,...,r’+t’) ⊕ ⊕ ⊕ Cipher Block Chaining (CBC) mode: ... F K F K F K Sequential encryption. Decryption uses F K-1 . Ciphertext an integral number of blocks. c 1 c 2 c t

  45. Active Adversary

  46. Active Adversary An active adversary can inject messages into the channel

  47. Active Adversary An active adversary can inject messages into the channel Eve can send ciphertexts to Bob and get them decrypted

  48. Active Adversary An active adversary can inject messages into the channel Eve can send ciphertexts to Bob and get them decrypted Chosen Ciphertext Attack (CCA)

  49. Active Adversary An active adversary can inject messages into the channel Eve can send ciphertexts to Bob and get them decrypted Chosen Ciphertext Attack (CCA) If Bob decrypts all ciphertexts for Eve, no security possible

  50. Active Adversary An active adversary can inject messages into the channel Eve can send ciphertexts to Bob and get them decrypted Chosen Ciphertext Attack (CCA) If Bob decrypts all ciphertexts for Eve, no security possible What can Bob do?

  51. Symmetric-Key Encryption RECALL SIM-CCA Security Recv Send Key/Enc Key/Dec Replay SIM-CCA Filter secure if: ∀ ∃ s.t. ∀ REAL ≈ IDEAL Env Env REAL IDEAL

  52. Symmetric-Key Encryption RECALL IND-CCA + ~correctness IND-CCA Security equivalent to SIM-CCA Experiment picks b ← {0,1} and K ← KeyGen Enc(m b ,K) Adv gets (guarded) access to Dec K oracle Key/Enc Key/Dec For as long as Adversary wants Adv sends two messages m 0 , m 1 No m b challenge to the experiment ciphertext answered Expt returns Enc(m b ,K) to the adversary m 0 ,m 1 b’ b Adversary returns a guess b’ b ← {0,1} Experiments outputs 1 iff b’=b b’=b? IND-CCA secure if for all feasible Yes/No adversaries Pr[b’=b] ≈ 1/2

  53. CCA Security

  54. CCA Security How to obtain CCA security?

  55. CCA Security How to obtain CCA security? Use a CPA-secure encryption scheme, but make sure Bob “accepts” and decrypts only ciphertexts produced by Alice

  56. CCA Security How to obtain CCA security? Use a CPA-secure encryption scheme, but make sure Bob “accepts” and decrypts only ciphertexts produced by Alice i.e., Eve can’ t create new ciphertexts that will be accepted by Bob

  57. CCA Security How to obtain CCA security? Use a CPA-secure encryption scheme, but make sure Bob “accepts” and decrypts only ciphertexts produced by Alice i.e., Eve can’ t create new ciphertexts that will be accepted by Bob CCA secure SKE reduces to the problem of CPA secure SKE and (shared key) message authentication

  58. CCA Security How to obtain CCA security? Use a CPA-secure encryption scheme, but make sure Bob “accepts” and decrypts only ciphertexts produced by Alice i.e., Eve can’ t create new ciphertexts that will be accepted by Bob CCA secure SKE reduces to the problem of CPA secure SKE and (shared key) message authentication MAC: Message Authentication Code

  59. Message Authentication Codes

  60. Message Authentication Codes A single short key shared by Alice and Bob

  61. Message Authentication Codes A single short key shared by Alice and Bob Can sign any (polynomial) number of messages

  62. Message Authentication Codes A single short key shared by Alice and Bob Can sign any (polynomial) number of MAC K Ver K messages A triple (KeyGen, MAC, Verify)

  63. Message Authentication Codes A single short key shared by Alice and Bob Can sign any (polynomial) number of MAC K Ver K messages A triple (KeyGen, MAC, Verify) Correctness: For all K from KeyGen, and all messages M, Verify K (M,MAC K (M))=1

Recommend


More recommend