18-733 spring 2016 semantic security...

28
18-733 Spring 2016 Semantic Security Review Kyle Soska Jan 27, 2017

Upload: others

Post on 16-Jul-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

18-733 Spring 2016Semantic Security Review

Kyle Soska

Jan 27, 2017

Page 2: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

Topics Covered

• Stream Ciphers– One Time Pad

– Many Time Pad

• PRNG– Statistical tests

– Security game for secure PRNG

• Perfect Secrecy

• Semantic Security– Security Game Definitions

Page 3: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

Security Games – Overview

Page 4: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

Security Games – Blind Taste Test

Please give me a random drink

Adversary Challenger

Page 5: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

Security Games – Blind Taste Test

b = 0

b = 1

b = $

Page 6: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

Security Games – Blind Taste Test

b = 0

b = 1

b = $

Only distinguishing feature is taste

Page 7: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

Security Games – Blind Taste Test

b = 0

b = 1

b = $My guess is X

Page 8: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

Security Games - Adversary

• Wine Tasting Adversaries:– People who have never tasted wine

– People who sometimes drink wine

– People who often drink wine

– Professional wine taster (sommelier)

• Two samples 𝑤1, 𝑤2 are indistinguishable iffthey are indistinguishable w.r.t. all reasonable adversaries

Page 9: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

Semantic Security

• We know what properties we want our constructions to have in an ideal world

• If we can show that our real constructions are “indistinguishable” from these ideal constructions, then we can use them as if they have these properties

Page 10: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

Example: PRNG

• Ideal: Sequence of truly random bits

• Actual: Pseudorandom sequence of bits

b = 0

b = 1

b = $, k = $

Random

𝐺(𝑘)

01001110101….

𝐴𝑑𝑣 𝐴 = Pr 𝐴 𝐺 𝑘 = 1 − Pr 𝐴 𝑟 = 1

Page 11: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

Example: IND-CPA (Indistinguishable with respect to Chosen Plaintext Attack)

b = 0

b = 1

b = $, k = $

𝐸𝑛𝑐 𝑘,𝑚0

𝐸𝑛𝑐 𝑘,𝑚1

𝐸𝑛𝑐(𝑘,𝑚𝑏)

𝐴𝑑𝑣 𝐴 = Pr 𝐴 𝐸𝑛𝑐 𝑘,𝑚0 = 1 − Pr 𝐴 𝐸𝑛𝑐 𝑘,𝑚1 = 1

(𝑚0, 𝑚1)

Page 12: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

Example Homework Question (IND-CPA$)

• Consider the following gameb = 0

b = 1

b = $, k = $

𝑦 = 𝐸𝑛𝑐 𝑘,𝑚0

𝑦 = 𝐸𝑛𝑐 𝑘, $

𝑦

𝐴𝑑𝑣 𝐴 = Pr 𝐴 𝐸𝑛𝑐 𝑘,𝑚0 = 1 − Pr 𝐴 𝐸𝑛𝑐 𝑘, $ = 1

𝑚0

Question: Let 𝑬𝒏𝒄 be an IND-CPA secure encryption scheme, is 𝑬𝒏𝒄 IND-CPA$ secure?

Question: Let 𝑬𝒏𝒄 be an IND-CPA$ secure encryption scheme, is 𝑬𝒏𝒄 IND-CPA secure?

Page 13: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

IND-CPA => IND-CPA$ ?

• p ⇒ 𝑞 ≡ ¬𝑞 ⇒ ¬𝑝 (contrapositive)

• IND − CPA ⇒ IND − CPA$ ≡ ¬IND − CPA$ ⇒ ¬IND − CPA

Forwards or backwards, which direction is more appealing?

What is implied by ¬IND − CPA$ ?

Page 14: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

¬𝐼𝑁𝐷 − 𝐶𝑃𝐴$ ⇒ ¬𝐼𝑁𝐷 − 𝐶𝑃𝐴 ?

b = 0

b = 1

b = $, k = $

𝐸𝑛𝑐 𝑘,𝑚0

𝐸𝑛𝑐 𝑘,𝑚1

𝐸𝑛𝑐(𝑘,𝑚𝑏)

𝐴𝑑𝑣 𝐴 = Pr 𝐴 𝐸𝑛𝑐 𝑘,𝑚0 = 1 − Pr 𝐴 𝐸𝑛𝑐 𝑘,𝑚1 = 1

(𝑚0, 𝑚1)

Can be break this game with the help of an adversary that breaks IND-CPA$?

