BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by...

151
BILL, RECORD LECTURE!!!! BILL RECORD LECTURE!!!

Transcript of BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by...

Page 1: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

BILL, RECORD LECTURE!!!!

BILL RECORD LECTURE!!!

Page 2: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

The Shift Cipher (cont)

Page 3: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

A Caveat on Cracking The Shift Cipher

We used the following reasoning:

1. fE · fE ∼ 0.065.

2. For 1 ≤ i ≤ 25, fi is English shifted by i . fE · fi ∼ 0.035.

3. Find correct shift i by seeing which fE · fi is ∼ 0.065.

4. Only one of the dot products will be close to 0.065.

Did we really need the numbers 0.068 and 0.035? Do we actuallyneed them?

This will come up later in the course in a situation where findingthe numbers is hard.

Page 4: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

A Caveat on Cracking The Shift Cipher

We used the following reasoning:

1. fE · fE ∼ 0.065.

2. For 1 ≤ i ≤ 25, fi is English shifted by i . fE · fi ∼ 0.035.

3. Find correct shift i by seeing which fE · fi is ∼ 0.065.

4. Only one of the dot products will be close to 0.065.

Did we really need the numbers 0.068 and 0.035? Do we actuallyneed them?

This will come up later in the course in a situation where findingthe numbers is hard.

Page 5: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

A Caveat on Cracking The Shift Cipher

We used the following reasoning:

1. fE · fE ∼ 0.065.

2. For 1 ≤ i ≤ 25, fi is English shifted by i . fE · fi ∼ 0.035.

3. Find correct shift i by seeing which fE · fi is ∼ 0.065.

4. Only one of the dot products will be close to 0.065.

Did we really need the numbers 0.068 and 0.035? Do we actuallyneed them?

This will come up later in the course in a situation where findingthe numbers is hard.

Page 6: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

A Caveat on Cracking The Shift Cipher

We used the following reasoning:

1. fE · fE ∼ 0.065.

2. For 1 ≤ i ≤ 25, fi is English shifted by i . fE · fi ∼ 0.035.

3. Find correct shift i by seeing which fE · fi is ∼ 0.065.

4. Only one of the dot products will be close to 0.065.

Did we really need the numbers 0.068 and 0.035? Do we actuallyneed them?

This will come up later in the course in a situation where findingthe numbers is hard.

Page 7: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

A Caveat on Cracking The Shift Cipher

We used the following reasoning:

1. fE · fE ∼ 0.065.

2. For 1 ≤ i ≤ 25, fi is English shifted by i . fE · fi ∼ 0.035.

3. Find correct shift i by seeing which fE · fi is ∼ 0.065.

4. Only one of the dot products will be close to 0.065.

Did we really need the numbers 0.068 and 0.035? Do we actuallyneed them?

This will come up later in the course in a situation where findingthe numbers is hard.

Page 8: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

How we Would Crack Shift If Did Not KnowParameters 0.065, 0.035

Important point is that fE · fE is BIG, fE · fi SMALL. Do not needto know HOW BIG, HOW SMALL.

1. Input(T ). T is a text that has been coded by the shift cipher.

2. For 0 ≤ i ≤ 25 find fi , the freq vector of the T shifted by i .

3. Compute all fE · fi . The i that has MAX of fE · fi is the i wewant.

Note Didn’t need the parameters 0.065, 0.035 to do this.

Downside Since we knew the parameters 0.065, 0.035 we knewthere was a big gap. We knew there would be no close calls. If wedo not know these kind of parameters then we are not as confident.

But if we have a few candidates for IS-ENGLISH there may beother ways to pick out the real one.

Page 9: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

How we Would Crack Shift If Did Not KnowParameters 0.065, 0.035

Important point is that fE · fE is BIG, fE · fi SMALL. Do not needto know HOW BIG, HOW SMALL.

1. Input(T ). T is a text that has been coded by the shift cipher.

2. For 0 ≤ i ≤ 25 find fi , the freq vector of the T shifted by i .

3. Compute all fE · fi . The i that has MAX of fE · fi is the i wewant.

Note Didn’t need the parameters 0.065, 0.035 to do this.

Downside Since we knew the parameters 0.065, 0.035 we knewthere was a big gap. We knew there would be no close calls. If wedo not know these kind of parameters then we are not as confident.

But if we have a few candidates for IS-ENGLISH there may beother ways to pick out the real one.

Page 10: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

How we Would Crack Shift If Did Not KnowParameters 0.065, 0.035

Important point is that fE · fE is BIG, fE · fi SMALL. Do not needto know HOW BIG, HOW SMALL.

1. Input(T ). T is a text that has been coded by the shift cipher.

2. For 0 ≤ i ≤ 25 find fi , the freq vector of the T shifted by i .

3. Compute all fE · fi . The i that has MAX of fE · fi is the i wewant.

Note Didn’t need the parameters 0.065, 0.035 to do this.

Downside Since we knew the parameters 0.065, 0.035 we knewthere was a big gap. We knew there would be no close calls. If wedo not know these kind of parameters then we are not as confident.

But if we have a few candidates for IS-ENGLISH there may beother ways to pick out the real one.

Page 11: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

How we Would Crack Shift If Did Not KnowParameters 0.065, 0.035

Important point is that fE · fE is BIG, fE · fi SMALL. Do not needto know HOW BIG, HOW SMALL.

1. Input(T ). T is a text that has been coded by the shift cipher.

2. For 0 ≤ i ≤ 25 find fi , the freq vector of the T shifted by i .

3. Compute all fE · fi . The i that has MAX of fE · fi is the i wewant.

Note Didn’t need the parameters 0.065, 0.035 to do this.

Downside Since we knew the parameters 0.065, 0.035 we knewthere was a big gap. We knew there would be no close calls. If wedo not know these kind of parameters then we are not as confident.

But if we have a few candidates for IS-ENGLISH there may beother ways to pick out the real one.

Page 12: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

How we Would Crack Shift If Did Not KnowParameters 0.065, 0.035

Important point is that fE · fE is BIG, fE · fi SMALL. Do not needto know HOW BIG, HOW SMALL.

1. Input(T ). T is a text that has been coded by the shift cipher.

2. For 0 ≤ i ≤ 25 find fi , the freq vector of the T shifted by i .

3. Compute all fE · fi . The i that has MAX of fE · fi is the i wewant.

Note Didn’t need the parameters 0.065, 0.035 to do this.

Downside Since we knew the parameters 0.065, 0.035 we knewthere was a big gap. We knew there would be no close calls. If wedo not know these kind of parameters then we are not as confident.

But if we have a few candidates for IS-ENGLISH there may beother ways to pick out the real one.

Page 13: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

How we Would Crack Shift If Did Not KnowParameters 0.065, 0.035

Important point is that fE · fE is BIG, fE · fi SMALL. Do not needto know HOW BIG, HOW SMALL.

1. Input(T ). T is a text that has been coded by the shift cipher.

2. For 0 ≤ i ≤ 25 find fi , the freq vector of the T shifted by i .

3. Compute all fE · fi . The i that has MAX of fE · fi is the i wewant.

Note Didn’t need the parameters 0.065, 0.035 to do this.

Downside Since we knew the parameters 0.065, 0.035 we knewthere was a big gap. We knew there would be no close calls. If wedo not know these kind of parameters then we are not as confident.

But if we have a few candidates for IS-ENGLISH there may beother ways to pick out the real one.

Page 14: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

How we Would Crack Shift If Did Not KnowParameters 0.065, 0.035

Important point is that fE · fE is BIG, fE · fi SMALL. Do not needto know HOW BIG, HOW SMALL.

1. Input(T ). T is a text that has been coded by the shift cipher.

2. For 0 ≤ i ≤ 25 find fi , the freq vector of the T shifted by i .

3. Compute all fE · fi . The i that has MAX of fE · fi is the i wewant.

Note Didn’t need the parameters 0.065, 0.035 to do this.

Downside Since we knew the parameters 0.065, 0.035 we knewthere was a big gap. We knew there would be no close calls. If wedo not know these kind of parameters then we are not as confident.

But if we have a few candidates for IS-ENGLISH there may beother ways to pick out the real one.

Page 15: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Variants of the ShiftCipher

Page 16: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

What About Texts With Numbers?

We have discussed English texts with Σ = {a, . . . , z}.

What if the text has numbers in it? Examples:

1. Financial Documents. Σ = {a, b, . . . , z , 0, . . . , 9}.2. Math books such as:

https://www.amazon.com/

Mathematical-Muffin-Morsels-Problem-Mathematics/

dp/9811215979/ref=sr_1_2?dchild=1&keywords=

gasarch&qid=1593879329&sr=8-2

Σ = {a, . . . , z , 0, . . . , 9,+,×,−,÷,=,≡, <,>,∩,∪, ∅}

Include other symbols depending on the branch of math. E.g.,∧,∨ for logic.

What to do? Find distribution of alphabet for these types ofdocs. Write code sim to Is-English and try all shifts.

Page 17: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

What About Texts With Numbers?

We have discussed English texts with Σ = {a, . . . , z}.

What if the text has numbers in it? Examples:

1. Financial Documents. Σ = {a, b, . . . , z , 0, . . . , 9}.2. Math books such as:

https://www.amazon.com/

Mathematical-Muffin-Morsels-Problem-Mathematics/

dp/9811215979/ref=sr_1_2?dchild=1&keywords=

gasarch&qid=1593879329&sr=8-2

Σ = {a, . . . , z , 0, . . . , 9,+,×,−,÷,=,≡, <,>,∩,∪, ∅}

Include other symbols depending on the branch of math. E.g.,∧,∨ for logic.

What to do? Find distribution of alphabet for these types ofdocs. Write code sim to Is-English and try all shifts.

Page 18: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

What About Texts With Numbers?

We have discussed English texts with Σ = {a, . . . , z}.

What if the text has numbers in it? Examples:

1. Financial Documents. Σ = {a, b, . . . , z , 0, . . . , 9}.

2. Math books such as:https://www.amazon.com/

Mathematical-Muffin-Morsels-Problem-Mathematics/

dp/9811215979/ref=sr_1_2?dchild=1&keywords=

gasarch&qid=1593879329&sr=8-2

Σ = {a, . . . , z , 0, . . . , 9,+,×,−,÷,=,≡, <,>,∩,∪, ∅}

Include other symbols depending on the branch of math. E.g.,∧,∨ for logic.

What to do? Find distribution of alphabet for these types ofdocs. Write code sim to Is-English and try all shifts.

Page 19: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

What About Texts With Numbers?

We have discussed English texts with Σ = {a, . . . , z}.

What if the text has numbers in it? Examples:

1. Financial Documents. Σ = {a, b, . . . , z , 0, . . . , 9}.2. Math books such as:

https://www.amazon.com/

Mathematical-Muffin-Morsels-Problem-Mathematics/

dp/9811215979/ref=sr_1_2?dchild=1&keywords=

gasarch&qid=1593879329&sr=8-2

Σ = {a, . . . , z , 0, . . . , 9,+,×,−,÷,=,≡, <,>,∩,∪, ∅}

Include other symbols depending on the branch of math. E.g.,∧,∨ for logic.

What to do? Find distribution of alphabet for these types ofdocs. Write code sim to Is-English and try all shifts.

Page 20: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

What About Texts With Numbers?

We have discussed English texts with Σ = {a, . . . , z}.

What if the text has numbers in it? Examples:

1. Financial Documents. Σ = {a, b, . . . , z , 0, . . . , 9}.2. Math books such as:

https://www.amazon.com/

Mathematical-Muffin-Morsels-Problem-Mathematics/

dp/9811215979/ref=sr_1_2?dchild=1&keywords=

gasarch&qid=1593879329&sr=8-2

Σ = {a, . . . , z , 0, . . . , 9,+,×,−,÷,=,≡, <,>,∩,∪, ∅}

Include other symbols depending on the branch of math. E.g.,∧,∨ for logic.

What to do? Find distribution of alphabet for these types ofdocs. Write code sim to Is-English and try all shifts.

Page 21: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Is Shift Cipher Secure if we are Transmitting JustNumbers?

What if Alice sends Bob a credit card number? Discuss

Credit Card Numbers also have patterns:

1. Visa cards always begin with 4.

2. American Express always begins 34 or 37.

3. Mastercard starts with 51 or 52 or 53 or 54.

4. Parity Checks.

Page 22: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Is Shift Cipher Secure if we are Transmitting JustNumbers?

What if Alice sends Bob a credit card number? DiscussCredit Card Numbers also have patterns:

1. Visa cards always begin with 4.

2. American Express always begins 34 or 37.

3. Mastercard starts with 51 or 52 or 53 or 54.

4. Parity Checks.

Page 23: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Is Shift Cipher Secure if we are Transmitting JustNumbers?

What if Alice sends Bob a credit card number? DiscussCredit Card Numbers also have patterns:

1. Visa cards always begin with 4.

2. American Express always begins 34 or 37.

3. Mastercard starts with 51 or 52 or 53 or 54.

4. Parity Checks.

Page 24: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Is Shift Cipher Secure if we are Transmitting JustNumbers?

What if Alice sends Bob a credit card number? DiscussCredit Card Numbers also have patterns:

1. Visa cards always begin with 4.

2. American Express always begins 34 or 37.

3. Mastercard starts with 51 or 52 or 53 or 54.

4. Parity Checks.

Page 25: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Is Shift Cipher Secure if we are Transmitting JustNumbers?

What if Alice sends Bob a credit card number? DiscussCredit Card Numbers also have patterns:

1. Visa cards always begin with 4.

2. American Express always begins 34 or 37.

3. Mastercard starts with 51 or 52 or 53 or 54.

4. Parity Checks.

Page 26: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Is Shift Cipher Secure if we are Transmitting JustNumbers?

What if Alice sends Bob a credit card number? DiscussCredit Card Numbers also have patterns:

1. Visa cards always begin with 4.

2. American Express always begins 34 or 37.

3. Mastercard starts with 51 or 52 or 53 or 54.

4. Parity Checks.

Page 27: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Byte-wise Shift Cipher

I In ASCII all small letters, cap letters, numbers, punctuation,mapped to 8-bit strings.

I Use XOR instead of modular addition. Fast!

I Decode and Encode are both XOR.

I Essential properties still hold.

Page 28: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to
Page 29: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Byte-wise shift cipher

I M = {strings of bytes}

I Gen: choose uniform byte k ∈ K = {0,. . . ,255}

I Enck(m1 . . .mt): output c1 . . . ct , where ci ← mi ⊕ k

I Deck(c1 . . . ct): output m1 . . .mt , where mi ← ci ⊕ k

I Verify that correctness holds.

I Curiosity: Encrypt and Decrypt Key are the same.

Page 30: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Byte-wise shift cipher

I M = {strings of bytes}

I Gen: choose uniform byte k ∈ K = {0,. . . ,255}

I Enck(m1 . . .mt): output c1 . . . ct , where ci ← mi ⊕ k

I Deck(c1 . . . ct): output m1 . . .mt , where mi ← ci ⊕ k

I Verify that correctness holds.

I Curiosity: Encrypt and Decrypt Key are the same.

Page 31: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Byte-wise shift cipher

I M = {strings of bytes}

I Gen: choose uniform byte k ∈ K = {0,. . . ,255}

I Enck(m1 . . .mt): output c1 . . . ct , where ci ← mi ⊕ k

I Deck(c1 . . . ct): output m1 . . .mt , where mi ← ci ⊕ k

I Verify that correctness holds.

I Curiosity: Encrypt and Decrypt Key are the same.

Page 32: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Byte-wise shift cipher

I M = {strings of bytes}

I Gen: choose uniform byte k ∈ K = {0,. . . ,255}

I Enck(m1 . . .mt): output c1 . . . ct , where ci ← mi ⊕ k

I Deck(c1 . . . ct): output m1 . . .mt , where mi ← ci ⊕ k

I Verify that correctness holds.

I Curiosity: Encrypt and Decrypt Key are the same.

Page 33: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Byte-wise shift cipher

I M = {strings of bytes}

I Gen: choose uniform byte k ∈ K = {0,. . . ,255}

I Enck(m1 . . .mt): output c1 . . . ct , where ci ← mi ⊕ k

I Deck(c1 . . . ct): output m1 . . .mt , where mi ← ci ⊕ k

I Verify that correctness holds.

I Curiosity: Encrypt and Decrypt Key are the same.

Page 34: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Byte-wise shift cipher

I M = {strings of bytes}

I Gen: choose uniform byte k ∈ K = {0,. . . ,255}

I Enck(m1 . . .mt): output c1 . . . ct , where ci ← mi ⊕ k

I Deck(c1 . . . ct): output m1 . . .mt , where mi ← ci ⊕ k

I Verify that correctness holds.

I Curiosity: Encrypt and Decrypt Key are the same.

Page 35: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Example

Key is 11001110.Alice wants to send 00011010, 11100011, 00000000.She sends00011010⊕ 1100111011100011⊕ 1100111000000000⊕ 11001110

= 11010100, 00101101, 11001110

Question: Should it worry Alice and Bob that the key itself wastransmitted? DiscussNo. Eve has no way of knowing that.

Page 36: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Example

Key is 11001110.Alice wants to send 00011010, 11100011, 00000000.She sends00011010⊕ 1100111011100011⊕ 1100111000000000⊕ 11001110

= 11010100, 00101101, 11001110

Question: Should it worry Alice and Bob that the key itself wastransmitted? Discuss

No. Eve has no way of knowing that.

Page 37: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Example

Key is 11001110.Alice wants to send 00011010, 11100011, 00000000.She sends00011010⊕ 1100111011100011⊕ 1100111000000000⊕ 11001110

= 11010100, 00101101, 11001110

Question: Should it worry Alice and Bob that the key itself wastransmitted? DiscussNo. Eve has no way of knowing that.

Page 38: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Is this Cipher Secure?

I Today NO—only 256 possible keys!

I 100 years ago might have been secure.

I Given a ciphertext, try decrypting with every possible key.

I If ciphertext is long enough, only one plaintext will look likeEnglish.

What is more secure: 26-letter shift or the 256-keys Byte Shift.

I Byte is more secure- More Keys.

I Byte is less secure- uses punctuation which yields morepatterns.

I I do not know the answer.

Page 39: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Is this Cipher Secure?

I Today NO—only 256 possible keys!

I 100 years ago might have been secure.

I Given a ciphertext, try decrypting with every possible key.

I If ciphertext is long enough, only one plaintext will look likeEnglish.

What is more secure: 26-letter shift or the 256-keys Byte Shift.

I Byte is more secure- More Keys.