Page 15: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

¬𝐼𝑁𝐷 − 𝐶𝑃𝐴$ ⇒ ¬𝐼𝑁𝐷 − 𝐶𝑃𝐴 ?

b = 0

b = 1

b = $, k = $

𝐸𝑛𝑐 𝑘,𝑚0

𝐸𝑛𝑐 𝑘,𝑚1

𝐸𝑛𝑐(𝑘,𝑚𝑏)

(𝑚0, 𝑚1)

IND-CPA$adversary

IND-CPAadversary

Page 16: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

¬𝐼𝑁𝐷 − 𝐶𝑃𝐴$ ⇒ ¬𝐼𝑁𝐷 − 𝐶𝑃𝐴 ?

b = 0

b = 1

b = $, k = $

𝐸𝑛𝑐 𝑘,𝑚0

𝐸𝑛𝑐 𝑘,𝑚1

𝐸𝑛𝑐(𝑘,𝑚𝑏)

(𝒎𝟎, 𝑚1)𝒎𝟎

$

Page 17: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

¬𝐼𝑁𝐷 − 𝐶𝑃𝐴$ ⇒ ¬𝐼𝑁𝐷 − 𝐶𝑃𝐴 ?

b = 0

b = 1

b = $, k = $

𝐸𝑛𝑐 𝑘,𝑚0

𝐸𝑛𝑐 𝑘,𝑚1

𝐸𝑛𝑐(𝑘,𝑚𝑏)

(𝑚0, 𝑚1)𝑚0

$

𝑬𝒏𝒄(𝒌,𝒎𝒃)

I am good, I have advantage > 𝜖

Page 18: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

¬𝐼𝑁𝐷 − 𝐶𝑃𝐴$ ⇒ ¬𝐼𝑁𝐷 − 𝐶𝑃𝐴 ?

b = 0

b = 1

b = $, k = $

𝐸𝑛𝑐 𝑘,𝑚0

𝐸𝑛𝑐 𝑘,𝑚1

𝐸𝑛𝑐(𝑘,𝑚𝑏)

(𝑚0, 𝑚1)𝑚0

$

𝑬𝒏𝒄(𝒌,𝒎𝒃)

The answer is b

If b = 0: 𝐴𝑑𝑣 = 𝜖If b = 1: 𝐴𝑑𝑣 = 𝜖

Page 19: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

¬𝐼𝑁𝐷 − 𝐶𝑃𝐴$ ⇒ ¬𝐼𝑁𝐷 − 𝐶𝑃𝐴 ?

b = 0

b = 1

b = $, k = $

𝐸𝑛𝑐 𝑘,𝑚0

𝐸𝑛𝑐 𝑘,𝑚1

𝐸𝑛𝑐(𝑘,𝑚𝑏)

(𝑚0, 𝑚1)𝑚0

$

𝑬𝒏𝒄(𝒌,𝒎𝒃)

The answer is b

𝑨𝒅𝒗 𝑨 = 𝐏𝐫 𝑨 𝑬𝒏𝒄 𝒌,𝒎𝟎 = 𝟏 − 𝐏𝐫 𝑨 𝑬𝒏𝒄 𝒌,𝒎𝟏 = 𝟏 = 𝑨𝒅𝒗(¬𝑰𝑵𝑫 − 𝑪𝑷𝑨$)

Page 20: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

Example Homework Question (IND-CPA$)

• Consider the following gameb = 0

b = 1

b = $, k = $

𝑦 = 𝐸𝑛𝑐 𝑘,𝑚0

𝑦 = 𝐸𝑛𝑐 𝑘, $

𝑦

𝐴𝑑𝑣 𝐴 = Pr 𝐴 𝐸𝑛𝑐 𝑘,𝑚0 = 1 − Pr 𝐴 𝐸𝑛𝑐 𝑘, $ = 1

(𝑚0)

Question: Let 𝑬𝒏𝒄 be an IND-CPA secure encryption scheme, is 𝑬𝒏𝒄 IND-CPA$ secure?

Question: Let 𝑬𝒏𝒄 be an IND-CPA$ secure encryption scheme, is 𝑬𝒏𝒄 IND-CPA secure?

Yes!

Page 21: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

¬𝐼𝑁𝐷 − 𝐶𝑃𝐴 ⇒ ¬𝐼𝑁𝐷 − 𝐶𝑃𝐴$ ?

b = 0

b = 1

b = $, k = $

𝑦 = 𝐸𝑛𝑐 𝑘,𝑚0