I Byte is less secure- uses punctuation which yields morepatterns.

I I do not know the answer.

Page 40: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Is this Cipher Secure?

I Today NO—only 256 possible keys!

I 100 years ago might have been secure.

I Given a ciphertext, try decrypting with every possible key.

I If ciphertext is long enough, only one plaintext will look likeEnglish.

What is more secure: 26-letter shift or the 256-keys Byte Shift.

I Byte is more secure- More Keys.

I Byte is less secure- uses punctuation which yields morepatterns.

I I do not know the answer.

Page 41: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Is this Cipher Secure?

I Today NO—only 256 possible keys!

I 100 years ago might have been secure.

I Given a ciphertext, try decrypting with every possible key.

I If ciphertext is long enough, only one plaintext will look likeEnglish.

What is more secure: 26-letter shift or the 256-keys Byte Shift.

I Byte is more secure- More Keys.

I Byte is less secure- uses punctuation which yields morepatterns.

I I do not know the answer.

Page 42: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Is this Cipher Secure?

I Today NO—only 256 possible keys!

I 100 years ago might have been secure.

I Given a ciphertext, try decrypting with every possible key.

I If ciphertext is long enough, only one plaintext will look likeEnglish.

What is more secure: 26-letter shift or the 256-keys Byte Shift.

I Byte is more secure- More Keys.

I Byte is less secure- uses punctuation which yields morepatterns.

I I do not know the answer.

Page 43: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Is this Cipher Secure?

I Today NO—only 256 possible keys!

I 100 years ago might have been secure.

I Given a ciphertext, try decrypting with every possible key.

I If ciphertext is long enough, only one plaintext will look likeEnglish.

What is more secure: 26-letter shift or the 256-keys Byte Shift.

I Byte is more secure- More Keys.

I Byte is less secure- uses punctuation which yields morepatterns.

I I do not know the answer.

Page 44: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Is this Cipher Secure?

I Today NO—only 256 possible keys!

I 100 years ago might have been secure.

I Given a ciphertext, try decrypting with every possible key.

I If ciphertext is long enough, only one plaintext will look likeEnglish.

What is more secure: 26-letter shift or the 256-keys Byte Shift.

I Byte is more secure- More Keys.

I Byte is less secure- uses punctuation which yields morepatterns.

I I do not know the answer.

Page 45: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Is this Cipher Secure?

I Today NO—only 256 possible keys!

I 100 years ago might have been secure.

I Given a ciphertext, try decrypting with every possible key.

I If ciphertext is long enough, only one plaintext will look likeEnglish.

What is more secure: 26-letter shift or the 256-keys Byte Shift.

I Byte is more secure- More Keys.

I Byte is less secure- uses punctuation which yields morepatterns.

I I do not know the answer.

Page 46: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Sufficient Key Space Principle

I The key space must be large enough to makeexhaustive-search attacks impractical.

I How large this is may be technology-dependent.

I Note: this makes some assumptions. . .I English-language plaintext

I Ciphertext sufficiently long so only one valid plaintext

Page 47: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Sufficient Key Space Principle

I The key space must be large enough to makeexhaustive-search attacks impractical.

I How large this is may be technology-dependent.

I Note: this makes some assumptions. . .I English-language plaintext

I Ciphertext sufficiently long so only one valid plaintext

Page 48: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Kerckhoff’s Principle

Page 49: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Kerckhoff’s principle

We made the comment We KNOW that SHIFT was used.More generally we will always use the following assumption.Kerckhoff’s principle:

I Eve knows The encryption scheme.

I Eve knows the alphabet and the language.

I Eve does not know the key

I The key is chosen at random.

Page 50: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Arguments For And Against Kerckhoff’s Principle

Arguments For:

I Easier to keep key secret than algorithm.

I Easier to change key than to change algorithm.

I Standardization:I Ease of deployment.

I Public validation.

I If prove system secure then very strong proof of security sinceeven if Eve knows scheme she can’t crack.

Arguments Against:

I The first few years (months? days? hours?) of a new type ofcipher, perhaps you can use that Eve does not know it. Butshe will soon!

Page 51: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Arguments For And Against Kerckhoff’s Principle

Arguments For:

I Easier to keep key secret than algorithm.

I Easier to change key than to change algorithm.

I Standardization:I Ease of deployment.

I Public validation.

I If prove system secure then very strong proof of security sinceeven if Eve knows scheme she can’t crack.

Arguments Against:

I The first few years (months? days? hours?) of a new type ofcipher, perhaps you can use that Eve does not know it. Butshe will soon!

Page 52: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Formal Security with ShiftCipher as Example

Page 53: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

1-Letter Shift Cipher

Odd Situation What if message is only one-letter long?Discuss Can Eve crack a one-letter message?

Intuitively No Eve cannot crack it. This is correct.Discuss How to define secure?

Page 54: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

1-Letter Shift Cipher

Odd Situation What if message is only one-letter long?Discuss Can Eve crack a one-letter message?Intuitively No Eve cannot crack it.

This is correct.Discuss How to define secure?

Page 55: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

1-Letter Shift Cipher

Odd Situation What if message is only one-letter long?Discuss Can Eve crack a one-letter message?Intuitively No Eve cannot crack it. This is correct.

Discuss How to define secure?

Page 56: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

1-Letter Shift Cipher

Odd Situation What if message is only one-letter long?Discuss Can Eve crack a one-letter message?Intuitively No Eve cannot crack it. This is correct.Discuss How to define secure?

Page 57: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

TE Means Thought Experiment

We are going to do Thought Experiments.

For reasons of space I call them TE.

Page 58: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

TE Means Thought Experiment

We are going to do Thought Experiments.

For reasons of space I call them TE.

Page 59: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Convention

I m ∈ {x , y} is the message Alice wants to send

I s ∈ {0, 1} is the shift.

I c ∈ {x , y} is what Alice sends.

The statementAlice sends m + s

means that that Alice sends m shifted by s (with wrap around).

m s c

x 0 xx 1 yy 0 yy 1 x

Page 60: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Convention

I m ∈ {x , y} is the message Alice wants to send

I s ∈ {0, 1} is the shift.

I c ∈ {x , y} is what Alice sends.

The statementAlice sends m + s

means that that Alice sends m shifted by s (with wrap around).

m s c

x 0 xx 1 yy 0 yy 1 x

Page 61: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

(TE1) {x, y}, Equally Likely; Shift 0,1 Equally Likely

Pr(m = x) = Pr(m = y) = 12 . Pr(s = 0) = Pr(s = 1) = 1

2 .

m s c Pr

x 0 x 1/4x 1 y 1/4y 0 y 1/4y 1 x 1/4

Before Alice sends c = m + s Eve knows:Pr(m = x) = 1

2 , Pr(m = y) = 12

Eve sees c = x . Now what does she know?

m s c Pr Not Normalized Pr Normalized

x 0 x 1/4 1/2y 1 x 1/4 1/2

Eve learned nothing from seeing c . Intuitively this means secure.

Page 62: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

(TE1) {x, y}, Equally Likely; Shift 0,1 Equally Likely

Pr(m = x) = Pr(m = y) = 12 . Pr(s = 0) = Pr(s = 1) = 1

2 .

m s c Pr

x 0 x 1/4x 1 y 1/4y 0 y 1/4y 1 x 1/4

Before Alice sends c = m + s Eve knows:Pr(m = x) = 1

2 , Pr(m = y) = 12

Eve sees c = x . Now what does she know?

m s c Pr Not Normalized Pr Normalized

x 0 x 1/4 1/2y 1 x 1/4 1/2

Eve learned nothing from seeing c . Intuitively this means secure.

Page 63: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

(TE1) {x, y}, Equally Likely; Shift 0,1 Equally Likely

Pr(m = x) = Pr(m = y) = 12 . Pr(s = 0) = Pr(s = 1) = 1

2 .

m s c Pr

x 0 x 1/4x 1 y 1/4y 0 y 1/4y 1 x 1/4

Before Alice sends c = m + s Eve knows:

Pr(m = x) = 12 , Pr(m = y) = 1

2Eve sees c = x . Now what does she know?

m s c Pr Not Normalized Pr Normalized

x 0 x 1/4 1/2y 1 x 1/4 1/2

Eve learned nothing from seeing c . Intuitively this means secure.

Page 64: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

(TE1) {x, y}, Equally Likely; Shift 0,1 Equally Likely

Pr(m = x) = Pr(m = y) = 12 . Pr(s = 0) = Pr(s = 1) = 1

2 .

m s c Pr

x 0 x 1/4x 1 y 1/4y 0 y 1/4y 1 x 1/4

Before Alice sends c = m + s Eve knows:Pr(m = x) = 1

2 , Pr(m = y) = 12

Eve sees c = x . Now what does she know?

m s c Pr Not Normalized Pr Normalized

x 0 x 1/4 1/2y 1 x 1/4 1/2

Eve learned nothing from seeing c . Intuitively this means secure.

Page 65: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

(TE1) {x, y}, Equally Likely; Shift 0,1 Equally Likely

Pr(m = x) = Pr(m = y) = 12 . Pr(s = 0) = Pr(s = 1) = 1

2 .

m s c Pr

x 0 x 1/4x 1 y 1/4y 0 y 1/4y 1 x 1/4

Before Alice sends c = m + s Eve knows:Pr(m = x) = 1

2 , Pr(m = y) = 12

Eve sees c = x . Now what does she know?

m s c Pr Not Normalized Pr Normalized

x 0 x 1/4 1/2y 1 x 1/4 1/2

Eve learned nothing from seeing c . Intuitively this means secure.

Page 66: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

(TE1) {x, y}, Equally Likely; Shift 0,1 Equally Likely

Pr(m = x) = Pr(m = y) = 12 . Pr(s = 0) = Pr(s = 1) = 1

2 .

m s c Pr

x 0 x 1/4x 1 y 1/4y 0 y 1/4y 1 x 1/4

Before Alice sends c = m + s Eve knows:Pr(m = x) = 1

2 , Pr(m = y) = 12

Eve sees c = x . Now what does she know?

m s c Pr Not Normalized Pr Normalized

x 0 x 1/4 1/2y 1 x 1/4 1/2

Eve learned nothing from seeing c . Intuitively this means secure.

Page 67: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

(TE2) Alphabet {x, y}, Unequal Prob

Pr(m = x) = 14 ; Pr(m = y) = 3

4 . Pr(s = 0) = 12 ; Pr(s = 1) = 1

2 .

m s c Pr

x 0 x 1/8x 1 y 1/8y 0 y 3/8y 1 x 3/8

Before Alice sees c = m + s Eve knows:Pr(m = x) = 1

4 , Pr(m = y) = 34

Eve sees c = x . Now what does she know?

m s c Pr Not Normalized Pr Normalized

x 0 x 1/8 1/4y 1 x 3/8 3/4

Eve learned nothing from seeing m. Intuitively this means secure.

Page 68: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

(TE2) Alphabet {x, y}, Unequal Prob

Pr(m = x) = 14 ; Pr(m = y) = 3

4 . Pr(s = 0) = 12 ; Pr(s = 1) = 1

2 .

m s c Pr

x 0 x 1/8x 1 y 1/8y 0 y 3/8y 1 x 3/8

Before Alice sees c = m + s Eve knows:Pr(m = x) = 1

4 , Pr(m = y) = 34

Eve sees c = x . Now what does she know?

m s c Pr Not Normalized Pr Normalized

x 0 x 1/8 1/4y 1 x 3/8 3/4

Eve learned nothing from seeing m. Intuitively this means secure.

Page 69: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

(TE2) Alphabet {x, y}, Unequal Prob

Pr(m = x) = 14 ; Pr(m = y) = 3

4 . Pr(s = 0) = 12 ; Pr(s = 1) = 1

2 .

m s c Pr

x 0 x 1/8x 1 y 1/8y 0 y 3/8y 1 x 3/8

Before Alice sees c = m + s Eve knows:Pr(m = x) = 1

4 , Pr(m = y) = 34

Eve sees c = x . Now what does she know?

m s c Pr Not Normalized Pr Normalized

x 0 x 1/8 1/4y 1 x 3/8 3/4

Eve learned nothing from seeing m. Intuitively this means secure.

Page 70: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

(TE2) Alphabet {x, y}, Unequal Prob

Pr(m = x) = 14 ; Pr(m = y) = 3

4 . Pr(s = 0) = 12 ; Pr(s = 1) = 1

2 .

m s c Pr

x 0 x 1/8x 1 y 1/8y 0 y 3/8y 1 x 3/8

Before Alice sees c = m + s Eve knows:Pr(m = x) = 1

4 , Pr(m = y) = 34

Eve sees c = x . Now what does she know?

m s c Pr Not Normalized Pr Normalized

x 0 x 1/8 1/4y 1 x 3/8 3/4

Eve learned nothing from seeing m. Intuitively this means secure.

Page 71: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

(TE3) Alphabet {x, y}, Equal Prob, Shift BiasedPr(m = x) = 1

2 ; Pr(m = y) = 12 . Pr(s = 0) = 1

4 , Pr(s = 1) = 34 .

m s c Pr

x 0 x 1/8x 1 y 3/8y 0 y 1/8y 1 x 3/8

Before Alice sends c = m + s Eve knows:Eve sees c = x . Now what does she know?

Pr(m = x) = 12 ; Pr(m = y) = 1

2Eve sees c = x . Now what does she know?

m s c Pr Not Normalized Pr Normalized

x 0 x 1/8 1/4y 1 x 3/8 3/4

Before: Eve-Pr(m = x) = 12 . After: Eve Pr(m = x) = 1

4 .Eve has learned something !

Page 72: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

(TE3) Alphabet {x, y}, Equal Prob, Shift BiasedPr(m = x) = 1

2 ; Pr(m = y) = 12 . Pr(s = 0) = 1

4 , Pr(s = 1) = 34 .

m s c Pr

x 0 x 1/8x 1 y 3/8y 0 y 1/8y 1 x 3/8

Before Alice sends c = m + s Eve knows:

Eve sees c = x . Now what does she know?Pr(m = x) = 1

2 ; Pr(m = y) = 12

Eve sees c = x . Now what does she know?

m s c Pr Not Normalized Pr Normalized

x 0 x 1/8 1/4y 1 x 3/8 3/4

Before: Eve-Pr(m = x) = 12 . After: Eve Pr(m = x) = 1

4 .Eve has learned something !

Page 73: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

(TE3) Alphabet {x, y}, Equal Prob, Shift BiasedPr(m = x) = 1

2 ; Pr(m = y) = 12 . Pr(s = 0) = 1

4 , Pr(s = 1) = 34 .

m s c Pr

x 0 x 1/8x 1 y 3/8y 0 y 1/8y 1 x 3/8

Before Alice sends c = m + s Eve knows:Eve sees c = x . Now what does she know?

Pr(m = x) = 12 ; Pr(m = y) = 1

2

Eve sees c = x . Now what does she know?

m s c Pr Not Normalized Pr Normalized

x 0 x 1/8 1/4y 1 x 3/8 3/4

Before: Eve-Pr(m = x) = 12 . After: Eve Pr(m = x) = 1

4 .Eve has learned something !

Page 74: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

(TE3) Alphabet {x, y}, Equal Prob, Shift BiasedPr(m = x) = 1

2 ; Pr(m = y) = 12 . Pr(s = 0) = 1

4 , Pr(s = 1) = 34 .

m s c Pr

x 0 x 1/8x 1 y 3/8y 0 y 1/8y 1 x 3/8

Before Alice sends c = m + s Eve knows:Eve sees c = x . Now what does she know?

Pr(m = x) = 12 ; Pr(m = y) = 1

2Eve sees c = x . Now what does she know?

m s c Pr Not Normalized Pr Normalized

x 0 x 1/8 1/4y 1 x 3/8 3/4

Before: Eve-Pr(m = x) = 12 . After: Eve Pr(m = x) = 1

4 .Eve has learned something !

Page 75: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

(TE3) Alphabet {x, y}, Equal Prob, Shift BiasedPr(m = x) = 1

2 ; Pr(m = y) = 12 . Pr(s = 0) = 1

4 , Pr(s = 1) = 34 .

m s c Pr

x 0 x 1/8x 1 y 3/8y 0 y 1/8y 1 x 3/8

Before Alice sends c = m + s Eve knows:Eve sees c = x . Now what does she know?

Pr(m = x) = 12 ; Pr(m = y) = 1

2Eve sees c = x . Now what does she know?

m s c Pr Not Normalized Pr Normalized

x 0 x 1/8 1/4y 1 x 3/8 3/4

Before: Eve-Pr(m = x) = 12 . After: Eve Pr(m = x) = 1

4 .Eve has learned something !

Page 76: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

BILL, RECORD LECTURE!!!!

BILL RECORD LECTURE!!!

Page 77: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Upshot

I Insecure does not mean Eve can find the message.

I Insecure means that Eve knows more after seeing c than shedid before seeing c .

I What she knows might involve probability.

I We need to make this all more rigorous!

Page 78: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Upshot

I Insecure does not mean Eve can find the message.

I Insecure means that Eve knows more after seeing c than shedid before seeing c .

I What she knows might involve probability.

I We need to make this all more rigorous!

Page 79: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Upshot

I Insecure does not mean Eve can find the message.

I Insecure means that Eve knows more after seeing c than shedid before seeing c .

I What she knows might involve probability.

I We need to make this all more rigorous!

Page 80: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Upshot

I Insecure does not mean Eve can find the message.

I Insecure means that Eve knows more after seeing c than shedid before seeing c .

I What she knows might involve probability.

I We need to make this all more rigorous!

Page 81: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Upshot

I Insecure does not mean Eve can find the message.

I Insecure means that Eve knows more after seeing c than shedid before seeing c .

I What she knows might involve probability.

I We need to make this all more rigorous!

Page 82: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

We Need Conditional Probability

Conditional probability Probability that one event occurs, giventhat some other event occurred.

Notation Pr(A|B).

Formal Definition Notation Pr(A|B) = Pr(A∩B)Pr(B) .

Intuition Pr(A|B) = Pr(A∩B)Pr(B) is saying that the entire space is now

Pr(B). Within that space what is the prob of A happening? ItsPr(A ∩ B).

Page 83: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

We Need Conditional Probability

Conditional probability Probability that one event occurs, giventhat some other event occurred.

Notation Pr(A|B).

Formal Definition Notation Pr(A|B) = Pr(A∩B)Pr(B) .

Intuition Pr(A|B) = Pr(A∩B)Pr(B) is saying that the entire space is now

Pr(B). Within that space what is the prob of A happening? ItsPr(A ∩ B).