𝑦 = 𝐸𝑛𝑐 𝑘, $

𝑦

𝐴𝑑𝑣 𝐴 = Pr 𝐴 𝐸𝑛𝑐 𝑘,𝑚0 = 1 − Pr 𝐴 𝐸𝑛𝑐 𝑘, $ = 1

(𝑚0)

Page 22: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

¬𝐼𝑁𝐷 − 𝐶𝑃𝐴 ⇒ ¬𝐼𝑁𝐷 − 𝐶𝑃𝐴$ ?

b = 0

b = 1

b = $, k = $

𝑦 = 𝐸𝑛𝑐 𝑘,𝑚0

𝑦 = 𝐸𝑛𝑐 𝑘, $

𝑦

𝒎𝟎(𝒎𝟎,𝒎𝟏)

IND-CPAadversary

IND-CPA$adversary

Page 23: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

¬𝐼𝑁𝐷 − 𝐶𝑃𝐴 ⇒ ¬𝐼𝑁𝐷 − 𝐶𝑃𝐴$ ?

b = 0

b = 1

b = $, k = $

𝑦 = 𝐸𝑛𝑐 𝑘,𝑚0

𝑦 = 𝐸𝑛𝑐 𝑘, $

𝑦

𝑚0(𝑚0, 𝑚1)

𝒚

I am good, I have advantage > 𝜖

Page 24: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

¬𝐼𝑁𝐷 − 𝐶𝑃𝐴 ⇒ ¬𝐼𝑁𝐷 − 𝐶𝑃𝐴$ ?

b = 0

b = 1

b = $, k = $

𝑦 = 𝐸𝑛𝑐 𝑘,𝑚0

𝑦 = 𝐸𝑛𝑐 𝑘, $

𝑦

𝑚0(𝑚0, 𝑚1)

𝑦

The answer is b

If b = 0: This is identical to the IND-CPA game, oracle has 𝐴𝑑𝑣 = 𝜖if b = 1: This oracle was given input that it is not designed to handle, in the worst case it

has no advantage at all, just random guessing

Page 25: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

¬𝐼𝑁𝐷 − 𝐶𝑃𝐴 ⇒ ¬𝐼𝑁𝐷 − 𝐶𝑃𝐴$ ?

b = 0

b = 1

b = $, k = $

𝑦 = 𝐸𝑛𝑐 𝑘,𝑚0

𝑦 = 𝐸𝑛𝑐 𝑘, $

𝑦

𝑚0(𝑚0, 𝑚1)

𝑦

The answer is b

𝑨𝒅𝒗 𝑨 = 𝐏𝐫 𝑨 𝑬𝒏𝒄 𝒌,𝒎𝟎 = 𝟏 − 𝐏𝐫 𝑨 𝑬𝒏𝒄 𝒌, $ = 𝟏 =𝑨𝒅𝒗(¬𝑰𝑵𝑫 − 𝑪𝑷𝑨)

𝟐

Page 26: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

Takeaway

• There are other equivalent definitions of the IND-CPA security game

– Left or Right (LoR)

– Real or Random (RoR)

• Are there stronger definitions?

Page 27: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

Real or Random String (IND$-CPA)

b = 0

b = 1

b = $, k = $

𝑦 = 𝐸𝑛𝑐 𝑘,𝑚0

𝑦 = $

𝑦

𝐴𝑑𝑣 𝐴 = Pr 𝐴 𝐸𝑛𝑐 𝑘,𝑚0 = 1 − Pr 𝐴 𝐸𝑛𝑐 𝑘, $ = 1

(𝑚0)

Question: Let 𝑬𝒏𝒄 be an IND-CPA secure encryption scheme, is 𝑬𝒏𝒄 IND$-CPA secure?

Page 28: 18-733 Spring 2016 Semantic Security Reviewcourse.ece.cmu.edu/~ece733/recitations/recitation-02.pdf · 2017-01-28 · Security Games –Blind Taste Test b = 0 b = 1 b = $ Only distinguishing

IND − CPA ⇏ IND$ − CPA

• Let Enc be an IND-CPA secure encryption scheme that always appends the bit ‘0’ to the ciphertext

• An adversary A can check the last bit of the ciphertext and guess “real” if it is 0, “random” if it is 1

𝐴𝑑𝑣 𝐴 = Pr 𝐴 𝐸𝑛𝑐 𝑘,𝑚0 = 1 − Pr 𝐴 $ = 1 = 1 −1

2=1

2