Page 84: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

We Need Conditional Probability

Conditional probability Probability that one event occurs, giventhat some other event occurred.

Notation Pr(A|B).

Formal Definition Notation Pr(A|B) = Pr(A∩B)Pr(B) .

Intuition Pr(A|B) = Pr(A∩B)Pr(B) is saying that the entire space is now

Pr(B). Within that space what is the prob of A happening? ItsPr(A ∩ B).

Page 85: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

We Need Conditional Probability

Conditional probability Probability that one event occurs, giventhat some other event occurred.

Notation Pr(A|B).

Formal Definition Notation Pr(A|B) = Pr(A∩B)Pr(B) .

Intuition Pr(A|B) = Pr(A∩B)Pr(B) is saying that the entire space is now

Pr(B). Within that space what is the prob of A happening? ItsPr(A ∩ B).

Page 86: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Examples of Conditional Probability

Josh rolls dice d1, d2 and finds s = d1 + d2. What is Pr(s = 5)?

19 .

What if you know d1?

Pr(s = 5|d1 = 1) = Pr(s=5∧d1=1)Pr(d1=1) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 2) = Pr(s=5∧d1=2)Pr(d1=2) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 3) = Pr(s=5∧d1=3)Pr(d1=3) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 4) = Pr(s=5∧d1=4)Pr(d1=4) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 5) = Pr(s=5∧d1=5)Pr(d1=5) = 0

1/6 = 0.

Pr(s = 5|d1 = 6) = Pr(s=5∧d1=6)Pr(d1=6) = 0

1/6 = 0.This example is bad since, for examplePr(s = 5|d1 = 2) = Pr(d2 = 3) = 1

6 .Pr(s = 5|d1 = 5) = Pr(d2 = 0) = 0.

Page 87: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Examples of Conditional Probability

Josh rolls dice d1, d2 and finds s = d1 + d2. What is Pr(s = 5)? 19 .

What if you know d1?

Pr(s = 5|d1 = 1) = Pr(s=5∧d1=1)Pr(d1=1) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 2) = Pr(s=5∧d1=2)Pr(d1=2) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 3) = Pr(s=5∧d1=3)Pr(d1=3) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 4) = Pr(s=5∧d1=4)Pr(d1=4) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 5) = Pr(s=5∧d1=5)Pr(d1=5) = 0

1/6 = 0.

Pr(s = 5|d1 = 6) = Pr(s=5∧d1=6)Pr(d1=6) = 0

1/6 = 0.This example is bad since, for examplePr(s = 5|d1 = 2) = Pr(d2 = 3) = 1

6 .Pr(s = 5|d1 = 5) = Pr(d2 = 0) = 0.

Page 88: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Examples of Conditional Probability

Josh rolls dice d1, d2 and finds s = d1 + d2. What is Pr(s = 5)? 19 .

What if you know d1?

Pr(s = 5|d1 = 1) = Pr(s=5∧d1=1)Pr(d1=1) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 2) = Pr(s=5∧d1=2)Pr(d1=2) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 3) = Pr(s=5∧d1=3)Pr(d1=3) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 4) = Pr(s=5∧d1=4)Pr(d1=4) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 5) = Pr(s=5∧d1=5)Pr(d1=5) = 0

1/6 = 0.

Pr(s = 5|d1 = 6) = Pr(s=5∧d1=6)Pr(d1=6) = 0

1/6 = 0.This example is bad since, for examplePr(s = 5|d1 = 2) = Pr(d2 = 3) = 1

6 .Pr(s = 5|d1 = 5) = Pr(d2 = 0) = 0.

Page 89: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Examples of Conditional Probability

Josh rolls dice d1, d2 and finds s = d1 + d2. What is Pr(s = 5)? 19 .

What if you know d1?

Pr(s = 5|d1 = 1) = Pr(s=5∧d1=1)Pr(d1=1) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 2) = Pr(s=5∧d1=2)Pr(d1=2) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 3) = Pr(s=5∧d1=3)Pr(d1=3) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 4) = Pr(s=5∧d1=4)Pr(d1=4) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 5) = Pr(s=5∧d1=5)Pr(d1=5) = 0

1/6 = 0.

Pr(s = 5|d1 = 6) = Pr(s=5∧d1=6)Pr(d1=6) = 0

1/6 = 0.This example is bad since, for examplePr(s = 5|d1 = 2) = Pr(d2 = 3) = 1

6 .Pr(s = 5|d1 = 5) = Pr(d2 = 0) = 0.

Page 90: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Examples of Conditional Probability

Josh rolls dice d1, d2 and finds s = d1 + d2. What is Pr(s = 5)? 19 .

What if you know d1?

Pr(s = 5|d1 = 1) = Pr(s=5∧d1=1)Pr(d1=1) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 2) = Pr(s=5∧d1=2)Pr(d1=2) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 3) = Pr(s=5∧d1=3)Pr(d1=3) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 4) = Pr(s=5∧d1=4)Pr(d1=4) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 5) = Pr(s=5∧d1=5)Pr(d1=5) = 0

1/6 = 0.

Pr(s = 5|d1 = 6) = Pr(s=5∧d1=6)Pr(d1=6) = 0

1/6 = 0.This example is bad since, for examplePr(s = 5|d1 = 2) = Pr(d2 = 3) = 1

6 .Pr(s = 5|d1 = 5) = Pr(d2 = 0) = 0.

Page 91: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Examples of Conditional Probability

Josh rolls dice d1, d2 and finds s = d1 + d2. What is Pr(s = 5)? 19 .

What if you know d1?

Pr(s = 5|d1 = 1) = Pr(s=5∧d1=1)Pr(d1=1) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 2) = Pr(s=5∧d1=2)Pr(d1=2) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 3) = Pr(s=5∧d1=3)Pr(d1=3) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 4) = Pr(s=5∧d1=4)Pr(d1=4) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 5) = Pr(s=5∧d1=5)Pr(d1=5) = 0

1/6 = 0.

Pr(s = 5|d1 = 6) = Pr(s=5∧d1=6)Pr(d1=6) = 0

1/6 = 0.This example is bad since, for examplePr(s = 5|d1 = 2) = Pr(d2 = 3) = 1

6 .Pr(s = 5|d1 = 5) = Pr(d2 = 0) = 0.

Page 92: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Examples of Conditional Probability

Josh rolls dice d1, d2 and finds s = d1 + d2. What is Pr(s = 5)? 19 .

What if you know d1?

Pr(s = 5|d1 = 1) = Pr(s=5∧d1=1)Pr(d1=1) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 2) = Pr(s=5∧d1=2)Pr(d1=2) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 3) = Pr(s=5∧d1=3)Pr(d1=3) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 4) = Pr(s=5∧d1=4)Pr(d1=4) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 5) = Pr(s=5∧d1=5)Pr(d1=5) = 0

1/6 = 0.

Pr(s = 5|d1 = 6) = Pr(s=5∧d1=6)Pr(d1=6) = 0

1/6 = 0.This example is bad since, for examplePr(s = 5|d1 = 2) = Pr(d2 = 3) = 1

6 .Pr(s = 5|d1 = 5) = Pr(d2 = 0) = 0.

Page 93: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Examples of Conditional Probability

Josh rolls dice d1, d2 and finds s = d1 + d2. What is Pr(s = 5)? 19 .

What if you know d1?

Pr(s = 5|d1 = 1) = Pr(s=5∧d1=1)Pr(d1=1) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 2) = Pr(s=5∧d1=2)Pr(d1=2) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 3) = Pr(s=5∧d1=3)Pr(d1=3) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 4) = Pr(s=5∧d1=4)Pr(d1=4) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 5) = Pr(s=5∧d1=5)Pr(d1=5) = 0

1/6 = 0.

Pr(s = 5|d1 = 6) = Pr(s=5∧d1=6)Pr(d1=6) = 0

1/6 = 0.

This example is bad since, for examplePr(s = 5|d1 = 2) = Pr(d2 = 3) = 1

6 .Pr(s = 5|d1 = 5) = Pr(d2 = 0) = 0.

Page 94: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Examples of Conditional Probability

Josh rolls dice d1, d2 and finds s = d1 + d2. What is Pr(s = 5)? 19 .

What if you know d1?

Pr(s = 5|d1 = 1) = Pr(s=5∧d1=1)Pr(d1=1) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 2) = Pr(s=5∧d1=2)Pr(d1=2) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 3) = Pr(s=5∧d1=3)Pr(d1=3) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 4) = Pr(s=5∧d1=4)Pr(d1=4) = 1/36

1/6 = 16 .

Pr(s = 5|d1 = 5) = Pr(s=5∧d1=5)Pr(d1=5) = 0

1/6 = 0.

Pr(s = 5|d1 = 6) = Pr(s=5∧d1=6)Pr(d1=6) = 0

1/6 = 0.This example is bad since, for examplePr(s = 5|d1 = 2) = Pr(d2 = 3) = 1

6 .Pr(s = 5|d1 = 5) = Pr(d2 = 0) = 0.

Page 95: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Conditional Probability Example with Mods and Dice

Josh rolls die d and announces the parity.

Pr(d = 1|d even) = Pr(d=1∧d≡0)Pr(d≡1) = 0

Pr(d = 1|d odd) = Pr(d=1∧d≡1)Pr(d≡1) = 1/6

1/2 = 13

The rest are similar and are always either 0 or 13 .

Page 96: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Conditional Probability Example with Mods and Dice

Josh rolls die d and announces the parity.

Pr(d = 1|d even) = Pr(d=1∧d≡0)Pr(d≡1) = 0

Pr(d = 1|d odd) = Pr(d=1∧d≡1)Pr(d≡1) = 1/6

1/2 = 13

The rest are similar and are always either 0 or 13 .

Page 97: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Conditional Probability Example with Mods and Dice

Josh rolls die d and announces the parity.

Pr(d = 1|d even) = Pr(d=1∧d≡0)Pr(d≡1) = 0

Pr(d = 1|d odd) = Pr(d=1∧d≡1)Pr(d≡1) = 1/6

1/2 = 13

The rest are similar and are always either 0 or 13 .

Page 98: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Conditional Probability Example with Mods and Dice

Josh rolls die d and announces the parity.

Pr(d = 1|d even) = Pr(d=1∧d≡0)Pr(d≡1) = 0

Pr(d = 1|d odd) = Pr(d=1∧d≡1)Pr(d≡1) = 1/6

1/2 = 13

The rest are similar and are always either 0 or 13 .

Page 99: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Conditional Probability Example with Funky Dice

Josh rolls two dice d1, d2 and finds s = d1 + d2.The dice are not independent.d1 is fair.If d1 is i , then d2 ≤ i , but within that equal prob.If d1 = 3 then d2 is 1,2,3 each with prob 1

3 .

Shortcut Pr(d1 = i ∧ s = 5) = Pr(d1 = i ∧ d2 = 5− i).

Pr(s = 5|d1 = 1) = Pr(d1=1∧d2=4)Pr(d1=1) = 0

Pr(s = 5|d1 = 2) = Pr(d1=2∧d2=3)Pr(d1=2) = 0

Pr(s = 5|d1 = 3) = Pr(d1=3∧d2=2)Pr(d1=3) = 1/6×1/3

1/6 = 13 .

Pr(s = 5|d1 = 4) = Pr(d1=4∧d2=1)Pr(d1=4) = 1/6×1/4

1/6 = 14 .

Pr(s = 5|d1 = 5) = Pr(d1=5∧d2=0)Pr(d1=5) = 0.

Pr(s = 5|d1 = 6) = Pr(d1=5∧d2=−1)Pr(d1=6) = 0.

The rest are similar. Many are 0.

Page 100: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Conditional Probability Example with Funky Dice

Josh rolls two dice d1, d2 and finds s = d1 + d2.The dice are not independent.d1 is fair.If d1 is i , then d2 ≤ i , but within that equal prob.If d1 = 3 then d2 is 1,2,3 each with prob 1

3 .

Shortcut Pr(d1 = i ∧ s = 5) = Pr(d1 = i ∧ d2 = 5− i).

Pr(s = 5|d1 = 1) = Pr(d1=1∧d2=4)Pr(d1=1) = 0

Pr(s = 5|d1 = 2) = Pr(d1=2∧d2=3)Pr(d1=2) = 0

Pr(s = 5|d1 = 3) = Pr(d1=3∧d2=2)Pr(d1=3) = 1/6×1/3

1/6 = 13 .

Pr(s = 5|d1 = 4) = Pr(d1=4∧d2=1)Pr(d1=4) = 1/6×1/4

1/6 = 14 .

Pr(s = 5|d1 = 5) = Pr(d1=5∧d2=0)Pr(d1=5) = 0.

Pr(s = 5|d1 = 6) = Pr(d1=5∧d2=−1)Pr(d1=6) = 0.

The rest are similar. Many are 0.

Page 101: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Conditional Probability Example with Funky Dice

Josh rolls two dice d1, d2 and finds s = d1 + d2.The dice are not independent.d1 is fair.If d1 is i , then d2 ≤ i , but within that equal prob.If d1 = 3 then d2 is 1,2,3 each with prob 1

3 .

Shortcut Pr(d1 = i ∧ s = 5) = Pr(d1 = i ∧ d2 = 5− i).

Pr(s = 5|d1 = 1) = Pr(d1=1∧d2=4)Pr(d1=1) = 0

Pr(s = 5|d1 = 2) = Pr(d1=2∧d2=3)Pr(d1=2) = 0

Pr(s = 5|d1 = 3) = Pr(d1=3∧d2=2)Pr(d1=3) = 1/6×1/3

1/6 = 13 .

Pr(s = 5|d1 = 4) = Pr(d1=4∧d2=1)Pr(d1=4) = 1/6×1/4

1/6 = 14 .

Pr(s = 5|d1 = 5) = Pr(d1=5∧d2=0)Pr(d1=5) = 0.

Pr(s = 5|d1 = 6) = Pr(d1=5∧d2=−1)Pr(d1=6) = 0.

The rest are similar. Many are 0.

Page 102: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Conditional Probability Example with Funky Dice

Josh rolls two dice d1, d2 and finds s = d1 + d2.The dice are not independent.d1 is fair.If d1 is i , then d2 ≤ i , but within that equal prob.If d1 = 3 then d2 is 1,2,3 each with prob 1

3 .

Shortcut Pr(d1 = i ∧ s = 5) = Pr(d1 = i ∧ d2 = 5− i).

Pr(s = 5|d1 = 1) = Pr(d1=1∧d2=4)Pr(d1=1) = 0

Pr(s = 5|d1 = 2) = Pr(d1=2∧d2=3)Pr(d1=2) = 0

Pr(s = 5|d1 = 3) = Pr(d1=3∧d2=2)Pr(d1=3) = 1/6×1/3

1/6 = 13 .

Pr(s = 5|d1 = 4) = Pr(d1=4∧d2=1)Pr(d1=4) = 1/6×1/4

1/6 = 14 .

Pr(s = 5|d1 = 5) = Pr(d1=5∧d2=0)Pr(d1=5) = 0.

Pr(s = 5|d1 = 6) = Pr(d1=5∧d2=−1)Pr(d1=6) = 0.

The rest are similar. Many are 0.

Page 103: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Conditional Probability Example with a Biased Coin

Bill has two coins F (for Fair) and B (for Biased) Pr(H) = 34).

He picks one at random (using a sep fair coin).He flips the coin.

Pr(H|B) = 34 by definition of Bias.

Pr(H|F ) = 12 by definition of Fair.

Pr(B|H) = Pr(B∩H)Pr(H) .

Pr(B ∩ H) = Pr(B)× Pr(H|B) = 12 ×

34 = 3

8 .Pr(H) = Pr(B)×Pr(H|B)+Pr(F )×Pr(H|F ) = 1

2×12 + 1

2×34 = 5

8

Pr(B|H) = Pr(B∩H)Pr(H) = 3/8

5/8 = 35 .

Page 104: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Conditional Probability Example with a Biased Coin

Bill has two coins F (for Fair) and B (for Biased) Pr(H) = 34).

He picks one at random (using a sep fair coin).He flips the coin.Pr(H|B) = 3

4 by definition of Bias.Pr(H|F ) = 1

2 by definition of Fair.

Pr(B|H) = Pr(B∩H)Pr(H) .

Pr(B ∩ H) = Pr(B)× Pr(H|B) = 12 ×

34 = 3

8 .Pr(H) = Pr(B)×Pr(H|B)+Pr(F )×Pr(H|F ) = 1

2×12 + 1

2×34 = 5

8

Pr(B|H) = Pr(B∩H)Pr(H) = 3/8

5/8 = 35 .

Page 105: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Conditional Probability Example with a Biased Coin

Bill has two coins F (for Fair) and B (for Biased) Pr(H) = 34).

He picks one at random (using a sep fair coin).He flips the coin.Pr(H|B) = 3

4 by definition of Bias.Pr(H|F ) = 1

2 by definition of Fair.

Pr(B|H) = Pr(B∩H)Pr(H) .

Pr(B ∩ H) = Pr(B)× Pr(H|B) = 12 ×

34 = 3

8 .Pr(H) = Pr(B)×Pr(H|B)+Pr(F )×Pr(H|F ) = 1

2×12 + 1

2×34 = 5

8

Pr(B|H) = Pr(B∩H)Pr(H) = 3/8

5/8 = 35 .

Page 106: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Conditional Probability Example with a Biased Coin

Bill has two coins F (for Fair) and B (for Biased) Pr(H) = 34).

He picks one at random (using a sep fair coin).He flips the coin.Pr(H|B) = 3

4 by definition of Bias.Pr(H|F ) = 1

2 by definition of Fair.

Pr(B|H) = Pr(B∩H)Pr(H) .

Pr(B ∩ H) = Pr(B)× Pr(H|B) = 12 ×

34 = 3

8 .Pr(H) = Pr(B)×Pr(H|B)+Pr(F )×Pr(H|F ) = 1

2×12 + 1

2×34 = 5

8

Pr(B|H) = Pr(B∩H)Pr(H) = 3/8

5/8 = 35 .

Page 107: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Conditional Probability Example with a Biased Coin

Bill has two coins F (for Fair) and B (for Biased) Pr(H) = 34).

He picks one at random (using a sep fair coin).He flips the coin.Pr(H|B) = 3

4 by definition of Bias.Pr(H|F ) = 1

2 by definition of Fair.

Pr(B|H) = Pr(B∩H)Pr(H) .

Pr(B ∩ H) = Pr(B)× Pr(H|B) = 12 ×

34 = 3

8 .Pr(H) = Pr(B)×Pr(H|B)+Pr(F )×Pr(H|F ) = 1

2×12 + 1

2×34 = 5

8

Pr(B|H) = Pr(B∩H)Pr(H) = 3/8

5/8 = 35 .

Page 108: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Definition of a Secure Crypto System

m will be a message.

c is what is sent.If the following holds then the system is secure.

(∀m, x , y , c)[Pr(m = x |c = y) = Pr(m = x)].

So seeing the y does not help Eve at all.Is this info-theoretic security or comp-security? DiscussInfo-Theoretic If Eve has unlimited computing power she stilllearns nothing.

Page 109: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Definition of a Secure Crypto System

m will be a message. c is what is sent.If the following holds then the system is secure.

(∀m, x , y , c)[Pr(m = x |c = y) = Pr(m = x)].

So seeing the y does not help Eve at all.

Is this info-theoretic security or comp-security? DiscussInfo-Theoretic If Eve has unlimited computing power she stilllearns nothing.

Page 110: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Definition of a Secure Crypto System

m will be a message. c is what is sent.If the following holds then the system is secure.

(∀m, x , y , c)[Pr(m = x |c = y) = Pr(m = x)].

So seeing the y does not help Eve at all.Is this info-theoretic security or comp-security? Discuss

Info-Theoretic If Eve has unlimited computing power she stilllearns nothing.

Page 111: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Definition of a Secure Crypto System

m will be a message. c is what is sent.If the following holds then the system is secure.

(∀m, x , y , c)[Pr(m = x |c = y) = Pr(m = x)].

So seeing the y does not help Eve at all.Is this info-theoretic security or comp-security? DiscussInfo-Theoretic If Eve has unlimited computing power she stilllearns nothing.

Page 112: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

One-Letter Shift is Secure!

Alphabet is {x , y}. s ∈ {0, 1} randomly.Pr(m = x) = px . Pr(m = y) = py .

Eve knows this.Note that px + py = 1.

Pr(m = x |c = x) =Pr(m = x ∧ c = x)

Pr(c = x)

Pr(m = x ∧ c = x) = Pr(m = x ∧ s = 0) = px × 12 = 0.5px

Pr(c = x) = Pr(m = x)Pr(s = 0) + Pr(m = y)Pr(s = 1) =0.5px + 0.5py = 0.5(px + py )

Pr(m = x |c = x) =0.5px

0.5(px + py )= px

Page 113: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

One-Letter Shift is Secure!

Alphabet is {x , y}. s ∈ {0, 1} randomly.Pr(m = x) = px . Pr(m = y) = py . Eve knows this.

Note that px + py = 1.

Pr(m = x |c = x) =Pr(m = x ∧ c = x)

Pr(c = x)

Pr(m = x ∧ c = x) = Pr(m = x ∧ s = 0) = px × 12 = 0.5px

Pr(c = x) = Pr(m = x)Pr(s = 0) + Pr(m = y)Pr(s = 1) =0.5px + 0.5py = 0.5(px + py )

Pr(m = x |c = x) =0.5px

0.5(px + py )= px

Page 114: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

One-Letter Shift is Secure!

Alphabet is {x , y}. s ∈ {0, 1} randomly.Pr(m = x) = px . Pr(m = y) = py . Eve knows this.Note that px + py = 1.

Pr(m = x |c = x) =Pr(m = x ∧ c = x)

Pr(c = x)

Pr(m = x ∧ c = x) = Pr(m = x ∧ s = 0) = px × 12 = 0.5px

Pr(c = x) = Pr(m = x)Pr(s = 0) + Pr(m = y)Pr(s = 1) =0.5px + 0.5py = 0.5(px + py )

Pr(m = x |c = x) =0.5px

0.5(px + py )= px

Page 115: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

One-Letter Shift is Secure!

Alphabet is {x , y}. s ∈ {0, 1} randomly.Pr(m = x) = px . Pr(m = y) = py . Eve knows this.Note that px + py = 1.

Pr(m = x |c = x) =Pr(m = x ∧ c = x)

Pr(c = x)

Pr(m = x ∧ c = x) = Pr(m = x ∧ s = 0) = px × 12 = 0.5px

Pr(c = x) = Pr(m = x)Pr(s = 0) + Pr(m = y)Pr(s = 1) =0.5px + 0.5py = 0.5(px + py )

Pr(m = x |c = x) =0.5px

0.5(px + py )= px

Page 116: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

One-Letter Shift is Secure!

Alphabet is {x , y}. s ∈ {0, 1} randomly.Pr(m = x) = px . Pr(m = y) = py . Eve knows this.Note that px + py = 1.

Pr(m = x |c = x) =Pr(m = x ∧ c = x)

Pr(c = x)

Pr(m = x ∧ c = x) = Pr(m = x ∧ s = 0) = px × 12 = 0.5px

Pr(c = x) = Pr(m = x)Pr(s = 0) + Pr(m = y)Pr(s = 1) =0.5px + 0.5py = 0.5(px + py )

Pr(m = x |c = x) =0.5px

0.5(px + py )= px

Page 117: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

One-Letter Shift is Secure!

Alphabet is {x , y}. s ∈ {0, 1} randomly.Pr(m = x) = px . Pr(m = y) = py . Eve knows this.Note that px + py = 1.

Pr(m = x |c = x) =Pr(m = x ∧ c = x)

Pr(c = x)

Pr(m = x ∧ c = x) = Pr(m = x ∧ s = 0) = px × 12 = 0.5px

Pr(c = x) = Pr(m = x)Pr(s = 0) + Pr(m = y)Pr(s = 1) =0.5px + 0.5py = 0.5(px + py )

Pr(m = x |c = x) =0.5px

0.5(px + py )= px

Page 118: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

One-Letter Shift is Secure!

Alphabet is {x , y}. s ∈ {0, 1} randomly.Pr(m = x) = px . Pr(m = y) = py . Eve knows this.Note that px + py = 1.

Pr(m = x |c = x) =Pr(m = x ∧ c = x)

Pr(c = x)

Pr(m = x ∧ c = x) = Pr(m = x ∧ s = 0) = px × 12 = 0.5px

Pr(c = x) = Pr(m = x)Pr(s = 0) + Pr(m = y)Pr(s = 1) =0.5px + 0.5py = 0.5(px + py )

Pr(m = x |c = x) =0.5px

0.5(px + py )= px

Page 119: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

One-Letter Shift is Secure! (cont)

Alphabet is {x , y}. s ∈ {0, 1} randomly.Pr(m = x) = px . Pr(m = y) = py .

Eve knows this.Note that px + py = 1.We showed

Pr(m = x |c = x) = px

One can show:

Pr(m = x |c = y) = px .

Pr(m = y |c = x) = py .

Pr(m = y |c = y) = py .

So seeing the ciphertext gives Eve NO INFORMATION.Upshot The 1-letter shift Information-Theoretic Secure.

Page 120: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

One-Letter Shift is Secure! (cont)

Alphabet is {x , y}. s ∈ {0, 1} randomly.Pr(m = x) = px . Pr(m = y) = py . Eve knows this.

Note that px + py = 1.We showed

Pr(m = x |c = x) = px

One can show:

Pr(m = x |c = y) = px .

Pr(m = y |c = x) = py .

Pr(m = y |c = y) = py .

So seeing the ciphertext gives Eve NO INFORMATION.Upshot The 1-letter shift Information-Theoretic Secure.

Page 121: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

One-Letter Shift is Secure! (cont)

Alphabet is {x , y}. s ∈ {0, 1} randomly.Pr(m = x) = px . Pr(m = y) = py . Eve knows this.Note that px + py = 1.We showed

Pr(m = x |c = x) = px

One can show:

Pr(m = x |c = y) = px .

Pr(m = y |c = x) = py .

Pr(m = y |c = y) = py .

So seeing the ciphertext gives Eve NO INFORMATION.Upshot The 1-letter shift Information-Theoretic Secure.

Page 122: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

One-Letter Shift is Secure! (cont)

Alphabet is {x , y}. s ∈ {0, 1} randomly.Pr(m = x) = px . Pr(m = y) = py . Eve knows this.Note that px + py = 1.We showed

Pr(m = x |c = x) = px

One can show:

Pr(m = x |c = y) = px .

Pr(m = y |c = x) = py .

Pr(m = y |c = y) = py .

So seeing the ciphertext gives Eve NO INFORMATION.Upshot The 1-letter shift Information-Theoretic Secure.

Page 123: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

One-Letter Shift is Secure! (cont)

Alphabet is {x , y}. s ∈ {0, 1} randomly.Pr(m = x) = px . Pr(m = y) = py . Eve knows this.Note that px + py = 1.We showed

Pr(m = x |c = x) = px

One can show:

Pr(m = x |c = y) = px .

Pr(m = y |c = x) = py .

Pr(m = y |c = y) = py .

So seeing the ciphertext gives Eve NO INFORMATION.Upshot The 1-letter shift Information-Theoretic Secure.

Page 124: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Is 2-letter Shift Uncrackable?

Is 2-letter Shift Uncrackable? Discuss.

No. Alphabet is {X ,Y }.If Eve sees XX then she knows that the original message was one of

{XX ,YY }

So Eve has learned something. HW will make this rigorous.

Page 125: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Is 2-letter Shift Uncrackable?

Is 2-letter Shift Uncrackable? Discuss.No. Alphabet is {X ,Y }.

If Eve sees XX then she knows that the original message was one of

{XX ,YY }

So Eve has learned something. HW will make this rigorous.

Page 126: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Is 2-letter Shift Uncrackable?

Is 2-letter Shift Uncrackable? Discuss.No. Alphabet is {X ,Y }.If Eve sees XX then she knows that the original message was one of

{XX ,YY }

So Eve has learned something. HW will make this rigorous.

Page 127: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Summary and a New Question

I Alice and Bob use shift s unif, 1-letter. Secure

I Alice and Bob use shift s bias, 1-letter. Insecure

I Alice and Bob use shift s unif, 2-letters. Insecure

New Question Is the last item that important?We are saying that Eve knows prob stuff, but does she reallyKNOW something?

Page 128: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Summary and a New Question

I Alice and Bob use shift s unif, 1-letter.

Secure

I Alice and Bob use shift s bias, 1-letter. Insecure

I Alice and Bob use shift s unif, 2-letters. Insecure

New Question Is the last item that important?We are saying that Eve knows prob stuff, but does she reallyKNOW something?

Page 129: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Summary and a New Question

I Alice and Bob use shift s unif, 1-letter. Secure

I Alice and Bob use shift s bias, 1-letter. Insecure

I Alice and Bob use shift s unif, 2-letters. Insecure

New Question Is the last item that important?We are saying that Eve knows prob stuff, but does she reallyKNOW something?

Page 130: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Summary and a New Question

I Alice and Bob use shift s unif, 1-letter. Secure

I Alice and Bob use shift s bias, 1-letter.

Insecure

I Alice and Bob use shift s unif, 2-letters. Insecure

New Question Is the last item that important?We are saying that Eve knows prob stuff, but does she reallyKNOW something?

Page 131: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Summary and a New Question

I Alice and Bob use shift s unif, 1-letter. Secure

I Alice and Bob use shift s bias, 1-letter. Insecure

I Alice and Bob use shift s unif, 2-letters. Insecure

New Question Is the last item that important?We are saying that Eve knows prob stuff, but does she reallyKNOW something?

Page 132: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Summary and a New Question

I Alice and Bob use shift s unif, 1-letter. Secure

I Alice and Bob use shift s bias, 1-letter. Insecure

I Alice and Bob use shift s unif, 2-letters.

Insecure

New Question Is the last item that important?We are saying that Eve knows prob stuff, but does she reallyKNOW something?

Page 133: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Summary and a New Question

I Alice and Bob use shift s unif, 1-letter. Secure

I Alice and Bob use shift s bias, 1-letter. Insecure

I Alice and Bob use shift s unif, 2-letters. Insecure

New Question Is the last item that important?We are saying that Eve knows prob stuff, but does she reallyKNOW something?

Page 134: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Summary and a New Question

I Alice and Bob use shift s unif, 1-letter. Secure

I Alice and Bob use shift s bias, 1-letter. Insecure

I Alice and Bob use shift s unif, 2-letters. Insecure

New Question Is the last item that important?

We are saying that Eve knows prob stuff, but does she reallyKNOW something?

Page 135: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Summary and a New Question

I Alice and Bob use shift s unif, 1-letter. Secure

I Alice and Bob use shift s bias, 1-letter. Insecure

I Alice and Bob use shift s unif, 2-letters. Insecure

New Question Is the last item that important?We are saying that Eve knows prob stuff, but does she reallyKNOW something?

Page 136: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Can Two 1-Letter Messages Leak Information?

Can Two 1-Letter Messages using the same shift Leak Information?

YesScenarioVisible to all: Is Eric a double agent working for the Klingons?The answer comes via a shift cipher: A (which is either Y or N)

In clear: Is Eric a double agent working for the Romulans?The answer comes via a shift cipher: A (which is either Y or N)

Since the answer to both questions was the same, namely A,Eve knows Eric is working for either both or neither.

Page 137: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Can Two 1-Letter Messages Leak Information?

Can Two 1-Letter Messages using the same shift Leak Information?Yes

ScenarioVisible to all: Is Eric a double agent working for the Klingons?The answer comes via a shift cipher: A (which is either Y or N)

In clear: Is Eric a double agent working for the Romulans?The answer comes via a shift cipher: A (which is either Y or N)

Since the answer to both questions was the same, namely A,Eve knows Eric is working for either both or neither.

Page 138: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Can Two 1-Letter Messages Leak Information?

Can Two 1-Letter Messages using the same shift Leak Information?YesScenarioVisible to all: Is Eric a double agent working for the Klingons?

The answer comes via a shift cipher: A (which is either Y or N)

In clear: Is Eric a double agent working for the Romulans?The answer comes via a shift cipher: A (which is either Y or N)

Since the answer to both questions was the same, namely A,Eve knows Eric is working for either both or neither.

Page 139: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Can Two 1-Letter Messages Leak Information?

Can Two 1-Letter Messages using the same shift Leak Information?YesScenarioVisible to all: Is Eric a double agent working for the Klingons?The answer comes via a shift cipher: A (which is either Y or N)

In clear: Is Eric a double agent working for the Romulans?The answer comes via a shift cipher: A (which is either Y or N)

Since the answer to both questions was the same, namely A,Eve knows Eric is working for either both or neither.

Page 140: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Can Two 1-Letter Messages Leak Information?

Can Two 1-Letter Messages using the same shift Leak Information?YesScenarioVisible to all: Is Eric a double agent working for the Klingons?The answer comes via a shift cipher: A (which is either Y or N)

In clear: Is Eric a double agent working for the Romulans?

The answer comes via a shift cipher: A (which is either Y or N)

Since the answer to both questions was the same, namely A,Eve knows Eric is working for either both or neither.

Page 141: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Can Two 1-Letter Messages Leak Information?

Can Two 1-Letter Messages using the same shift Leak Information?YesScenarioVisible to all: Is Eric a double agent working for the Klingons?The answer comes via a shift cipher: A (which is either Y or N)

In clear: Is Eric a double agent working for the Romulans?The answer comes via a shift cipher: A (which is either Y or N)

Since the answer to both questions was the same, namely A,Eve knows Eric is working for either both or neither.

Page 142: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Can Two 1-Letter Messages Leak Information?

Can Two 1-Letter Messages using the same shift Leak Information?YesScenarioVisible to all: Is Eric a double agent working for the Klingons?The answer comes via a shift cipher: A (which is either Y or N)

In clear: Is Eric a double agent working for the Romulans?The answer comes via a shift cipher: A (which is either Y or N)

Since the answer to both questions was the same, namely A,Eve knows Eric is working for either both or neither.

Page 143: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Eve Can Tell if Two Message Are Same

Issue If Eve sees two messages, will know if they are the same ordifferent.

Does this leak information Discuss.

Yes.

What to do about this? Discuss.

For Now Nothing Will come back to this issue after a few moreciphers.

For Now A lesson in how even defining security and leak must bedone carefully.

Page 144: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Eve Can Tell if Two Message Are Same

Issue If Eve sees two messages, will know if they are the same ordifferent.

Does this leak information Discuss. Yes.

What to do about this? Discuss.

For Now Nothing Will come back to this issue after a few moreciphers.

For Now A lesson in how even defining security and leak must bedone carefully.

Page 145: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Eve Can Tell if Two Message Are Same

Issue If Eve sees two messages, will know if they are the same ordifferent.

Does this leak information Discuss. Yes.

What to do about this? Discuss.

For Now Nothing Will come back to this issue after a few moreciphers.

For Now A lesson in how even defining security and leak must bedone carefully.

Page 146: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Eve Can Tell if Two Message Are Same

Issue If Eve sees two messages, will know if they are the same ordifferent.

Does this leak information Discuss. Yes.

What to do about this? Discuss.

For Now Nothing Will come back to this issue after a few moreciphers.

For Now A lesson in how even defining security and leak must bedone carefully.

Page 147: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Eve Can Tell if Two Message Are Same

Issue If Eve sees two messages, will know if they are the same ordifferent.

Does this leak information Discuss. Yes.

What to do about this? Discuss.

For Now Nothing Will come back to this issue after a few moreciphers.

For Now A lesson in how even defining security and leak must bedone carefully.

Page 148: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Private-Key Encryption

Page 149: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Private-key encryption

Page 150: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

Private-key encryptionI A private-key encryption scheme is defined by a message

space M and algorithms (Gen, Enc, Dec)

I Gen (key generation algorithm): outputs k ∈ K(For SHIFT this is k ∈ {0, . . . , 25}. Should 0 be included?)

I Enc (encryption algorithm): takes key k and message m ∈Mas input; outputs ciphertext c

c ← Enck(m)

(For SHIFT this is Enc(m1, . . . ,mn) = (m1 + k, . . . ,mn + k).)I Dec (decryption algorithm): takes key k and ciphertext c as

input; outputs m or “error”

m := Deck(c)

(For SHIFT this is Dec(c1, . . . , cn) = (c1 − k, . . . , cn − k).)

∀k output by Gen ∀m ∈M,Deck(Enck(m)) = m

(For SHIFT this is (m + k)− k = m)

Page 151: BILL, RECORD LECTURE!!!! · i is English shifted by i. f E f i ˘0:035. 3.Find correct shift i by seeing which f E f i is ˘0:065. 4.Only one of the dot products will be close to

BILL, STOP RECORDING LECTURE!!!!

BILL STOP RECORD LECTURE!!!