242
Encryption and Message Authentication Bar-Ilan Winter School 1 Benny Applebaum Tel-Aviv University January, 2014 1 These slides are partially based on Benny Chor’s slides.

Encryption and Message Authentication - BIU

  • Upload
    others

  • View
    23

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Encryption and Message Authentication - BIU

Encryption and Message AuthenticationBar-Ilan Winter School1

Benny Applebaum

Tel-Aviv University

January, 2014

1These slides are partially based on Benny Chor’s slides.

Page 2: Encryption and Message Authentication - BIU

And Finally, Let’s Talk Business

Encryption

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 2 / 48

Page 3: Encryption and Message Authentication - BIU

And Finally, Let’s Talk Business

Encryption

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 2 / 48

Page 4: Encryption and Message Authentication - BIU

Basic Setting

1 Eve listens to the communication.

2 Alice and Bob share a secret random key kR← {0, 1}n.

3 Goal: Alice would like to send Bob a message m confidentially.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 3 / 48

Page 5: Encryption and Message Authentication - BIU

Basic Setting

1 Eve listens to the communication.

2 Alice and Bob share a secret random key kR← {0, 1}n.

3 Goal: Alice would like to send Bob a message m confidentially.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 3 / 48

Page 6: Encryption and Message Authentication - BIU

Basic Setting

1 Eve listens to the communication.

2 Alice and Bob share a secret random key kR← {0, 1}n.

3 Goal: Alice would like to send Bob a message m confidentially.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 3 / 48

Page 7: Encryption and Message Authentication - BIU

Basic Setting

1 Eve listens to the communication.

2 Alice and Bob share a secret random key kR← {0, 1}n.

3 Goal: Alice would like to send Bob a message m confidentially.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 3 / 48

Page 8: Encryption and Message Authentication - BIU

Security Goals

There are some different goals we may be after

No adversary can learn m

No adversary can learn any meaningful information about m.

No adversary can learn any information about m

Important questions:

What are the adversary’s capabilities (e.g., passive/active) andknowledge (prior information)?

What are the adversary’s computational resources?

Different answers lead to different security definitions.

Meta question:

Can we formalize secrecy mathematically?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 4 / 48

Page 9: Encryption and Message Authentication - BIU

Security Goals

There are some different goals we may be after

No adversary can learn m

No adversary can learn any meaningful information about m.

No adversary can learn any information about m

Important questions:

What are the adversary’s capabilities (e.g., passive/active) andknowledge (prior information)?

What are the adversary’s computational resources?

Different answers lead to different security definitions.

Meta question:

Can we formalize secrecy mathematically?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 4 / 48

Page 10: Encryption and Message Authentication - BIU

Security Goals

There are some different goals we may be after

No adversary can learn m

No adversary can learn any meaningful information about m.

No adversary can learn any information about m

Important questions:

What are the adversary’s capabilities (e.g., passive/active) andknowledge (prior information)?

What are the adversary’s computational resources?

Different answers lead to different security definitions.

Meta question:

Can we formalize secrecy mathematically?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 4 / 48

Page 11: Encryption and Message Authentication - BIU

Security Goals

There are some different goals we may be after

No adversary can learn m

No adversary can learn any meaningful information about m.

No adversary can learn any information about m

Important questions:

What are the adversary’s capabilities (e.g., passive/active) andknowledge (prior information)?

What are the adversary’s computational resources?

Different answers lead to different security definitions.

Meta question:

Can we formalize secrecy mathematically?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 4 / 48

Page 12: Encryption and Message Authentication - BIU

Security Goals

There are some different goals we may be after

No adversary can learn m

No adversary can learn any meaningful information about m.

No adversary can learn any information about m

Important questions:

What are the adversary’s capabilities (e.g., passive/active) andknowledge (prior information)?

What are the adversary’s computational resources?

Different answers lead to different security definitions.

Meta question:

Can we formalize secrecy mathematically?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 4 / 48

Page 13: Encryption and Message Authentication - BIU

Security Goals

There are some different goals we may be after

No adversary can learn m

No adversary can learn any meaningful information about m.

No adversary can learn any information about m

Important questions:

What are the adversary’s capabilities (e.g., passive/active) andknowledge (prior information)?

What are the adversary’s computational resources?

Different answers lead to different security definitions.

Meta question:

Can we formalize secrecy mathematically?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 4 / 48

Page 14: Encryption and Message Authentication - BIU

Security Goals

There are some different goals we may be after

No adversary can learn m

No adversary can learn any meaningful information about m.

No adversary can learn any information about m

Important questions:

What are the adversary’s capabilities (e.g., passive/active) andknowledge (prior information)?

What are the adversary’s computational resources?

Different answers lead to different security definitions.

Meta question:

Can we formalize secrecy mathematically?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 4 / 48

Page 15: Encryption and Message Authentication - BIU

Security Goals

There are some different goals we may be after

No adversary can learn m

No adversary can learn any meaningful information about m.

No adversary can learn any information about m

Important questions:

What are the adversary’s capabilities (e.g., passive/active) andknowledge (prior information)?

What are the adversary’s computational resources?

Different answers lead to different security definitions.

Meta question:

Can we formalize secrecy mathematically?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 4 / 48

Page 16: Encryption and Message Authentication - BIU

Security Goals

There are some different goals we may be after

No adversary can learn m

No adversary can learn any meaningful information about m.

No adversary can learn any information about m

Important questions:

What are the adversary’s capabilities (e.g., passive/active) andknowledge (prior information)?

What are the adversary’s computational resources?

Different answers lead to different security definitions.

Meta question:

Can we formalize secrecy mathematically?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 4 / 48

Page 17: Encryption and Message Authentication - BIU

Encryption Syntax

Definition

A symmetric encryption scheme consists of:

Encryption Algorithm: E maps a key k ∈ {0, 1}∗ and a plaintextm ∈ {0, 1}∗ into a ciphertext Ek(m).

Decryption Algorithm: D maps a key k ∈ {0, 1}∗ and aciphertext c ∈ {0, 1}∗ into a plaintext Dk(c).

The scheme should be correct:

∀m ∈ {0, 1}∗, k ∈ {0, 1}∗ : Dk(Ek(m)) = m.

Note: Both algorithms are efficient and may be randomized.So far, no requirement of secrecy.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 5 / 48

Page 18: Encryption and Message Authentication - BIU

Encryption Syntax

Definition

A symmetric encryption scheme consists of:

Encryption Algorithm: E maps a key k ∈ {0, 1}∗ and a plaintextm ∈ {0, 1}∗ into a ciphertext Ek(m).

Decryption Algorithm: D maps a key k ∈ {0, 1}∗ and aciphertext c ∈ {0, 1}∗ into a plaintext Dk(c).

The scheme should be correct:

∀m ∈ {0, 1}∗, k ∈ {0, 1}∗ : Dk(Ek(m)) = m.

Note: Both algorithms are efficient and may be randomized.So far, no requirement of secrecy.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 5 / 48

Page 19: Encryption and Message Authentication - BIU

Encryption Syntax

Definition

A symmetric encryption scheme consists of:

Encryption Algorithm: E maps a key k ∈ {0, 1}∗ and a plaintextm ∈ {0, 1}∗ into a ciphertext Ek(m).

Decryption Algorithm: D maps a key k ∈ {0, 1}∗ and aciphertext c ∈ {0, 1}∗ into a plaintext Dk(c).

The scheme should be correct:

∀m ∈ {0, 1}∗, k ∈ {0, 1}∗ : Dk(Ek(m)) = m.

Note: Both algorithms are efficient and may be randomized.So far, no requirement of secrecy.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 5 / 48

Page 20: Encryption and Message Authentication - BIU

Encryption Syntax

Definition

A symmetric encryption scheme consists of:

Encryption Algorithm: E maps a key k ∈ {0, 1}∗ and a plaintextm ∈ {0, 1}∗ into a ciphertext Ek(m).

Decryption Algorithm: D maps a key k ∈ {0, 1}∗ and aciphertext c ∈ {0, 1}∗ into a plaintext Dk(c).

The scheme should be correct:

∀m ∈ {0, 1}∗, k ∈ {0, 1}∗ : Dk(Ek(m)) = m.

Note: Both algorithms are efficient and may be randomized.So far, no requirement of secrecy.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 5 / 48

Page 21: Encryption and Message Authentication - BIU

Encryption Syntax

Definition

A symmetric encryption scheme consists of:

Encryption Algorithm: E maps a key k ∈ {0, 1}∗ and a plaintextm ∈ {0, 1}∗ into a ciphertext Ek(m).

Decryption Algorithm: D maps a key k ∈ {0, 1}∗ and aciphertext c ∈ {0, 1}∗ into a plaintext Dk(c).

The scheme should be correct:

∀m ∈ {0, 1}∗, k ∈ {0, 1}∗ : Dk(Ek(m)) = m.

Note: Both algorithms are efficient and may be randomized.

So far, no requirement of secrecy.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 5 / 48

Page 22: Encryption and Message Authentication - BIU

Encryption Syntax

Definition

A symmetric encryption scheme consists of:

Encryption Algorithm: E maps a key k ∈ {0, 1}∗ and a plaintextm ∈ {0, 1}∗ into a ciphertext Ek(m).

Decryption Algorithm: D maps a key k ∈ {0, 1}∗ and aciphertext c ∈ {0, 1}∗ into a plaintext Dk(c).

The scheme should be correct:

∀m ∈ {0, 1}∗, k ∈ {0, 1}∗ : Dk(Ek(m)) = m.

Note: Both algorithms are efficient and may be randomized.So far, no requirement of secrecy.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 5 / 48

Page 23: Encryption and Message Authentication - BIU

Security as Indistinguishability

An encryption of m0 and an encryption of m1 should“look the same”.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 6 / 48

Page 24: Encryption and Message Authentication - BIU

Perfect Secrecy (Shannon ’49)

For any pair of different messages m0 and m1 of equal length: Theciphertexts c0 and c1 should be identically distributed.

Experiment 0

Let kR← {0, 1}n

Output c0 = Ek(m0)

Experiment 1

Let kR← {0, 1}n

Output c1 = Ek(m1)

Very strong definition: can’t distinguish attack from retreat

Example: one-time pad (Ek(m) = k⊕m) is perfectly secret.

Unfortunately, perfect secrecy requires long key |m| = |k|(Ex: prove it!)

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 7 / 48

Page 25: Encryption and Message Authentication - BIU

Perfect Secrecy (Shannon ’49)

For any pair of different messages m0 and m1 of equal length: Theciphertexts c0 and c1 should be identically distributed.

Experiment 0

Let kR← {0, 1}n

Output c0 = Ek(m0)

Experiment 1

Let kR← {0, 1}n

Output c1 = Ek(m1)

Very strong definition: can’t distinguish attack from retreat

Example: one-time pad (Ek(m) = k⊕m) is perfectly secret.

Unfortunately, perfect secrecy requires long key |m| = |k|(Ex: prove it!)

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 7 / 48

Page 26: Encryption and Message Authentication - BIU

Perfect Secrecy (Shannon ’49)

For any pair of different messages m0 and m1 of equal length: Theciphertexts c0 and c1 should be identically distributed.

Experiment 0

Let kR← {0, 1}n

Output c0 = Ek(m0)

Experiment 1

Let kR← {0, 1}n

Output c1 = Ek(m1)

Very strong definition: can’t distinguish attack from retreat

Example: one-time pad (Ek(m) = k⊕m) is perfectly secret.

Unfortunately, perfect secrecy requires long key |m| = |k|(Ex: prove it!)

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 7 / 48

Page 27: Encryption and Message Authentication - BIU

Computational Secrecy (Goldwasser & Micali ’82)

For any pair of different messages m0 and m1 of equal length:The ciphertexts c0 and c1 should be indistinguishable forcomputationally-bounded adversary.

Experiment 0

Let kR← {0, 1}n

Output c0 = Ek(m0)

c≡

Experiment 1

Let kR← {0, 1}n

Output c1 = Ek(m1)

Pr[A(c0) = accept] − Pr[A(c1) = accept] < ε

For any PPT adversary A and some negligible ε.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 8 / 48

Page 28: Encryption and Message Authentication - BIU

Computational Secrecy (Goldwasser & Micali ’82)

For any pair of different messages m0 and m1 of equal length:The ciphertexts c0 and c1 should be indistinguishable forcomputationally-bounded adversary.

Experiment 0

Let kR← {0, 1}n

Output c0 = Ek(m0)

c≡

Experiment 1

Let kR← {0, 1}n

Output c1 = Ek(m1)

Pr[A(c0) = accept] − Pr[A(c1) = accept] < ε

For any PPT adversary A and some negligible ε.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 8 / 48

Page 29: Encryption and Message Authentication - BIU

Computational Secrecy (Goldwasser & Micali ’82)

For any pair of different messages m0 and m1 of equal length:The ciphertexts c0 and c1 should be indistinguishable forcomputationally-bounded adversary.

Experiment 0

Let kR← {0, 1}n

Output c0 = Ek(m0)

c≡

Experiment 1

Let kR← {0, 1}n

Output c1 = Ek(m1)

Pr[A(c0) = accept] − Pr[A(c1) = accept] < ε

For any PPT adversary A and some negligible ε.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 8 / 48

Page 30: Encryption and Message Authentication - BIU

Computational Secrecy vs. Semantic Security

Comp. Secrecy is also known as Message Indistinguishability

Semantic Security:

“Everything that can be computed efficiently given theciphertext can be also computed without the ciphertext”

Therefore the ciphertext does not “add” useful information (forcomputationally bounded adversary)

Exercise: try to formally define semantic security

Thm. Semantic Security is equivalent to Computational Secrecy(up to a polynomial loss in the parameters)

Great ! computational secrecy is a strong notion.Is it feasible (with a short key)?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 9 / 48

Page 31: Encryption and Message Authentication - BIU

Computational Secrecy vs. Semantic Security

Comp. Secrecy is also known as Message Indistinguishability

Semantic Security:

“Everything that can be computed efficiently given theciphertext can be also computed without the ciphertext”

Therefore the ciphertext does not “add” useful information (forcomputationally bounded adversary)

Exercise: try to formally define semantic security

Thm. Semantic Security is equivalent to Computational Secrecy(up to a polynomial loss in the parameters)

Great ! computational secrecy is a strong notion.Is it feasible (with a short key)?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 9 / 48

Page 32: Encryption and Message Authentication - BIU

Computational Secrecy vs. Semantic Security

Comp. Secrecy is also known as Message Indistinguishability

Semantic Security:

“Everything that can be computed efficiently given theciphertext can be also computed without the ciphertext”

Therefore the ciphertext does not “add” useful information (forcomputationally bounded adversary)

Exercise: try to formally define semantic security

Thm. Semantic Security is equivalent to Computational Secrecy(up to a polynomial loss in the parameters)

Great ! computational secrecy is a strong notion.Is it feasible (with a short key)?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 9 / 48

Page 33: Encryption and Message Authentication - BIU

Computational Secrecy vs. Semantic Security

Comp. Secrecy is also known as Message Indistinguishability

Semantic Security:

“Everything that can be computed efficiently given theciphertext can be also computed without the ciphertext”

Therefore the ciphertext does not “add” useful information (forcomputationally bounded adversary)

Exercise: try to formally define semantic security

Thm. Semantic Security is equivalent to Computational Secrecy(up to a polynomial loss in the parameters)

Great ! computational secrecy is a strong notion.Is it feasible (with a short key)?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 9 / 48

Page 34: Encryption and Message Authentication - BIU

Computational Secrecy vs. Semantic Security

Comp. Secrecy is also known as Message Indistinguishability

Semantic Security:

“Everything that can be computed efficiently given theciphertext can be also computed without the ciphertext”

Therefore the ciphertext does not “add” useful information (forcomputationally bounded adversary)

Exercise: try to formally define semantic security

Thm. Semantic Security is equivalent to Computational Secrecy(up to a polynomial loss in the parameters)

Great ! computational secrecy is a strong notion.Is it feasible (with a short key)?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 9 / 48

Page 35: Encryption and Message Authentication - BIU

Computational Secrecy vs. Semantic Security

Comp. Secrecy is also known as Message Indistinguishability

Semantic Security:

“Everything that can be computed efficiently given theciphertext can be also computed without the ciphertext”

Therefore the ciphertext does not “add” useful information (forcomputationally bounded adversary)

Exercise: try to formally define semantic security

Thm. Semantic Security is equivalent to Computational Secrecy(up to a polynomial loss in the parameters)

Great ! computational secrecy is a strong notion.Is it feasible (with a short key)?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 9 / 48

Page 36: Encryption and Message Authentication - BIU

Computational Secrecy vs. Semantic Security

Comp. Secrecy is also known as Message Indistinguishability

Semantic Security:

“Everything that can be computed efficiently given theciphertext can be also computed without the ciphertext”

Therefore the ciphertext does not “add” useful information (forcomputationally bounded adversary)

Exercise: try to formally define semantic security

Thm. Semantic Security is equivalent to Computational Secrecy(up to a polynomial loss in the parameters)

Great ! computational secrecy is a strong notion.Is it feasible (with a short key)?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 9 / 48

Page 37: Encryption and Message Authentication - BIU

Computational analog of “one-time pad”

Choose a secret random short key k (“seed”)

Expand the seed into a long keying stream G(k)

Encrypt m by c = G(k)⊕m

Decrypt c to m = c⊕G(k).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 10 / 48

Page 38: Encryption and Message Authentication - BIU

Pseudorandom Generators (Reminder)

A pseudorandom generator is a polynomial time computable functionG : {0, 1}n 7→ {0, 1}`, `� n, which satisfies:

Pseudorandom

Choose kR← {0, 1}n

Output y0 = G(k)

c≡

Random

Choose y1R← {0, 1}`

Output y1

The output of G is computationally indistinguishable from trulyrandom strings of length `.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 11 / 48

Page 39: Encryption and Message Authentication - BIU

From PRG to Encryption

Theorem

Assume that PRG : {0, 1}n → {0, 1}` is pseudorandom.Then the “computational OTP” is secure.

Proof sketch.

Ek(m0) ≡ (PRG(Un)⊕m0)

c≡ (U`⊕m0) ≡ U`.

For similar reason, Ek(m1)c≡ U`.

Hence, Ek(m0)c≡ Ek(m1).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 12 / 48

Page 40: Encryption and Message Authentication - BIU

From PRG to Encryption

Theorem

Assume that PRG : {0, 1}n → {0, 1}` is pseudorandom.Then the “computational OTP” is secure.

Proof sketch.

Ek(m0) ≡ (PRG(Un)⊕m0)

c≡ (U`⊕m0) ≡ U`.

For similar reason, Ek(m1)c≡ U`.

Hence, Ek(m0)c≡ Ek(m1).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 12 / 48

Page 41: Encryption and Message Authentication - BIU

From PRG to Encryption

Theorem

Assume that PRG : {0, 1}n → {0, 1}` is pseudorandom.Then the “computational OTP” is secure.

Proof sketch.

Ek(m0) ≡ (PRG(Un)⊕m0)

c≡ (U`⊕m0) ≡ U`.

For similar reason, Ek(m1)c≡ U`.

Hence, Ek(m0)c≡ Ek(m1).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 12 / 48

Page 42: Encryption and Message Authentication - BIU

From PRG to Encryption

Theorem

Assume that PRG : {0, 1}n → {0, 1}` is pseudorandom.Then the “computational OTP” is secure.

Proof sketch.

Ek(m0) ≡ (PRG(Un)⊕m0)

c≡ (U`⊕m0) ≡ U`.

For similar reason, Ek(m1)c≡ U`.

Hence, Ek(m0)c≡ Ek(m1).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 12 / 48

Page 43: Encryption and Message Authentication - BIU

From PRG to Encryption

Theorem

Assume that PRG : {0, 1}n → {0, 1}` is pseudorandom.Then the “computational OTP” is secure.

Proof sketch.

Ek(m0) ≡ (PRG(Un)⊕m0)

c≡ (U`⊕m0) ≡ U`.

For similar reason, Ek(m1)c≡ U`.

Hence, Ek(m0)c≡ Ek(m1).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 12 / 48

Page 44: Encryption and Message Authentication - BIU

Multiple Messages

We would like to use the same key to encrypt many messages

Recall that the PRG-based encryption is defined byEk(m) = PRG(k)

⊕m

Is it ok to encrypt with the same key twice ?

Bad idea: Given Ek(m1) and Ek(m2) the adversary learnswhether m1 = m2 or more generally m1

⊕m2

Old versions of MS Word used an (excellent) PRG twice!As a result the encryption was completely broken and theplaintext was fully recovered !

But we proved that the encryption is secure!

What went wrong?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 13 / 48

Page 45: Encryption and Message Authentication - BIU

Multiple Messages

We would like to use the same key to encrypt many messages

Recall that the PRG-based encryption is defined byEk(m) = PRG(k)

⊕m

Is it ok to encrypt with the same key twice ?

Bad idea: Given Ek(m1) and Ek(m2) the adversary learnswhether m1 = m2 or more generally m1

⊕m2

Old versions of MS Word used an (excellent) PRG twice!As a result the encryption was completely broken and theplaintext was fully recovered !

But we proved that the encryption is secure!

What went wrong?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 13 / 48

Page 46: Encryption and Message Authentication - BIU

Multiple Messages

We would like to use the same key to encrypt many messages

Recall that the PRG-based encryption is defined byEk(m) = PRG(k)

⊕m

Is it ok to encrypt with the same key twice ?

Bad idea: Given Ek(m1) and Ek(m2) the adversary learnswhether m1 = m2 or more generally m1

⊕m2

Old versions of MS Word used an (excellent) PRG twice!As a result the encryption was completely broken and theplaintext was fully recovered !

But we proved that the encryption is secure!

What went wrong?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 13 / 48

Page 47: Encryption and Message Authentication - BIU

Multiple Messages

We would like to use the same key to encrypt many messages

Recall that the PRG-based encryption is defined byEk(m) = PRG(k)

⊕m

Is it ok to encrypt with the same key twice ?

Bad idea: Given Ek(m1) and Ek(m2) the adversary learnswhether m1 = m2 or more generally m1

⊕m2

Old versions of MS Word used an (excellent) PRG twice!As a result the encryption was completely broken and theplaintext was fully recovered !

But we proved that the encryption is secure!

What went wrong?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 13 / 48

Page 48: Encryption and Message Authentication - BIU

Multiple Messages

We would like to use the same key to encrypt many messages

Recall that the PRG-based encryption is defined byEk(m) = PRG(k)

⊕m

Is it ok to encrypt with the same key twice ?

Bad idea: Given Ek(m1) and Ek(m2) the adversary learnswhether m1 = m2 or more generally m1

⊕m2

Old versions of MS Word used an (excellent) PRG twice!As a result the encryption was completely broken and theplaintext was fully recovered !

But we proved that the encryption is secure!

What went wrong?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 13 / 48

Page 49: Encryption and Message Authentication - BIU

Multiple Messages

We would like to use the same key to encrypt many messages

Recall that the PRG-based encryption is defined byEk(m) = PRG(k)

⊕m

Is it ok to encrypt with the same key twice ?

Bad idea: Given Ek(m1) and Ek(m2) the adversary learnswhether m1 = m2 or more generally m1

⊕m2

Old versions of MS Word used an (excellent) PRG twice!As a result the encryption was completely broken and theplaintext was fully recovered !

But we proved that the encryption is secure!

What went wrong?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 13 / 48

Page 50: Encryption and Message Authentication - BIU

Multiple Messages

We would like to use the same key to encrypt many messages

Recall that the PRG-based encryption is defined byEk(m) = PRG(k)

⊕m

Is it ok to encrypt with the same key twice ?

Bad idea: Given Ek(m1) and Ek(m2) the adversary learnswhether m1 = m2 or more generally m1

⊕m2

Old versions of MS Word used an (excellent) PRG twice!As a result the encryption was completely broken and theplaintext was fully recovered !

But we proved that the encryption is secure!

What went wrong?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 13 / 48

Page 51: Encryption and Message Authentication - BIU

Multiple Messages

Our notion of security was defined for a single message

If we want to encrypt many messages we need a strongerdefinition

In fact, we would like to grant the adversary the extra power ofChosen Plaintext Attack

Before that, let us reconsider our original definition

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 14 / 48

Page 52: Encryption and Message Authentication - BIU

Multiple Messages

Our notion of security was defined for a single message

If we want to encrypt many messages we need a strongerdefinition

In fact, we would like to grant the adversary the extra power ofChosen Plaintext Attack

Before that, let us reconsider our original definition

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 14 / 48

Page 53: Encryption and Message Authentication - BIU

Multiple Messages

Our notion of security was defined for a single message

If we want to encrypt many messages we need a strongerdefinition

In fact, we would like to grant the adversary the extra power ofChosen Plaintext Attack

Before that, let us reconsider our original definition

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 14 / 48

Page 54: Encryption and Message Authentication - BIU

Multiple Messages

Our notion of security was defined for a single message

If we want to encrypt many messages we need a strongerdefinition

In fact, we would like to grant the adversary the extra power ofChosen Plaintext Attack

Before that, let us reconsider our original definition

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 14 / 48

Page 55: Encryption and Message Authentication - BIU

Reminder: Ciphertext Indistinguishability

For any pair of messages m0 and m1 of equal length:

Experiment 0

Let kR← {0, 1}n

Output c0 = Ek(m0)

c≡

Experiment 1

Let kR← {0, 1}n

Output c1 = Ek(m1)

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 15 / 48

Page 56: Encryption and Message Authentication - BIU

Ciphertext Indistinguishability: Alternative Formulation

Challenger

kR← {0, 1}n

bR← {0, 1}

← (m0,m1)

Ek(mb)→

Adversary A(1n)

Output b′

A chooses a test m0,m1 and tries to distinguish Ek(m0) fromEk(m1)

It is always possible to guess b with probability 12

Security: For any PPT adversary A,

Pr[b′ = b] ≤ 1

2+ neg(n)

Exercise: Prove equivalence to the original one.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 16 / 48

Page 57: Encryption and Message Authentication - BIU

Ciphertext Indistinguishability: Alternative Formulation

Challenger

kR← {0, 1}n

bR← {0, 1}

← (m0,m1)

Ek(mb)→

Adversary A(1n)

Output b′

A chooses a test m0,m1 and tries to distinguish Ek(m0) fromEk(m1)

It is always possible to guess b with probability 12

Security: For any PPT adversary A,

Pr[b′ = b] ≤ 1

2+ neg(n)

Exercise: Prove equivalence to the original one.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 16 / 48

Page 58: Encryption and Message Authentication - BIU

Ciphertext Indistinguishability: Alternative Formulation

Challenger

kR← {0, 1}n

bR← {0, 1}

← (m0,m1)

Ek(mb)→

Adversary A(1n)

Output b′

A chooses a test m0,m1 and tries to distinguish Ek(m0) fromEk(m1)

It is always possible to guess b with probability 12

Security: For any PPT adversary A,

Pr[b′ = b] ≤ 1

2+ neg(n)

Exercise: Prove equivalence to the original one.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 16 / 48

Page 59: Encryption and Message Authentication - BIU

Ciphertext Indistinguishability: Alternative Formulation

Challenger

kR← {0, 1}n

bR← {0, 1}

← (m0,m1)

Ek(mb)→

Adversary A(1n)

Output b′

A chooses a test m0,m1 and tries to distinguish Ek(m0) fromEk(m1)

It is always possible to guess b with probability 12

Security: For any PPT adversary A,

Pr[b′ = b] ≤ 1

2+ neg(n)

Exercise: Prove equivalence to the original one.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 16 / 48

Page 60: Encryption and Message Authentication - BIU

Ciphertext Indistinguishability: Alternative Formulation

Challenger

kR← {0, 1}n

bR← {0, 1}

← (m0,m1)

Ek(mb)→

Adversary A(1n)

Output b′

A chooses a test m0,m1 and tries to distinguish Ek(m0) fromEk(m1)

It is always possible to guess b with probability 12

Security: For any PPT adversary A,

Pr[b′ = b] ≤ 1

2+ neg(n)

Exercise: Prove equivalence to the original one.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 16 / 48

Page 61: Encryption and Message Authentication - BIU

Indistinguishability under Chosen Plaintext Attack

Challenger

kR← {0, 1}n

bR← {0, 1}

← x1

Ek(x1)→

← x2

Ek(x2)→

. . .

← (m0,m1)

Ek(mb)→

Adversary A(1n)

Output b′

The game has two phases:

1 A is allowed to adaptively choose many encryptions2 A chooses a test m0,m1 and tries to distinguish Ek(m0) fromEk(m1)

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 17 / 48

Page 62: Encryption and Message Authentication - BIU

Indistinguishability under Chosen Plaintext Attack

Challenger

kR← {0, 1}n

bR← {0, 1}

← x1

Ek(x1)→

← x2

Ek(x2)→

. . .

← (m0,m1)

Ek(mb)→

Adversary A(1n)

Output b′

The game has two phases:

1 A is allowed to adaptively choose many encryptions2 A chooses a test m0,m1 and tries to distinguish Ek(m0) fromEk(m1)

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 17 / 48

Page 63: Encryption and Message Authentication - BIU

Indistinguishability under Chosen Plaintext Attack

Challenger

kR← {0, 1}n

bR← {0, 1}

← x1

Ek(x1)→

← x2

Ek(x2)→

. . .

← (m0,m1)

Ek(mb)→

Adversary A(1n)

Output b′

The game has two phases:1 A is allowed to adaptively choose many encryptions

2 A chooses a test m0,m1 and tries to distinguish Ek(m0) fromEk(m1)

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 17 / 48

Page 64: Encryption and Message Authentication - BIU

Indistinguishability under Chosen Plaintext Attack

Challenger

kR← {0, 1}n

bR← {0, 1}

← x1

Ek(x1)→

← x2

Ek(x2)→

. . .

← (m0,m1)

Ek(mb)→

Adversary A(1n)

Output b′

The game has two phases:1 A is allowed to adaptively choose many encryptions2 A chooses a test m0,m1 and tries to distinguish Ek(m0) fromEk(m1)

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 17 / 48

Page 65: Encryption and Message Authentication - BIU

Chosen Plaintext Security

Challenger

kR← {0, 1}n

bR← {0, 1}

← x1

Ek(x1)→

← x2

Ek(x2)→

. . .

← (m0,m1)

Ek(mb)→

Adversary A(1n)

Output b′

Security: For every PPT adversary Pr[b = b′] ≤ 12 + neg(n)

It is always possible to guess b with probability 12

The adversary cannot do much better !

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 18 / 48

Page 66: Encryption and Message Authentication - BIU

Chosen Plaintext Security

Challenger

kR← {0, 1}n

bR← {0, 1}

← x1

Ek(x1)→

← x2

Ek(x2)→

. . .

← (m0,m1)

Ek(mb)→

Adversary A(1n)

Output b′

Security: For every PPT adversary Pr[b = b′] ≤ 12 + neg(n)

It is always possible to guess b with probability 12

The adversary cannot do much better !

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 18 / 48

Page 67: Encryption and Message Authentication - BIU

Chosen Plaintext Security

Challenger

kR← {0, 1}n

bR← {0, 1}

← x1

Ek(x1)→

← x2

Ek(x2)→

. . .

← (m0,m1)

Ek(mb)→

Adversary A(1n)

Output b′

Security: For every PPT adversary Pr[b = b′] ≤ 12 + neg(n)

It is always possible to guess b with probability 12

The adversary cannot do much better !

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 18 / 48

Page 68: Encryption and Message Authentication - BIU

Chosen Plaintext Security

Challenger

kR← {0, 1}n

bR← {0, 1}

← x1

Ek(x1)→

← x2

Ek(x2)→

. . .

← (m0,m1)

Ek(mb)→

Adversary A(1n)

Output b′

Security: For every PPT adversary Pr[b = b′] ≤ 12 + neg(n)

It is always possible to guess b with probability 12

The adversary cannot do much better !

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 18 / 48

Page 69: Encryption and Message Authentication - BIU

Why do we need such a strong definition?

Is it reasonable to assume that the adversary has an access to anEncryption Oracle ?

History: Yes!

Example: Servers may communicate via encryption but(dishonest) users can control the actual requests that are beingtransferred

Remark: One can define an intermediate notion (CiphertextIndistinguishability for Multiple Messages) which is weaker thanCPA security but stronger than Ciphertext Indistinguishability fora single Message.

Ex: Try to formalize it and prove that it’s indeed strictly weakerthan CPA and strictly stronger than CI for a single message.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 19 / 48

Page 70: Encryption and Message Authentication - BIU

Why do we need such a strong definition?

Is it reasonable to assume that the adversary has an access to anEncryption Oracle ?

History: Yes!

Example: Servers may communicate via encryption but(dishonest) users can control the actual requests that are beingtransferred

Remark: One can define an intermediate notion (CiphertextIndistinguishability for Multiple Messages) which is weaker thanCPA security but stronger than Ciphertext Indistinguishability fora single Message.

Ex: Try to formalize it and prove that it’s indeed strictly weakerthan CPA and strictly stronger than CI for a single message.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 19 / 48

Page 71: Encryption and Message Authentication - BIU

Why do we need such a strong definition?

Is it reasonable to assume that the adversary has an access to anEncryption Oracle ?

History: Yes!

Example: Servers may communicate via encryption but(dishonest) users can control the actual requests that are beingtransferred

Remark: One can define an intermediate notion (CiphertextIndistinguishability for Multiple Messages) which is weaker thanCPA security but stronger than Ciphertext Indistinguishability fora single Message.

Ex: Try to formalize it and prove that it’s indeed strictly weakerthan CPA and strictly stronger than CI for a single message.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 19 / 48

Page 72: Encryption and Message Authentication - BIU

Why do we need such a strong definition?

Is it reasonable to assume that the adversary has an access to anEncryption Oracle ?

History: Yes!

Example: Servers may communicate via encryption but(dishonest) users can control the actual requests that are beingtransferred

Remark: One can define an intermediate notion (CiphertextIndistinguishability for Multiple Messages) which is weaker thanCPA security but stronger than Ciphertext Indistinguishability fora single Message.

Ex: Try to formalize it and prove that it’s indeed strictly weakerthan CPA and strictly stronger than CI for a single message.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 19 / 48

Page 73: Encryption and Message Authentication - BIU

Why do we need such a strong definition?

Is it reasonable to assume that the adversary has an access to anEncryption Oracle ?

History: Yes!

Example: Servers may communicate via encryption but(dishonest) users can control the actual requests that are beingtransferred

Remark: One can define an intermediate notion (CiphertextIndistinguishability for Multiple Messages) which is weaker thanCPA security but stronger than Ciphertext Indistinguishability fora single Message.

Ex: Try to formalize it and prove that it’s indeed strictly weakerthan CPA and strictly stronger than CI for a single message.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 19 / 48

Page 74: Encryption and Message Authentication - BIU

Is CPA security realizable?

Theorem

If the encryption algorithm is a deterministic function Ek(m) then itis insecure under chosen plaintext attacks (even if the adversarymakes only one CPA query).

How can you prove it?

Does it mean that security under multiple messages cannot beachieved?Q: How to bypass the limitation?Sol1: Randomized encryptionSol2: Stateful encryption

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 20 / 48

Page 75: Encryption and Message Authentication - BIU

Is CPA security realizable?

Theorem

If the encryption algorithm is a deterministic function Ek(m) then itis insecure under chosen plaintext attacks (even if the adversarymakes only one CPA query).

How can you prove it?

Does it mean that security under multiple messages cannot beachieved?Q: How to bypass the limitation?Sol1: Randomized encryptionSol2: Stateful encryption

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 20 / 48

Page 76: Encryption and Message Authentication - BIU

Is CPA security realizable?

Theorem

If the encryption algorithm is a deterministic function Ek(m) then itis insecure under chosen plaintext attacks (even if the adversarymakes only one CPA query).

How can you prove it?

Does it mean that security under multiple messages cannot beachieved?Q: How to bypass the limitation?Sol1: Randomized encryptionSol2: Stateful encryption

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 20 / 48

Page 77: Encryption and Message Authentication - BIU

Is CPA security realizable?

Theorem

If the encryption algorithm is a deterministic function Ek(m) then itis insecure under chosen plaintext attacks (even if the adversarymakes only one CPA query).

How can you prove it?

Does it mean that security under multiple messages cannot beachieved?

Q: How to bypass the limitation?Sol1: Randomized encryptionSol2: Stateful encryption

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 20 / 48

Page 78: Encryption and Message Authentication - BIU

Is CPA security realizable?

Theorem

If the encryption algorithm is a deterministic function Ek(m) then itis insecure under chosen plaintext attacks (even if the adversarymakes only one CPA query).

How can you prove it?

Does it mean that security under multiple messages cannot beachieved?Q: How to bypass the limitation?

Sol1: Randomized encryptionSol2: Stateful encryption

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 20 / 48

Page 79: Encryption and Message Authentication - BIU

Is CPA security realizable?

Theorem

If the encryption algorithm is a deterministic function Ek(m) then itis insecure under chosen plaintext attacks (even if the adversarymakes only one CPA query).

How can you prove it?

Does it mean that security under multiple messages cannot beachieved?Q: How to bypass the limitation?Sol1: Randomized encryptionSol2: Stateful encryption

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 20 / 48

Page 80: Encryption and Message Authentication - BIU

Encrypting via Ideal Cipher

• Suppose that Alice and Bob share a truly random function

R : {0, 1}n → {0, 1}n.

I For each input x ∈ {0, 1}n choose R(x)R← {0, 1}n.

• How can we encrypt? Encrypt a message m by R(m).

• Decryption?

• Let’s further assume that R is invertible, or even a permutation,hence R−1 : {0, 1}n → {0, 1}n is used for decryption.

• Security?

• OK for (single-message) “Ciphertext Indistinguishability”

• How to achieve CPA security? Randomize the message !

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 21 / 48

Page 81: Encryption and Message Authentication - BIU

Encrypting via Ideal Cipher

• Suppose that Alice and Bob share a truly random function

R : {0, 1}n → {0, 1}n.

I For each input x ∈ {0, 1}n choose R(x)R← {0, 1}n.

• How can we encrypt?

Encrypt a message m by R(m).

• Decryption?

• Let’s further assume that R is invertible, or even a permutation,hence R−1 : {0, 1}n → {0, 1}n is used for decryption.

• Security?

• OK for (single-message) “Ciphertext Indistinguishability”

• How to achieve CPA security? Randomize the message !

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 21 / 48

Page 82: Encryption and Message Authentication - BIU

Encrypting via Ideal Cipher

• Suppose that Alice and Bob share a truly random function

R : {0, 1}n → {0, 1}n.

I For each input x ∈ {0, 1}n choose R(x)R← {0, 1}n.

• How can we encrypt? Encrypt a message m by R(m).

• Decryption?

• Let’s further assume that R is invertible, or even a permutation,hence R−1 : {0, 1}n → {0, 1}n is used for decryption.

• Security?

• OK for (single-message) “Ciphertext Indistinguishability”

• How to achieve CPA security? Randomize the message !

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 21 / 48

Page 83: Encryption and Message Authentication - BIU

Encrypting via Ideal Cipher

• Suppose that Alice and Bob share a truly random function

R : {0, 1}n → {0, 1}n.

I For each input x ∈ {0, 1}n choose R(x)R← {0, 1}n.

• How can we encrypt? Encrypt a message m by R(m).

• Decryption?

• Let’s further assume that R is invertible, or even a permutation,hence R−1 : {0, 1}n → {0, 1}n is used for decryption.

• Security?

• OK for (single-message) “Ciphertext Indistinguishability”

• How to achieve CPA security? Randomize the message !

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 21 / 48

Page 84: Encryption and Message Authentication - BIU

Encrypting via Ideal Cipher

• Suppose that Alice and Bob share a truly random function

R : {0, 1}n → {0, 1}n.

I For each input x ∈ {0, 1}n choose R(x)R← {0, 1}n.

• How can we encrypt? Encrypt a message m by R(m).

• Decryption?

• Let’s further assume that R is invertible, or even a permutation,hence R−1 : {0, 1}n → {0, 1}n is used for decryption.

• Security?

• OK for (single-message) “Ciphertext Indistinguishability”

• How to achieve CPA security? Randomize the message !

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 21 / 48

Page 85: Encryption and Message Authentication - BIU

Encrypting via Ideal Cipher

• Suppose that Alice and Bob share a truly random function

R : {0, 1}n → {0, 1}n.

I For each input x ∈ {0, 1}n choose R(x)R← {0, 1}n.

• How can we encrypt? Encrypt a message m by R(m).

• Decryption?

• Let’s further assume that R is invertible, or even a permutation,hence R−1 : {0, 1}n → {0, 1}n is used for decryption.

• Security?

• OK for (single-message) “Ciphertext Indistinguishability”

• How to achieve CPA security? Randomize the message !

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 21 / 48

Page 86: Encryption and Message Authentication - BIU

Encrypting via Ideal Cipher

• Suppose that Alice and Bob share a truly random function

R : {0, 1}n → {0, 1}n.

I For each input x ∈ {0, 1}n choose R(x)R← {0, 1}n.

• How can we encrypt? Encrypt a message m by R(m).

• Decryption?

• Let’s further assume that R is invertible, or even a permutation,hence R−1 : {0, 1}n → {0, 1}n is used for decryption.

• Security?

• OK for (single-message) “Ciphertext Indistinguishability”

• How to achieve CPA security? Randomize the message !

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 21 / 48

Page 87: Encryption and Message Authentication - BIU

Encrypting via Ideal Cipher

• Suppose that Alice and Bob share a truly random function

R : {0, 1}n → {0, 1}n.

I For each input x ∈ {0, 1}n choose R(x)R← {0, 1}n.

• How can we encrypt? Encrypt a message m by R(m).

• Decryption?

• Let’s further assume that R is invertible, or even a permutation,hence R−1 : {0, 1}n → {0, 1}n is used for decryption.

• Security?

• OK for (single-message) “Ciphertext Indistinguishability”

• How to achieve CPA security?

Randomize the message !

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 21 / 48

Page 88: Encryption and Message Authentication - BIU

Encrypting via Ideal Cipher

• Suppose that Alice and Bob share a truly random function

R : {0, 1}n → {0, 1}n.

I For each input x ∈ {0, 1}n choose R(x)R← {0, 1}n.

• How can we encrypt? Encrypt a message m by R(m).

• Decryption?

• Let’s further assume that R is invertible, or even a permutation,hence R−1 : {0, 1}n → {0, 1}n is used for decryption.

• Security?

• OK for (single-message) “Ciphertext Indistinguishability”

• How to achieve CPA security? Randomize the message !

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 21 / 48

Page 89: Encryption and Message Authentication - BIU

CPA Security from Random Permutation

(Inefficient) Construction

Encrypt m: choose rR← {0, 1}n and output (r, F (r

⊕m))

Decrypt (r, c) compute r⊕F−1(c).

Theorem

If F is random the scheme is CPA secure.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 22 / 48

Page 90: Encryption and Message Authentication - BIU

CPA Security from Random Permutation

(Inefficient) Construction

Encrypt m: choose rR← {0, 1}n and output (r, F (r

⊕m))

Decrypt (r, c) compute r⊕F−1(c).

Theorem

If F is random the scheme is CPA secure.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 22 / 48

Page 91: Encryption and Message Authentication - BIU

CPA Security from Random Permutation

(Inefficient) Construction

Encrypt m: choose rR← {0, 1}n and output (r, F (r

⊕m))

Decrypt (r, c) compute r⊕F−1(c).

Proof.

The adversary makes at most t = poly(n) queries.The i-th query xi is encrypted by (ri, ci = F (xi

⊕ri)).

The challenge mb is encrypted by (r∗, c∗ = F (mb⊕r∗)).

Good event G: (m0⊕r∗) and (m1

⊕r∗) not in {xi

⊕ri}

Prr∗ [G] ≥ 1− 2t/2n = 1− neg(n).

If G happens, then conditioned on all seen ciphertexts,(r∗, F (m0

⊕r∗)) ≡ (r∗, F (m1

⊕r∗)).

Overall, the winning probability is upper-bounded byPr[win|G] Pr[G] + Pr[G] ≤ 1

2 + neg(n).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 23 / 48

Page 92: Encryption and Message Authentication - BIU

CPA Security from Random Permutation

(Inefficient) Construction

Encrypt m: choose rR← {0, 1}n and output (r, F (r

⊕m))

Decrypt (r, c) compute r⊕F−1(c).

Proof.

The adversary makes at most t = poly(n) queries.The i-th query xi is encrypted by (ri, ci = F (xi

⊕ri)).

The challenge mb is encrypted by (r∗, c∗ = F (mb⊕r∗)).

Good event G: (m0⊕r∗) and (m1

⊕r∗) not in {xi

⊕ri}

Prr∗ [G] ≥ 1− 2t/2n = 1− neg(n).

If G happens, then conditioned on all seen ciphertexts,(r∗, F (m0

⊕r∗)) ≡ (r∗, F (m1

⊕r∗)).

Overall, the winning probability is upper-bounded byPr[win|G] Pr[G] + Pr[G] ≤ 1

2 + neg(n).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 23 / 48

Page 93: Encryption and Message Authentication - BIU

CPA Security from Random Permutation

(Inefficient) Construction

Encrypt m: choose rR← {0, 1}n and output (r, F (r

⊕m))

Decrypt (r, c) compute r⊕F−1(c).

Proof.

The adversary makes at most t = poly(n) queries.The i-th query xi is encrypted by (ri, ci = F (xi

⊕ri)).

The challenge mb is encrypted by (r∗, c∗ = F (mb⊕r∗)).

Good event G: (m0⊕r∗) and (m1

⊕r∗) not in {xi

⊕ri}

Prr∗ [G] ≥ 1− 2t/2n = 1− neg(n).

If G happens, then conditioned on all seen ciphertexts,(r∗, F (m0

⊕r∗)) ≡ (r∗, F (m1

⊕r∗)).

Overall, the winning probability is upper-bounded byPr[win|G] Pr[G] + Pr[G] ≤ 1

2 + neg(n).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 23 / 48

Page 94: Encryption and Message Authentication - BIU

CPA Security from Random Permutation

(Inefficient) Construction

Encrypt m: choose rR← {0, 1}n and output (r, F (r

⊕m))

Decrypt (r, c) compute r⊕F−1(c).

Proof.

The adversary makes at most t = poly(n) queries.The i-th query xi is encrypted by (ri, ci = F (xi

⊕ri)).

The challenge mb is encrypted by (r∗, c∗ = F (mb⊕r∗)).

Good event G: (m0⊕r∗) and (m1

⊕r∗) not in {xi

⊕ri}

Prr∗ [G] ≥ 1− 2t/2n = 1− neg(n).

If G happens, then conditioned on all seen ciphertexts,(r∗, F (m0

⊕r∗)) ≡ (r∗, F (m1

⊕r∗)).

Overall, the winning probability is upper-bounded byPr[win|G] Pr[G] + Pr[G] ≤ 1

2 + neg(n).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 23 / 48

Page 95: Encryption and Message Authentication - BIU

CPA Security from Random Permutation

(Inefficient) Construction

Encrypt m: choose rR← {0, 1}n and output (r, F (r

⊕m))

Decrypt (r, c) compute r⊕F−1(c).

Proof.

The adversary makes at most t = poly(n) queries.The i-th query xi is encrypted by (ri, ci = F (xi

⊕ri)).

The challenge mb is encrypted by (r∗, c∗ = F (mb⊕r∗)).

Good event G: (m0⊕r∗) and (m1

⊕r∗) not in {xi

⊕ri}

Prr∗ [G] ≥ 1− 2t/2n = 1− neg(n).

If G happens, then conditioned on all seen ciphertexts,(r∗, F (m0

⊕r∗)) ≡ (r∗, F (m1

⊕r∗)).

Overall, the winning probability is upper-bounded byPr[win|G] Pr[G] + Pr[G] ≤ 1

2 + neg(n).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 23 / 48

Page 96: Encryption and Message Authentication - BIU

CPA Security from Random Permutation

(Inefficient) Construction

Encrypt m: choose rR← {0, 1}n and output (r, F (r

⊕m))

Decrypt (r, c) compute r⊕F−1(c).

Proof.

The adversary makes at most t = poly(n) queries.The i-th query xi is encrypted by (ri, ci = F (xi

⊕ri)).

The challenge mb is encrypted by (r∗, c∗ = F (mb⊕r∗)).

Good event G: (m0⊕r∗) and (m1

⊕r∗) not in {xi

⊕ri}

Prr∗ [G] ≥ 1− 2t/2n = 1− neg(n).

If G happens, then conditioned on all seen ciphertexts,(r∗, F (m0

⊕r∗)) ≡ (r∗, F (m1

⊕r∗)).

Overall, the winning probability is upper-bounded byPr[win|G] Pr[G] + Pr[G] ≤ 1

2 + neg(n).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 23 / 48

Page 97: Encryption and Message Authentication - BIU

CPA Security from Random Permutation

(Inefficient) Construction

Encrypt m: choose rR← {0, 1}n and output (r, F (r

⊕m))

Decrypt (r, c) compute r⊕F−1(c).

Proof.

The adversary makes at most t = poly(n) queries.The i-th query xi is encrypted by (ri, ci = F (xi

⊕ri)).

The challenge mb is encrypted by (r∗, c∗ = F (mb⊕r∗)).

Good event G: (m0⊕r∗) and (m1

⊕r∗) not in {xi

⊕ri}

Prr∗ [G] ≥ 1− 2t/2n = 1− neg(n).

If G happens, then conditioned on all seen ciphertexts,(r∗, F (m0

⊕r∗)) ≡ (r∗, F (m1

⊕r∗)).

Overall, the winning probability is upper-bounded byPr[win|G] Pr[G] + Pr[G] ≤ 1

2 + neg(n).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 23 / 48

Page 98: Encryption and Message Authentication - BIU

Pseudorandom Functions (Reminder)

Given a black-box access to the function, it’s infeasible to distinguishrandom function from pseudorandom function.

PRF

Let kR← {0, 1}n

Given x output y = Fk(x)

c≡

Random Function

Choose random function

R : {0, 1}n → {0, 1}n

Given x output y = R(x)

PPT Adversary can’t distinguish with more than negligible probability.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 24 / 48

Page 99: Encryption and Message Authentication - BIU

Pseudorandom Functions (Reminder)

Given a black-box access to the function, it’s infeasible to distinguishrandom function from pseudorandom function.

PRF

Let kR← {0, 1}n

Given x output y = Fk(x)

c≡

Random Function

Choose random function

R : {0, 1}n → {0, 1}n

Given x output y = R(x)

PPT Adversary can’t distinguish with more than negligible probability.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 24 / 48

Page 100: Encryption and Message Authentication - BIU

Pseudorandom Functions (Reminder)

Given a black-box access to the function, it’s infeasible to distinguishrandom function from pseudorandom function.

PRF

Let kR← {0, 1}n

Given x output y = Fk(x)

c≡

Random Function

Choose random function

R : {0, 1}n → {0, 1}n

Given x output y = R(x)

PPT Adversary can’t distinguish with more than negligible probability.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 24 / 48

Page 101: Encryption and Message Authentication - BIU

CPA Security from Pseudorandom Permutation

Construction

Encrypt m: choose rR← {0, 1}n and output (r, Fk(r

⊕m))

Decrypt (r, c) compute r⊕F−1k (c).

Theorem

If F is pseudorandom permutation the scheme is CPA secure.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 25 / 48

Page 102: Encryption and Message Authentication - BIU

CPA Security from Pseudorandom Permutation

Construction

Encrypt m: choose rR← {0, 1}n and output (r, Fk(r

⊕m))

Decrypt (r, c) compute r⊕F−1k (c).

Theorem

If F is pseudorandom permutation the scheme is CPA secure.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 25 / 48

Page 103: Encryption and Message Authentication - BIU

CPA Security from PRP (Proof)

Construction

Encrypt m: choose rR← {0, 1}n and output (r, Fk(r

⊕m))

Decrypt (r, c) compute r⊕F−1k (c).

Proof by reduction: Convert a CPA attacker A with successprobability 1

2 + ε into an ε′-distinguisher B for the PRP.

Adversary BG (G is either Fk or Random))

Invoke AAnswer a query xi with (ri

R← {0, 1}n, G(ri⊕xi)).

Given (m0,m1), send (r∗R← {0, 1}n, G(r∗

⊕mb)) where

bR← {0, 1} .

Output 1 if A’s guess b′ equals to b.

Prk[BFk = 1]−Pr[BRand = 1] ≥ (12 + ε)− (12 +neg(n)) ≥ ε−neg(n).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 26 / 48

Page 104: Encryption and Message Authentication - BIU

CPA Security from PRP (Proof)

Construction

Encrypt m: choose rR← {0, 1}n and output (r, Fk(r

⊕m))

Decrypt (r, c) compute r⊕F−1k (c).

Proof by reduction: Convert a CPA attacker A with successprobability 1

2 + ε into an ε′-distinguisher B for the PRP.

Adversary BG (G is either Fk or Random))

Invoke A

Answer a query xi with (riR← {0, 1}n, G(ri

⊕xi)).

Given (m0,m1), send (r∗R← {0, 1}n, G(r∗

⊕mb)) where

bR← {0, 1} .

Output 1 if A’s guess b′ equals to b.

Prk[BFk = 1]−Pr[BRand = 1] ≥ (12 + ε)− (12 +neg(n)) ≥ ε−neg(n).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 26 / 48

Page 105: Encryption and Message Authentication - BIU

CPA Security from PRP (Proof)

Construction

Encrypt m: choose rR← {0, 1}n and output (r, Fk(r

⊕m))

Decrypt (r, c) compute r⊕F−1k (c).

Proof by reduction: Convert a CPA attacker A with successprobability 1

2 + ε into an ε′-distinguisher B for the PRP.

Adversary BG (G is either Fk or Random))

Invoke AAnswer a query xi with (ri

R← {0, 1}n, G(ri⊕xi)).

Given (m0,m1), send (r∗R← {0, 1}n, G(r∗

⊕mb)) where

bR← {0, 1} .

Output 1 if A’s guess b′ equals to b.

Prk[BFk = 1]−Pr[BRand = 1] ≥ (12 + ε)− (12 +neg(n)) ≥ ε−neg(n).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 26 / 48

Page 106: Encryption and Message Authentication - BIU

CPA Security from PRP (Proof)

Construction

Encrypt m: choose rR← {0, 1}n and output (r, Fk(r

⊕m))

Decrypt (r, c) compute r⊕F−1k (c).

Proof by reduction: Convert a CPA attacker A with successprobability 1

2 + ε into an ε′-distinguisher B for the PRP.

Adversary BG (G is either Fk or Random))

Invoke AAnswer a query xi with (ri

R← {0, 1}n, G(ri⊕xi)).

Given (m0,m1), send (r∗R← {0, 1}n, G(r∗

⊕mb)) where

bR← {0, 1} .

Output 1 if A’s guess b′ equals to b.

Prk[BFk = 1]−Pr[BRand = 1] ≥ (12 + ε)− (12 +neg(n)) ≥ ε−neg(n).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 26 / 48

Page 107: Encryption and Message Authentication - BIU

CPA Security from PRP (Proof)

Construction

Encrypt m: choose rR← {0, 1}n and output (r, Fk(r

⊕m))

Decrypt (r, c) compute r⊕F−1k (c).

Proof by reduction: Convert a CPA attacker A with successprobability 1

2 + ε into an ε′-distinguisher B for the PRP.

Adversary BG (G is either Fk or Random))

Invoke AAnswer a query xi with (ri

R← {0, 1}n, G(ri⊕xi)).

Given (m0,m1), send (r∗R← {0, 1}n, G(r∗

⊕mb)) where

bR← {0, 1} .

Output 1 if A’s guess b′ equals to b.

Prk[BFk = 1]−Pr[BRand = 1] ≥ (12 + ε)− (12 +neg(n)) ≥ ε−neg(n).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 26 / 48

Page 108: Encryption and Message Authentication - BIU

CPA Security from PRP (Proof)

Construction

Encrypt m: choose rR← {0, 1}n and output (r, Fk(r

⊕m))

Decrypt (r, c) compute r⊕F−1k (c).

Proof by reduction: Convert a CPA attacker A with successprobability 1

2 + ε into an ε′-distinguisher B for the PRP.

Adversary BG (G is either Fk or Random))

Invoke AAnswer a query xi with (ri

R← {0, 1}n, G(ri⊕xi)).

Given (m0,m1), send (r∗R← {0, 1}n, G(r∗

⊕mb)) where

bR← {0, 1} .

Output 1 if A’s guess b′ equals to b.

Prk[BFk = 1]−Pr[BRand = 1] ≥ (12 + ε)− (12 +neg(n)) ≥ ε−neg(n).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 26 / 48

Page 109: Encryption and Message Authentication - BIU

CPA Security from PRP (Proof)

Construction

Encrypt m: choose rR← {0, 1}n and output (r, Fk(r

⊕m))

Decrypt (r, c) compute r⊕F−1k (c).

Proof by reduction: Convert a CPA attacker A with successprobability 1

2 + ε into an ε′-distinguisher B for the PRP.

Adversary BG (G is either Fk or Random))

Invoke AAnswer a query xi with (ri

R← {0, 1}n, G(ri⊕xi)).

Given (m0,m1), send (r∗R← {0, 1}n, G(r∗

⊕mb)) where

bR← {0, 1} .

Output 1 if A’s guess b′ equals to b.

Prk[BFk = 1]−Pr[BRand = 1] ≥ (12 + ε)− (12 +neg(n)) ≥ ε−neg(n).Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 26 / 48

Page 110: Encryption and Message Authentication - BIU

CPA Security from Pseudorandom Function

Alternative Construction

Encrypt m: choose rR← {0, 1}n and output (r, Fk(r)

⊕m)

Decrypt (r, c) compute Fk(r)⊕c. (No need to invert F )

Exercise prove:

Theorem

If F is pseudorandom function the scheme is CPA secure.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 27 / 48

Page 111: Encryption and Message Authentication - BIU

CPA Security from Pseudorandom Function

Alternative Construction

Encrypt m: choose rR← {0, 1}n and output (r, Fk(r)

⊕m)

Decrypt (r, c) compute Fk(r)⊕c. (No need to invert F )

Exercise prove:

Theorem

If F is pseudorandom function the scheme is CPA secure.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 27 / 48

Page 112: Encryption and Message Authentication - BIU

CPA Security from Pseudorandom Function

Alternative Construction

Encrypt m: choose rR← {0, 1}n and output (r, Fk(r)

⊕m)

Decrypt (r, c) compute Fk(r)⊕c. (No need to invert F )

Exercise prove:

Theorem

If F is pseudorandom function the scheme is CPA secure.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 27 / 48

Page 113: Encryption and Message Authentication - BIU

How to encrypt long messages?

• Pseudorandom functions/permutations operate on blocks offixed length (e.g., 128 bits).

• How to encrypt long messages ?

• We can apply the previous constructions to each blockseparately but we’ll get poor rate (ciphertext is twice as large asthe message)

• Is there a better solution?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 28 / 48

Page 114: Encryption and Message Authentication - BIU

How to encrypt long messages?

• Pseudorandom functions/permutations operate on blocks offixed length (e.g., 128 bits).

• How to encrypt long messages ?

• We can apply the previous constructions to each blockseparately but we’ll get poor rate (ciphertext is twice as large asthe message)

• Is there a better solution?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 28 / 48

Page 115: Encryption and Message Authentication - BIU

How to encrypt long messages?

• Pseudorandom functions/permutations operate on blocks offixed length (e.g., 128 bits).

• How to encrypt long messages ?

• We can apply the previous constructions to each blockseparately but we’ll get poor rate (ciphertext is twice as large asthe message)

• Is there a better solution?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 28 / 48

Page 116: Encryption and Message Authentication - BIU

How to encrypt long messages?

• Pseudorandom functions/permutations operate on blocks offixed length (e.g., 128 bits).

• How to encrypt long messages ?

• We can apply the previous constructions to each blockseparately but we’ll get poor rate (ciphertext is twice as large asthe message)

• Is there a better solution?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 28 / 48

Page 117: Encryption and Message Authentication - BIU

CBC Mode Encryption

Ek is a Pseudorandom permutation, Pi is the i-th block of themessage, and S0 is a random seed (aka initialization vector (IV)).

The ciphertext is (S0, C1, . . . , Cn), the rate tends to 1 for longmessages.

For a single block, we get the standard PRP-based Construction.

New message requires a freshly chosen random seed (why?)

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 29 / 48

Page 118: Encryption and Message Authentication - BIU

CBC Mode Encryption

Ek is a Pseudorandom permutation, Pi is the i-th block of themessage, and S0 is a random seed (aka initialization vector (IV)).

The ciphertext is (S0, C1, . . . , Cn), the rate tends to 1 for longmessages.

For a single block, we get the standard PRP-based Construction.

New message requires a freshly chosen random seed (why?)

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 29 / 48

Page 119: Encryption and Message Authentication - BIU

CBC Mode Encryption

Ek is a Pseudorandom permutation, Pi is the i-th block of themessage, and S0 is a random seed (aka initialization vector (IV)).

The ciphertext is (S0, C1, . . . , Cn), the rate tends to 1 for longmessages.

For a single block, we get the standard PRP-based Construction.

New message requires a freshly chosen random seed (why?)

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 29 / 48

Page 120: Encryption and Message Authentication - BIU

CBC Mode Encryption

Ek is a Pseudorandom permutation, Pi is the i-th block of themessage, and S0 is a random seed (aka initialization vector (IV)).

The ciphertext is (S0, C1, . . . , Cn), the rate tends to 1 for longmessages.

For a single block, we get the standard PRP-based Construction.

New message requires a freshly chosen random seed (why?)

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 29 / 48

Page 121: Encryption and Message Authentication - BIU

Properties of CBC

• Encryption seems inherently sequential – no parallelimplementation known.

• Decryption is parallel – can decrypt the i-th block directly

• Standard in most systems: SSL, IPSec, etc.

Security: It can be proved that if E is a pseudorandom permutation,then CBC is resistant to chosen plaintext attacks (CPA-secure).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 30 / 48

Page 122: Encryption and Message Authentication - BIU

Properties of CBC

• Encryption seems inherently sequential – no parallelimplementation known.

• Decryption is parallel – can decrypt the i-th block directly

• Standard in most systems: SSL, IPSec, etc.

Security: It can be proved that if E is a pseudorandom permutation,then CBC is resistant to chosen plaintext attacks (CPA-secure).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 30 / 48

Page 123: Encryption and Message Authentication - BIU

Properties of CBC

• Encryption seems inherently sequential – no parallelimplementation known.

• Decryption is parallel – can decrypt the i-th block directly

• Standard in most systems: SSL, IPSec, etc.

Security: It can be proved that if E is a pseudorandom permutation,then CBC is resistant to chosen plaintext attacks (CPA-secure).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 30 / 48

Page 124: Encryption and Message Authentication - BIU

Properties of CBC

• Encryption seems inherently sequential – no parallelimplementation known.

• Decryption is parallel – can decrypt the i-th block directly

• Standard in most systems: SSL, IPSec, etc.

Security: It can be proved that if E is a pseudorandom permutation,then CBC is resistant to chosen plaintext attacks (CPA-secure).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 30 / 48

Page 125: Encryption and Message Authentication - BIU

Properties of CBC

• Encryption seems inherently sequential – no parallelimplementation known.

• Decryption is parallel – can decrypt the i-th block directly

• Standard in most systems: SSL, IPSec, etc.

Security: It can be proved that if E is a pseudorandom permutation,then CBC is resistant to chosen plaintext attacks (CPA-secure).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 30 / 48

Page 126: Encryption and Message Authentication - BIU

Properties of CBC

• Encryption seems inherently sequential – no parallelimplementation known.

• Decryption is parallel – can decrypt the i-th block directly

• Standard in most systems: SSL, IPSec, etc.

Security: It can be proved that if E is a pseudorandom permutation,then CBC is resistant to chosen plaintext attacks (CPA-secure).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 30 / 48

Page 127: Encryption and Message Authentication - BIU

Properties of CBC

• Encryption seems inherently sequential – no parallelimplementation known.

• Decryption is parallel – can decrypt the i-th block directly

• Standard in most systems: SSL, IPSec, etc.

Security: It can be proved that if E is a pseudorandom permutation,then CBC is resistant to chosen plaintext attacks (CPA-secure).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 30 / 48

Page 128: Encryption and Message Authentication - BIU

Properties of CBC

• Encryption seems inherently sequential – no parallelimplementation known.

• Decryption is parallel – can decrypt the i-th block directly

• Standard in most systems: SSL, IPSec, etc.

Security: It can be proved that if E is a pseudorandom permutation,then CBC is resistant to chosen plaintext attacks (CPA-secure).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 30 / 48

Page 129: Encryption and Message Authentication - BIU

Message Authentication Codes

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 31 / 48

Page 130: Encryption and Message Authentication - BIU

Message Authentication Codes

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 31 / 48

Page 131: Encryption and Message Authentication - BIU

Authentication – GoalEnsure integrity of messages against an active adversary

• Adversary hears previous genuine messages

• (May even influence the content of genuine messages)

• Then sends own forged message(s).

• Bob (receiver) should be able to tell genuine messages fromforged ones.

Important Remark: Authentication is orthogonal to secrecy. Secrecyalone usually does not guarantee integrity.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 32 / 48

Page 132: Encryption and Message Authentication - BIU

Authentication – GoalEnsure integrity of messages against an active adversary

• Adversary hears previous genuine messages

• (May even influence the content of genuine messages)

• Then sends own forged message(s).

• Bob (receiver) should be able to tell genuine messages fromforged ones.

Important Remark: Authentication is orthogonal to secrecy. Secrecyalone usually does not guarantee integrity.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 32 / 48

Page 133: Encryption and Message Authentication - BIU

Authentication – GoalEnsure integrity of messages against an active adversary

• Adversary hears previous genuine messages

• (May even influence the content of genuine messages)

• Then sends own forged message(s).

• Bob (receiver) should be able to tell genuine messages fromforged ones.

Important Remark: Authentication is orthogonal to secrecy. Secrecyalone usually does not guarantee integrity.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 32 / 48

Page 134: Encryption and Message Authentication - BIU

Authentication – GoalEnsure integrity of messages against an active adversary

• Adversary hears previous genuine messages

• (May even influence the content of genuine messages)

• Then sends own forged message(s).

• Bob (receiver) should be able to tell genuine messages fromforged ones.

Important Remark: Authentication is orthogonal to secrecy. Secrecyalone usually does not guarantee integrity.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 32 / 48

Page 135: Encryption and Message Authentication - BIU

Authentication – GoalEnsure integrity of messages against an active adversary

• Adversary hears previous genuine messages

• (May even influence the content of genuine messages)

• Then sends own forged message(s).

• Bob (receiver) should be able to tell genuine messages fromforged ones.

Important Remark: Authentication is orthogonal to secrecy. Secrecyalone usually does not guarantee integrity.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 32 / 48

Page 136: Encryption and Message Authentication - BIU

Authentication – GoalEnsure integrity of messages against an active adversary

• Adversary hears previous genuine messages

• (May even influence the content of genuine messages)

• Then sends own forged message(s).

• Bob (receiver) should be able to tell genuine messages fromforged ones.

Important Remark: Authentication is orthogonal to secrecy. Secrecyalone usually does not guarantee integrity.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 32 / 48

Page 137: Encryption and Message Authentication - BIU

Sol: Message Authentication Code (MAC)

Idea: Alice and Bob share a secret key. Alice append to each messagem an authentication tag MACk(m) = tag. Bob verifies authenticityby comparing MACk(m) to tag.

Definition (Message Authentication Code)

• Message space M (usually long binary strings, e.g., {0, 1}∗)• Secret authentication key – k ∈ {0, 1}n

• Authentication algorithm – MACk(m) 7→ tag

• Typically, tag ∈ {0, 1}` where ` is relatively short

Remark: the MAC function is not 1-to-1 (why?)Security: Intuitively, should be hard to forge a valid tag even afterseeing many legal tags

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 33 / 48

Page 138: Encryption and Message Authentication - BIU

Sol: Message Authentication Code (MAC)

Idea: Alice and Bob share a secret key. Alice append to each messagem an authentication tag MACk(m) = tag. Bob verifies authenticityby comparing MACk(m) to tag.

Definition (Message Authentication Code)

• Message space M (usually long binary strings, e.g., {0, 1}∗)

• Secret authentication key – k ∈ {0, 1}n

• Authentication algorithm – MACk(m) 7→ tag

• Typically, tag ∈ {0, 1}` where ` is relatively short

Remark: the MAC function is not 1-to-1 (why?)Security: Intuitively, should be hard to forge a valid tag even afterseeing many legal tags

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 33 / 48

Page 139: Encryption and Message Authentication - BIU

Sol: Message Authentication Code (MAC)

Idea: Alice and Bob share a secret key. Alice append to each messagem an authentication tag MACk(m) = tag. Bob verifies authenticityby comparing MACk(m) to tag.

Definition (Message Authentication Code)

• Message space M (usually long binary strings, e.g., {0, 1}∗)• Secret authentication key – k ∈ {0, 1}n

• Authentication algorithm – MACk(m) 7→ tag

• Typically, tag ∈ {0, 1}` where ` is relatively short

Remark: the MAC function is not 1-to-1 (why?)Security: Intuitively, should be hard to forge a valid tag even afterseeing many legal tags

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 33 / 48

Page 140: Encryption and Message Authentication - BIU

Sol: Message Authentication Code (MAC)

Idea: Alice and Bob share a secret key. Alice append to each messagem an authentication tag MACk(m) = tag. Bob verifies authenticityby comparing MACk(m) to tag.

Definition (Message Authentication Code)

• Message space M (usually long binary strings, e.g., {0, 1}∗)• Secret authentication key – k ∈ {0, 1}n

• Authentication algorithm – MACk(m) 7→ tag

• Typically, tag ∈ {0, 1}` where ` is relatively short

Remark: the MAC function is not 1-to-1 (why?)Security: Intuitively, should be hard to forge a valid tag even afterseeing many legal tags

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 33 / 48

Page 141: Encryption and Message Authentication - BIU

Sol: Message Authentication Code (MAC)

Idea: Alice and Bob share a secret key. Alice append to each messagem an authentication tag MACk(m) = tag. Bob verifies authenticityby comparing MACk(m) to tag.

Definition (Message Authentication Code)

• Message space M (usually long binary strings, e.g., {0, 1}∗)• Secret authentication key – k ∈ {0, 1}n

• Authentication algorithm – MACk(m) 7→ tag

• Typically, tag ∈ {0, 1}` where ` is relatively short

Remark: the MAC function is not 1-to-1 (why?)Security: Intuitively, should be hard to forge a valid tag even afterseeing many legal tags

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 33 / 48

Page 142: Encryption and Message Authentication - BIU

Sol: Message Authentication Code (MAC)

Idea: Alice and Bob share a secret key. Alice append to each messagem an authentication tag MACk(m) = tag. Bob verifies authenticityby comparing MACk(m) to tag.

Definition (Message Authentication Code)

• Message space M (usually long binary strings, e.g., {0, 1}∗)• Secret authentication key – k ∈ {0, 1}n

• Authentication algorithm – MACk(m) 7→ tag

• Typically, tag ∈ {0, 1}` where ` is relatively short

Remark: the MAC function is not 1-to-1 (why?)Security: Intuitively, should be hard to forge a valid tag even afterseeing many legal tags

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 33 / 48

Page 143: Encryption and Message Authentication - BIU

Sol: Message Authentication Code (MAC)

Idea: Alice and Bob share a secret key. Alice append to each messagem an authentication tag MACk(m) = tag. Bob verifies authenticityby comparing MACk(m) to tag.

Definition (Message Authentication Code)

• Message space M (usually long binary strings, e.g., {0, 1}∗)• Secret authentication key – k ∈ {0, 1}n

• Authentication algorithm – MACk(m) 7→ tag

• Typically, tag ∈ {0, 1}` where ` is relatively short

Remark: the MAC function is not 1-to-1 (why?)

Security: Intuitively, should be hard to forge a valid tag even afterseeing many legal tags

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 33 / 48

Page 144: Encryption and Message Authentication - BIU

Sol: Message Authentication Code (MAC)

Idea: Alice and Bob share a secret key. Alice append to each messagem an authentication tag MACk(m) = tag. Bob verifies authenticityby comparing MACk(m) to tag.

Definition (Message Authentication Code)

• Message space M (usually long binary strings, e.g., {0, 1}∗)• Secret authentication key – k ∈ {0, 1}n

• Authentication algorithm – MACk(m) 7→ tag

• Typically, tag ∈ {0, 1}` where ` is relatively short

Remark: the MAC function is not 1-to-1 (why?)Security: Intuitively, should be hard to forge a valid tag even afterseeing many legal tags

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 33 / 48

Page 145: Encryption and Message Authentication - BIU

Security

Definition (Existential Forgery under Chosen Plaintext Attack)

A MAC is secure if every PPT adversary A which is allowed to askfor polynomially-many legal pairs (mi,MACk(mi)) (i = 1, 2, . . . , t),outputs a new valid pair (m,MACk(m)) with no more than negligibleprobability.

• The probability is taken over the choice of a random key

• Adversary can choose the messages

• The adversary succeeds even if the message being forged is“meaningless”. The reason is that it is hard to predict what hasand what does not have a meaning in an unknown context, andhow will Bob, the receiver, react to such successful forgery.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 34 / 48

Page 146: Encryption and Message Authentication - BIU

Security

Definition (Existential Forgery under Chosen Plaintext Attack)

A MAC is secure if every PPT adversary A which is allowed to askfor polynomially-many legal pairs (mi,MACk(mi)) (i = 1, 2, . . . , t),outputs a new valid pair (m,MACk(m)) with no more than negligibleprobability.

• The probability is taken over the choice of a random key

• Adversary can choose the messages

• The adversary succeeds even if the message being forged is“meaningless”. The reason is that it is hard to predict what hasand what does not have a meaning in an unknown context, andhow will Bob, the receiver, react to such successful forgery.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 34 / 48

Page 147: Encryption and Message Authentication - BIU

Security

Definition (Existential Forgery under Chosen Plaintext Attack)

A MAC is secure if every PPT adversary A which is allowed to askfor polynomially-many legal pairs (mi,MACk(mi)) (i = 1, 2, . . . , t),outputs a new valid pair (m,MACk(m)) with no more than negligibleprobability.

• The probability is taken over the choice of a random key

• Adversary can choose the messages

• The adversary succeeds even if the message being forged is“meaningless”. The reason is that it is hard to predict what hasand what does not have a meaning in an unknown context, andhow will Bob, the receiver, react to such successful forgery.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 34 / 48

Page 148: Encryption and Message Authentication - BIU

Security

Definition (Existential Forgery under Chosen Plaintext Attack)

A MAC is secure if every PPT adversary A which is allowed to askfor polynomially-many legal pairs (mi,MACk(mi)) (i = 1, 2, . . . , t),outputs a new valid pair (m,MACk(m)) with no more than negligibleprobability.

• The probability is taken over the choice of a random key

• Adversary can choose the messages

• The adversary succeeds even if the message being forged is“meaningless”. The reason is that it is hard to predict what hasand what does not have a meaning in an unknown context, andhow will Bob, the receiver, react to such successful forgery.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 34 / 48

Page 149: Encryption and Message Authentication - BIU

Security

Definition (Existential Forgery under Chosen Plaintext Attack)

A MAC is secure if every PPT adversary A which is allowed to askfor polynomially-many legal pairs (mi,MACk(mi)) (i = 1, 2, . . . , t),outputs a new valid pair (m,MACk(m)) with no more than negligibleprobability.

• The probability is taken over the choice of a random key

• Adversary can choose the messages

• The adversary succeeds even if the message being forged is“meaningless”. The reason is that it is hard to predict what hasand what does not have a meaning in an unknown context, andhow will Bob, the receiver, react to such successful forgery.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 34 / 48

Page 150: Encryption and Message Authentication - BIU

Security

Definition (Existential Forgery under Chosen Plaintext Attack)

A MAC is secure if every PPT adversary A which is allowed to askfor polynomially-many legal pairs (mi,MACk(mi)) (i = 1, 2, . . . , t),outputs a new valid pair (m,MACk(m)) with no more than negligibleprobability.

• The probability is taken over the choice of a random key

• Adversary can choose the messages

• The adversary succeeds even if the message being forged is“meaningless”. The reason is that it is hard to predict what hasand what does not have a meaning in an unknown context, andhow will Bob, the receiver, react to such successful forgery.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 34 / 48

Page 151: Encryption and Message Authentication - BIU

Trivial Attacks

Definition (Existential Forgery under Chosen Plaintext Attack)

A MAC is secure if every PPT adversary A which is allowed to askfor polynomially-many legal pairs (mi,MACk(mi)) (i = 1, 2, . . . , t),outputs a new valid pair (m,MACk(m)) with no more than negligibleprobability.

• Guess the `-bit tag of a message m – success probability 2−`.

• Guess the n-bit key and compute the tag a message m – successprobability 2−n.

• Conclusion: key and tag should not be too short

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 35 / 48

Page 152: Encryption and Message Authentication - BIU

Trivial Attacks

Definition (Existential Forgery under Chosen Plaintext Attack)

A MAC is secure if every PPT adversary A which is allowed to askfor polynomially-many legal pairs (mi,MACk(mi)) (i = 1, 2, . . . , t),outputs a new valid pair (m,MACk(m)) with no more than negligibleprobability.

• Guess the `-bit tag of a message m – success probability 2−`.

• Guess the n-bit key and compute the tag a message m – successprobability 2−n.

• Conclusion: key and tag should not be too short

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 35 / 48

Page 153: Encryption and Message Authentication - BIU

Trivial Attacks

Definition (Existential Forgery under Chosen Plaintext Attack)

A MAC is secure if every PPT adversary A which is allowed to askfor polynomially-many legal pairs (mi,MACk(mi)) (i = 1, 2, . . . , t),outputs a new valid pair (m,MACk(m)) with no more than negligibleprobability.

• Guess the `-bit tag of a message m – success probability 2−`.

• Guess the n-bit key and compute the tag a message m – successprobability 2−n.

• Conclusion: key and tag should not be too short

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 35 / 48

Page 154: Encryption and Message Authentication - BIU

Trivial Attacks

Definition (Existential Forgery under Chosen Plaintext Attack)

A MAC is secure if every PPT adversary A which is allowed to askfor polynomially-many legal pairs (mi,MACk(mi)) (i = 1, 2, . . . , t),outputs a new valid pair (m,MACk(m)) with no more than negligibleprobability.

• Guess the `-bit tag of a message m – success probability 2−`.

• Guess the n-bit key and compute the tag a message m – successprobability 2−n.

• Conclusion: key and tag should not be too short

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 35 / 48

Page 155: Encryption and Message Authentication - BIU

Trivial Attacks

Definition (Existential Forgery under Chosen Plaintext Attack)

A MAC is secure if every PPT adversary A which is allowed to askfor polynomially-many legal pairs (mi,MACk(mi)) (i = 1, 2, . . . , t),outputs a new valid pair (m,MACk(m)) with no more than negligibleprobability.

• Guess the `-bit tag of a message m – success probability 2−`.

• Guess the n-bit key and compute the tag a message m – successprobability 2−n.

• Conclusion: key and tag should not be too short

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 35 / 48

Page 156: Encryption and Message Authentication - BIU

MACs for Short Messages

• What would Shannon do?

• Claim: If MAC : {0, 1}n → {0, 1}` is a random function then itcannot be broken with probability better than 2−` (even if theadversary is computationally unbounded). Can you see why?

• In a computational setting can use pseudorandom function

• Theorem: A PRF is a secure MAC.

• Proof idea: If the PRF was truly random function then hard toforge, hence an adversary that breaks the MAC allows todistinguish the PRF from truly random function.

• Problem: PRFs are defined for a fixed length (“block”), but wewould like to support long messages!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 36 / 48

Page 157: Encryption and Message Authentication - BIU

MACs for Short Messages

• What would Shannon do?

• Claim: If MAC : {0, 1}n → {0, 1}` is a random function then itcannot be broken with probability better than 2−` (even if theadversary is computationally unbounded). Can you see why?

• In a computational setting can use pseudorandom function

• Theorem: A PRF is a secure MAC.

• Proof idea: If the PRF was truly random function then hard toforge, hence an adversary that breaks the MAC allows todistinguish the PRF from truly random function.

• Problem: PRFs are defined for a fixed length (“block”), but wewould like to support long messages!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 36 / 48

Page 158: Encryption and Message Authentication - BIU

MACs for Short Messages

• What would Shannon do?

• Claim: If MAC : {0, 1}n → {0, 1}` is a random function then itcannot be broken with probability better than 2−` (even if theadversary is computationally unbounded). Can you see why?

• In a computational setting can use pseudorandom function

• Theorem: A PRF is a secure MAC.

• Proof idea: If the PRF was truly random function then hard toforge, hence an adversary that breaks the MAC allows todistinguish the PRF from truly random function.

• Problem: PRFs are defined for a fixed length (“block”), but wewould like to support long messages!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 36 / 48

Page 159: Encryption and Message Authentication - BIU

MACs for Short Messages

• What would Shannon do?

• Claim: If MAC : {0, 1}n → {0, 1}` is a random function then itcannot be broken with probability better than 2−` (even if theadversary is computationally unbounded).

Can you see why?

• In a computational setting can use pseudorandom function

• Theorem: A PRF is a secure MAC.

• Proof idea: If the PRF was truly random function then hard toforge, hence an adversary that breaks the MAC allows todistinguish the PRF from truly random function.

• Problem: PRFs are defined for a fixed length (“block”), but wewould like to support long messages!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 36 / 48

Page 160: Encryption and Message Authentication - BIU

MACs for Short Messages

• What would Shannon do?

• Claim: If MAC : {0, 1}n → {0, 1}` is a random function then itcannot be broken with probability better than 2−` (even if theadversary is computationally unbounded).

Can you see why?

• In a computational setting can use pseudorandom function

• Theorem: A PRF is a secure MAC.

• Proof idea: If the PRF was truly random function then hard toforge, hence an adversary that breaks the MAC allows todistinguish the PRF from truly random function.

• Problem: PRFs are defined for a fixed length (“block”), but wewould like to support long messages!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 36 / 48

Page 161: Encryption and Message Authentication - BIU

MACs for Short Messages

• What would Shannon do?

• Claim: If MAC : {0, 1}n → {0, 1}` is a random function then itcannot be broken with probability better than 2−` (even if theadversary is computationally unbounded). Can you see why?

• In a computational setting can use pseudorandom function

• Theorem: A PRF is a secure MAC.

• Proof idea: If the PRF was truly random function then hard toforge, hence an adversary that breaks the MAC allows todistinguish the PRF from truly random function.

• Problem: PRFs are defined for a fixed length (“block”), but wewould like to support long messages!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 36 / 48

Page 162: Encryption and Message Authentication - BIU

MACs for Short Messages

• What would Shannon do?

• Claim: If MAC : {0, 1}n → {0, 1}` is a random function then itcannot be broken with probability better than 2−` (even if theadversary is computationally unbounded). Can you see why?

• In a computational setting can use pseudorandom function

• Theorem: A PRF is a secure MAC.

• Proof idea: If the PRF was truly random function then hard toforge, hence an adversary that breaks the MAC allows todistinguish the PRF from truly random function.

• Problem: PRFs are defined for a fixed length (“block”), but wewould like to support long messages!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 36 / 48

Page 163: Encryption and Message Authentication - BIU

MACs for Short Messages

• What would Shannon do?

• Claim: If MAC : {0, 1}n → {0, 1}` is a random function then itcannot be broken with probability better than 2−` (even if theadversary is computationally unbounded). Can you see why?

• In a computational setting can use pseudorandom function

• Theorem: A PRF is a secure MAC.

• Proof idea: If the PRF was truly random function then hard toforge, hence an adversary that breaks the MAC allows todistinguish the PRF from truly random function.

• Problem: PRFs are defined for a fixed length (“block”), but wewould like to support long messages!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 36 / 48

Page 164: Encryption and Message Authentication - BIU

MACs for Short Messages

• What would Shannon do?

• Claim: If MAC : {0, 1}n → {0, 1}` is a random function then itcannot be broken with probability better than 2−` (even if theadversary is computationally unbounded). Can you see why?

• In a computational setting can use pseudorandom function

• Theorem: A PRF is a secure MAC.

• Proof idea: If the PRF was truly random function then hard toforge, hence an adversary that breaks the MAC allows todistinguish the PRF from truly random function.

• Problem: PRFs are defined for a fixed length (“block”), but wewould like to support long messages!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 36 / 48

Page 165: Encryption and Message Authentication - BIU

MACs for Short Messages

• What would Shannon do?

• Claim: If MAC : {0, 1}n → {0, 1}` is a random function then itcannot be broken with probability better than 2−` (even if theadversary is computationally unbounded). Can you see why?

• In a computational setting can use pseudorandom function

• Theorem: A PRF is a secure MAC.

• Proof idea: If the PRF was truly random function then hard toforge, hence an adversary that breaks the MAC allows todistinguish the PRF from truly random function.

• Problem: PRFs are defined for a fixed length (“block”), but wewould like to support long messages!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 36 / 48

Page 166: Encryption and Message Authentication - BIU

MACs for Short Messages

• What would Shannon do?

• Claim: If MAC : {0, 1}n → {0, 1}` is a random function then itcannot be broken with probability better than 2−` (even if theadversary is computationally unbounded). Can you see why?

• In a computational setting can use pseudorandom function

• Theorem: A PRF is a secure MAC.

• Proof idea: If the PRF was truly random function then hard toforge, hence an adversary that breaks the MAC allows todistinguish the PRF from truly random function.

• Problem: PRFs are defined for a fixed length (“block”), but wewould like to support long messages!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 36 / 48

Page 167: Encryption and Message Authentication - BIU

MACs for Short Messages

• What would Shannon do?

• Claim: If MAC : {0, 1}n → {0, 1}` is a random function then itcannot be broken with probability better than 2−` (even if theadversary is computationally unbounded). Can you see why?

• In a computational setting can use pseudorandom function

• Theorem: A PRF is a secure MAC.

• Proof idea: If the PRF was truly random function then hard toforge, hence an adversary that breaks the MAC allows todistinguish the PRF from truly random function.

• Problem: PRFs are defined for a fixed length (“block”), but wewould like to support long messages!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 36 / 48

Page 168: Encryption and Message Authentication - BIU

MACs for Short Messages

• What would Shannon do?

• Claim: If MAC : {0, 1}n → {0, 1}` is a random function then itcannot be broken with probability better than 2−` (even if theadversary is computationally unbounded). Can you see why?

• In a computational setting can use pseudorandom function

• Theorem: A PRF is a secure MAC.

• Proof idea: If the PRF was truly random function then hard toforge, hence an adversary that breaks the MAC allows todistinguish the PRF from truly random function.

• Problem: PRFs are defined for a fixed length (“block”), but wewould like to support long messages!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 36 / 48

Page 169: Encryption and Message Authentication - BIU

MACs for Short Messages

• What would Shannon do?

• Claim: If MAC : {0, 1}n → {0, 1}` is a random function then itcannot be broken with probability better than 2−` (even if theadversary is computationally unbounded). Can you see why?

• In a computational setting can use pseudorandom function

• Theorem: A PRF is a secure MAC.

• Proof idea: If the PRF was truly random function then hard toforge, hence an adversary that breaks the MAC allows todistinguish the PRF from truly random function.

• Problem: PRFs are defined for a fixed length (“block”), but wewould like to support long messages!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 36 / 48

Page 170: Encryption and Message Authentication - BIU

How to authenticate Long Messages?

Let Fk : {0, 1}n → {0, 1}n be a pseudorandom function.

Suggestions: Define MACk(M1, . . . ,M`) as:

• (Fk(M1), . . . , Fk(M`))

• (Fk(1,M1), . . . , Fk(`,M`)).

• (r, Fk(r, 1,M1), . . . , Fk(r, `,M`)), where rR← {0, 1}n/3.

• (r, Fk(r, 1,M1, `), . . . , Fk(r, `,M`), `), where rR← {0, 1}n/4.

Thm: (only) the last construction is secure !Ex: Prove it.Problem: Impractical due to large communication overhead!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 37 / 48

Page 171: Encryption and Message Authentication - BIU

How to authenticate Long Messages?

Let Fk : {0, 1}n → {0, 1}n be a pseudorandom function.Suggestions: Define MACk(M1, . . . ,M`) as:

• (Fk(M1), . . . , Fk(M`))

• (Fk(1,M1), . . . , Fk(`,M`)).

• (r, Fk(r, 1,M1), . . . , Fk(r, `,M`)), where rR← {0, 1}n/3.

• (r, Fk(r, 1,M1, `), . . . , Fk(r, `,M`), `), where rR← {0, 1}n/4.

Thm: (only) the last construction is secure !Ex: Prove it.Problem: Impractical due to large communication overhead!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 37 / 48

Page 172: Encryption and Message Authentication - BIU

How to authenticate Long Messages?

Let Fk : {0, 1}n → {0, 1}n be a pseudorandom function.Suggestions: Define MACk(M1, . . . ,M`) as:

• (Fk(M1), . . . , Fk(M`))

• (Fk(1,M1), . . . , Fk(`,M`)).

• (r, Fk(r, 1,M1), . . . , Fk(r, `,M`)), where rR← {0, 1}n/3.

• (r, Fk(r, 1,M1, `), . . . , Fk(r, `,M`), `), where rR← {0, 1}n/4.

Thm: (only) the last construction is secure !Ex: Prove it.Problem: Impractical due to large communication overhead!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 37 / 48

Page 173: Encryption and Message Authentication - BIU

How to authenticate Long Messages?

Let Fk : {0, 1}n → {0, 1}n be a pseudorandom function.Suggestions: Define MACk(M1, . . . ,M`) as:

• (Fk(M1), . . . , Fk(M`))

• (Fk(1,M1), . . . , Fk(`,M`)).

• (r, Fk(r, 1,M1), . . . , Fk(r, `,M`)), where rR← {0, 1}n/3.

• (r, Fk(r, 1,M1, `), . . . , Fk(r, `,M`), `), where rR← {0, 1}n/4.

Thm: (only) the last construction is secure !Ex: Prove it.Problem: Impractical due to large communication overhead!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 37 / 48

Page 174: Encryption and Message Authentication - BIU

How to authenticate Long Messages?

Let Fk : {0, 1}n → {0, 1}n be a pseudorandom function.Suggestions: Define MACk(M1, . . . ,M`) as:

• (Fk(M1), . . . , Fk(M`))

• (Fk(1,M1), . . . , Fk(`,M`)).

• (r, Fk(r, 1,M1), . . . , Fk(r, `,M`)), where rR← {0, 1}n/3.

• (r, Fk(r, 1,M1, `), . . . , Fk(r, `,M`), `), where rR← {0, 1}n/4.

Thm: (only) the last construction is secure !Ex: Prove it.Problem: Impractical due to large communication overhead!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 37 / 48

Page 175: Encryption and Message Authentication - BIU

How to authenticate Long Messages?

Let Fk : {0, 1}n → {0, 1}n be a pseudorandom function.Suggestions: Define MACk(M1, . . . ,M`) as:

• (Fk(M1), . . . , Fk(M`))

• (Fk(1,M1), . . . , Fk(`,M`)).

• (r, Fk(r, 1,M1), . . . , Fk(r, `,M`)), where rR← {0, 1}n/3.

• (r, Fk(r, 1,M1, `), . . . , Fk(r, `,M`), `), where rR← {0, 1}n/4.

Thm: (only) the last construction is secure !Ex: Prove it.Problem: Impractical due to large communication overhead!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 37 / 48

Page 176: Encryption and Message Authentication - BIU

How to authenticate Long Messages?

Let Fk : {0, 1}n → {0, 1}n be a pseudorandom function.Suggestions: Define MACk(M1, . . . ,M`) as:

• (Fk(M1), . . . , Fk(M`))

• (Fk(1,M1), . . . , Fk(`,M`)).

• (r, Fk(r, 1,M1), . . . , Fk(r, `,M`)), where rR← {0, 1}n/3.

• (r, Fk(r, 1,M1, `), . . . , Fk(r, `,M`), `), where rR← {0, 1}n/4.

Thm: (only) the last construction is secure !Ex: Prove it.Problem: Impractical due to large communication overhead!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 37 / 48

Page 177: Encryption and Message Authentication - BIU

How to authenticate Long Messages?

Let Fk : {0, 1}n → {0, 1}n be a pseudorandom function.Suggestions: Define MACk(M1, . . . ,M`) as:

• (Fk(M1), . . . , Fk(M`))

• (Fk(1,M1), . . . , Fk(`,M`)).

• (r, Fk(r, 1,M1), . . . , Fk(r, `,M`)), where rR← {0, 1}n/3.

• (r, Fk(r, 1,M1, `), . . . , Fk(r, `,M`), `), where rR← {0, 1}n/4.

Thm: (only) the last construction is secure !Ex: Prove it.Problem: Impractical due to large communication overhead!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 37 / 48

Page 178: Encryption and Message Authentication - BIU

How to authenticate Long Messages?

Let Fk : {0, 1}n → {0, 1}n be a pseudorandom function.Suggestions: Define MACk(M1, . . . ,M`) as:

• (Fk(M1), . . . , Fk(M`))

• (Fk(1,M1), . . . , Fk(`,M`)).

• (r, Fk(r, 1,M1), . . . , Fk(r, `,M`)), where rR← {0, 1}n/3.

• (r, Fk(r, 1,M1, `), . . . , Fk(r, `,M`), `), where rR← {0, 1}n/4.

Thm: (only) the last construction is secure !Ex: Prove it.Problem: Impractical due to large communication overhead!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 37 / 48

Page 179: Encryption and Message Authentication - BIU

How to authenticate Long Messages?

Let Fk : {0, 1}n → {0, 1}n be a pseudorandom function.Suggestions: Define MACk(M1, . . . ,M`) as:

• (Fk(M1), . . . , Fk(M`))

• (Fk(1,M1), . . . , Fk(`,M`)).

• (r, Fk(r, 1,M1), . . . , Fk(r, `,M`)), where rR← {0, 1}n/3.

• (r, Fk(r, 1,M1, `), . . . , Fk(r, `,M`), `), where rR← {0, 1}n/4.

Thm: (only) the last construction is secure !Ex: Prove it.Problem: Impractical due to large communication overhead!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 37 / 48

Page 180: Encryption and Message Authentication - BIU

How to authenticate Long Messages?

Let Fk : {0, 1}n → {0, 1}n be a pseudorandom function.Suggestions: Define MACk(M1, . . . ,M`) as:

• (Fk(M1), . . . , Fk(M`))

• (Fk(1,M1), . . . , Fk(`,M`)).

• (r, Fk(r, 1,M1), . . . , Fk(r, `,M`)), where rR← {0, 1}n/3.

• (r, Fk(r, 1,M1, `), . . . , Fk(r, `,M`), `), where rR← {0, 1}n/4.

Thm: (only) the last construction is secure !Ex: Prove it.

Problem: Impractical due to large communication overhead!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 37 / 48

Page 181: Encryption and Message Authentication - BIU

How to authenticate Long Messages?

Let Fk : {0, 1}n → {0, 1}n be a pseudorandom function.Suggestions: Define MACk(M1, . . . ,M`) as:

• (Fk(M1), . . . , Fk(M`))

• (Fk(1,M1), . . . , Fk(`,M`)).

• (r, Fk(r, 1,M1), . . . , Fk(r, `,M`)), where rR← {0, 1}n/3.

• (r, Fk(r, 1,M1, `), . . . , Fk(r, `,M`), `), where rR← {0, 1}n/4.

Thm: (only) the last construction is secure !Ex: Prove it.Problem: Impractical due to large communication overhead!

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 37 / 48

Page 182: Encryption and Message Authentication - BIU

MACs for Long Messages

We will describe an efficient approach based on CBC Mode,there is an alternative solution (HMAC) based on cryptographic hashfunctions.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 38 / 48

Page 183: Encryption and Message Authentication - BIU

CBC Mode MACs

• Start with the all zero seed.

• Given a message consisting of n blocks, M1,M2, . . . ,Mn, applyCBC mode encryption (using the secret key k).

• Produce n “cipertext” blocks, C1, C2, . . . , Cn.

• Discard first n− 1 blocks.

• Send M1,M2, . . . ,Mn and the tag MACk(M) = Cn.

Q: Can we replace the all-zero seed with a random public string?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 39 / 48

Page 184: Encryption and Message Authentication - BIU

CBC Mode MACs

• Start with the all zero seed.

• Given a message consisting of n blocks, M1,M2, . . . ,Mn, applyCBC mode encryption (using the secret key k).

• Produce n “cipertext” blocks, C1, C2, . . . , Cn.

• Discard first n− 1 blocks.

• Send M1,M2, . . . ,Mn and the tag MACk(M) = Cn.

Q: Can we replace the all-zero seed with a random public string?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 39 / 48

Page 185: Encryption and Message Authentication - BIU

CBC Mode MACs

• Start with the all zero seed.

• Given a message consisting of n blocks, M1,M2, . . . ,Mn, applyCBC mode encryption (using the secret key k).

• Produce n “cipertext” blocks, C1, C2, . . . , Cn.

• Discard first n− 1 blocks.

• Send M1,M2, . . . ,Mn and the tag MACk(M) = Cn.

Q: Can we replace the all-zero seed with a random public string?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 39 / 48

Page 186: Encryption and Message Authentication - BIU

CBC Mode MACs

• Start with the all zero seed.

• Given a message consisting of n blocks, M1,M2, . . . ,Mn, applyCBC mode encryption (using the secret key k).

• Produce n “cipertext” blocks, C1, C2, . . . , Cn.

• Discard first n− 1 blocks.

• Send M1,M2, . . . ,Mn and the tag MACk(M) = Cn.

Q: Can we replace the all-zero seed with a random public string?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 39 / 48

Page 187: Encryption and Message Authentication - BIU

CBC Mode MACs

• Start with the all zero seed.

• Given a message consisting of n blocks, M1,M2, . . . ,Mn, applyCBC mode encryption (using the secret key k).

• Produce n “cipertext” blocks, C1, C2, . . . , Cn.

• Discard first n− 1 blocks.

• Send M1,M2, . . . ,Mn and the tag MACk(M) = Cn.

Q: Can we replace the all-zero seed with a random public string?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 39 / 48

Page 188: Encryption and Message Authentication - BIU

CBC Mode MACs

• Start with the all zero seed.

• Given a message consisting of n blocks, M1,M2, . . . ,Mn, applyCBC mode encryption (using the secret key k).

• Produce n “cipertext” blocks, C1, C2, . . . , Cn.

• Discard first n− 1 blocks.

• Send M1,M2, . . . ,Mn and the tag MACk(M) = Cn.

Q: Can we replace the all-zero seed with a random public string?

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 39 / 48

Page 189: Encryption and Message Authentication - BIU

CBC Mode MACs

• Start with the all zero seed.

• Given a message consisting of n blocks, M1,M2, . . . ,Mn, applyCBC mode encryption (using the secret key k).

• Produce n “cipertext” blocks, C1, C2, . . . , Cn.

• Discard first n− 1 blocks.

• Send M1,M2, . . . ,Mn and the tag MACk(M) = Cn.

Q: Can we replace the all-zero seed with a random public string?Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 39 / 48

Page 190: Encryption and Message Authentication - BIU

Security of Fixed Length CBC MAC [BKR, 2000]

• Theorem: If Ek is a pseudorandom function, then the fixedlength CBC MAC is resilient to forgery when authenticatingmessages of the same length, n.

• Proof via reduction: Assume CBC MAC can be forged efficiently.Transform the forging algorithm into an algorithm distinguishingEk from a random function efficiently.

• Warning: Construction is not secure if messages are of varyinglengths, namely number of blocks varies among messages.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 40 / 48

Page 191: Encryption and Message Authentication - BIU

Security of Fixed Length CBC MAC [BKR, 2000]

• Theorem: If Ek is a pseudorandom function, then the fixedlength CBC MAC is resilient to forgery when authenticatingmessages of the same length, n.

• Proof via reduction: Assume CBC MAC can be forged efficiently.Transform the forging algorithm into an algorithm distinguishingEk from a random function efficiently.

• Warning: Construction is not secure if messages are of varyinglengths, namely number of blocks varies among messages.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 40 / 48

Page 192: Encryption and Message Authentication - BIU

Security of Fixed Length CBC MAC [BKR, 2000]

• Theorem: If Ek is a pseudorandom function, then the fixedlength CBC MAC is resilient to forgery when authenticatingmessages of the same length, n.

• Proof via reduction: Assume CBC MAC can be forged efficiently.Transform the forging algorithm into an algorithm distinguishingEk from a random function efficiently.

• Warning: Construction is not secure if messages are of varyinglengths, namely number of blocks varies among messages.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 40 / 48

Page 193: Encryption and Message Authentication - BIU

Security of Fixed Length CBC MAC [BKR, 2000]

• Theorem: If Ek is a pseudorandom function, then the fixedlength CBC MAC is resilient to forgery when authenticatingmessages of the same length, n.

• Proof via reduction: Assume CBC MAC can be forged efficiently.Transform the forging algorithm into an algorithm distinguishingEk from a random function efficiently.

• Warning: Construction is not secure if messages are of varyinglengths, namely number of blocks varies among messages.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 40 / 48

Page 194: Encryption and Message Authentication - BIU

Security of Fixed Length CBC MAC [BKR, 2000]

• Theorem: If Ek is a pseudorandom function, then the fixedlength CBC MAC is resilient to forgery when authenticatingmessages of the same length, n.

• Proof via reduction: Assume CBC MAC can be forged efficiently.Transform the forging algorithm into an algorithm distinguishingEk from a random function efficiently.

• Warning: Construction is not secure if messages are of varyinglengths, namely number of blocks varies among messages.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 40 / 48

Page 195: Encryption and Message Authentication - BIU

Security of Fixed Length CBC MAC [BKR, 2000]

• Theorem: If Ek is a pseudorandom function, then the fixedlength CBC MAC is resilient to forgery when authenticatingmessages of the same length, n.

• Proof via reduction: Assume CBC MAC can be forged efficiently.Transform the forging algorithm into an algorithm distinguishingEk from a random function efficiently.

• Warning: Construction is not secure if messages are of varyinglengths, namely number of blocks varies among messages.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 40 / 48

Page 196: Encryption and Message Authentication - BIU

Security of Fixed Length CBC MAC [BKR, 2000]

• Theorem: If Ek is a pseudorandom function, then the fixedlength CBC MAC is resilient to forgery when authenticatingmessages of the same length, n.

• Proof via reduction: Assume CBC MAC can be forged efficiently.Transform the forging algorithm into an algorithm distinguishingEk from a random function efficiently.

• Warning: Construction is not secure if messages are of varyinglengths, namely number of blocks varies among messages.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 40 / 48

Page 197: Encryption and Message Authentication - BIU

Insecurity of Variable Length CBC MAC

Here is a simple, chosen plaintext example of forgery:

• Get C1 = CBC −MACk(M1) = Ek(~0⊕M1)

• Ask for MAC of C1, i.e.,C2 = CBC −MACk(C1) = Ek(~0

⊕C1)

• Observe that Ek(C1⊕~0) = Ek(Ek(~0

⊕M1)

⊕~0) =

CBC −MACk(M1 ◦~0) (where ◦ denotes concatenation)

• One can efficiently design, for every n, two messages, one with 1block, the other with n+ 1 blocks, that have the same MACk(·).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 41 / 48

Page 198: Encryption and Message Authentication - BIU

Insecurity of Variable Length CBC MAC

Here is a simple, chosen plaintext example of forgery:

• Get C1 = CBC −MACk(M1) = Ek(~0⊕M1)

• Ask for MAC of C1, i.e.,C2 = CBC −MACk(C1) = Ek(~0

⊕C1)

• Observe that Ek(C1⊕~0) = Ek(Ek(~0

⊕M1)

⊕~0) =

CBC −MACk(M1 ◦~0) (where ◦ denotes concatenation)

• One can efficiently design, for every n, two messages, one with 1block, the other with n+ 1 blocks, that have the same MACk(·).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 41 / 48

Page 199: Encryption and Message Authentication - BIU

Insecurity of Variable Length CBC MAC

Here is a simple, chosen plaintext example of forgery:

• Get C1 = CBC −MACk(M1) = Ek(~0⊕M1)

• Ask for MAC of C1, i.e.,C2 = CBC −MACk(C1) = Ek(~0

⊕C1)

• Observe that Ek(C1⊕~0) = Ek(Ek(~0

⊕M1)

⊕~0) =

CBC −MACk(M1 ◦~0) (where ◦ denotes concatenation)

• One can efficiently design, for every n, two messages, one with 1block, the other with n+ 1 blocks, that have the same MACk(·).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 41 / 48

Page 200: Encryption and Message Authentication - BIU

Insecurity of Variable Length CBC MAC

Here is a simple, chosen plaintext example of forgery:

• Get C1 = CBC −MACk(M1) = Ek(~0⊕M1)

• Ask for MAC of C1, i.e.,C2 = CBC −MACk(C1) = Ek(~0

⊕C1)

• Observe that Ek(C1⊕~0) = Ek(Ek(~0

⊕M1)

⊕~0) =

CBC −MACk(M1 ◦~0) (where ◦ denotes concatenation)

• One can efficiently design, for every n, two messages, one with 1block, the other with n+ 1 blocks, that have the same MACk(·).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 41 / 48

Page 201: Encryption and Message Authentication - BIU

Insecurity of Variable Length CBC MAC

Here is a simple, chosen plaintext example of forgery:

• Get C1 = CBC −MACk(M1) = Ek(~0⊕M1)

• Ask for MAC of C1, i.e.,C2 = CBC −MACk(C1) = Ek(~0

⊕C1)

• Observe that Ek(C1⊕~0) = Ek(Ek(~0

⊕M1)

⊕~0) =

CBC −MACk(M1 ◦~0) (where ◦ denotes concatenation)

• One can efficiently design, for every n, two messages, one with 1block, the other with n+ 1 blocks, that have the same MACk(·).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 41 / 48

Page 202: Encryption and Message Authentication - BIU

CBC-MAC for Variable Length Messages

• Solution 1: The first block of the message is set to be its length.Apply CBC-MAC to (n,M1, . . . ,Mn).Works since now message space is prefix-free.Drawback: The message length, n, must be known in advance.

• “Solution 2”: Apply CBC-MAC to (M1, . . . ,Mn, n).Message length does not have to be known is advance.Looks good, but this scheme was broken.

• Solution 3: Encrypted CBC (ECBC MAC):Compute Ek2(CBC −MACk1(M1, . . . ,Mn)),where E is a block-cipher and k2 is another secret key.Essentially the same overhead as CBC-MAC (widely used).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 42 / 48

Page 203: Encryption and Message Authentication - BIU

CBC-MAC for Variable Length Messages

• Solution 1: The first block of the message is set to be its length.Apply CBC-MAC to (n,M1, . . . ,Mn).Works since now message space is prefix-free.Drawback: The message length, n, must be known in advance.

• “Solution 2”: Apply CBC-MAC to (M1, . . . ,Mn, n).Message length does not have to be known is advance.Looks good, but this scheme was broken.

• Solution 3: Encrypted CBC (ECBC MAC):Compute Ek2(CBC −MACk1(M1, . . . ,Mn)),where E is a block-cipher and k2 is another secret key.Essentially the same overhead as CBC-MAC (widely used).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 42 / 48

Page 204: Encryption and Message Authentication - BIU

CBC-MAC for Variable Length Messages

• Solution 1: The first block of the message is set to be its length.Apply CBC-MAC to (n,M1, . . . ,Mn).Works since now message space is prefix-free.Drawback: The message length, n, must be known in advance.

• “Solution 2”: Apply CBC-MAC to (M1, . . . ,Mn, n).Message length does not have to be known is advance.Looks good, but this scheme was broken.

• Solution 3: Encrypted CBC (ECBC MAC):Compute Ek2(CBC −MACk1(M1, . . . ,Mn)),where E is a block-cipher and k2 is another secret key.Essentially the same overhead as CBC-MAC (widely used).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 42 / 48

Page 205: Encryption and Message Authentication - BIU

CBC-MAC for Variable Length Messages

• Solution 1: The first block of the message is set to be its length.Apply CBC-MAC to (n,M1, . . . ,Mn).Works since now message space is prefix-free.Drawback: The message length, n, must be known in advance.

• “Solution 2”: Apply CBC-MAC to (M1, . . . ,Mn, n).Message length does not have to be known is advance.Looks good, but this scheme was broken.

• Solution 3: Encrypted CBC (ECBC MAC):Compute Ek2(CBC −MACk1(M1, . . . ,Mn)),where E is a block-cipher and k2 is another secret key.Essentially the same overhead as CBC-MAC (widely used).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 42 / 48

Page 206: Encryption and Message Authentication - BIU

CBC-MAC for Variable Length Messages

• Solution 1: The first block of the message is set to be its length.Apply CBC-MAC to (n,M1, . . . ,Mn).Works since now message space is prefix-free.Drawback: The message length, n, must be known in advance.

• “Solution 2”: Apply CBC-MAC to (M1, . . . ,Mn, n).Message length does not have to be known is advance.Looks good, but this scheme was broken.

• Solution 3: Encrypted CBC (ECBC MAC):Compute Ek2(CBC −MACk1(M1, . . . ,Mn)),where E is a block-cipher and k2 is another secret key.Essentially the same overhead as CBC-MAC (widely used).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 42 / 48

Page 207: Encryption and Message Authentication - BIU

Combining Authentication and Secrecy

It is a good idea to use two different keys: one for authentication andone for encryption. But How?

Suggestions:

• Encrypt-and-Authenticate: Ek1(M),MACk2(M) secure?No (some MACs may leak information on M)

• Authenticate-then-Encrypt: Ek1(M,MACk2(M)) secure?Not in general

• Encrypt-then-Authenticate: Ek1(M),MACk2(Ek1(M)) secure?Yes

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 43 / 48

Page 208: Encryption and Message Authentication - BIU

Combining Authentication and Secrecy

It is a good idea to use two different keys: one for authentication andone for encryption. But How?Suggestions:

• Encrypt-and-Authenticate: Ek1(M),MACk2(M) secure?No (some MACs may leak information on M)

• Authenticate-then-Encrypt: Ek1(M,MACk2(M)) secure?Not in general

• Encrypt-then-Authenticate: Ek1(M),MACk2(Ek1(M)) secure?Yes

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 43 / 48

Page 209: Encryption and Message Authentication - BIU

Combining Authentication and Secrecy

It is a good idea to use two different keys: one for authentication andone for encryption. But How?Suggestions:

• Encrypt-and-Authenticate: Ek1(M),MACk2(M) secure?

No (some MACs may leak information on M)

• Authenticate-then-Encrypt: Ek1(M,MACk2(M)) secure?Not in general

• Encrypt-then-Authenticate: Ek1(M),MACk2(Ek1(M)) secure?Yes

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 43 / 48

Page 210: Encryption and Message Authentication - BIU

Combining Authentication and Secrecy

It is a good idea to use two different keys: one for authentication andone for encryption. But How?Suggestions:

• Encrypt-and-Authenticate: Ek1(M),MACk2(M) secure?

No (some MACs may leak information on M)

• Authenticate-then-Encrypt: Ek1(M,MACk2(M)) secure?Not in general

• Encrypt-then-Authenticate: Ek1(M),MACk2(Ek1(M)) secure?Yes

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 43 / 48

Page 211: Encryption and Message Authentication - BIU

Combining Authentication and Secrecy

It is a good idea to use two different keys: one for authentication andone for encryption. But How?Suggestions:

• Encrypt-and-Authenticate: Ek1(M),MACk2(M) secure?No (some MACs may leak information on M)

• Authenticate-then-Encrypt: Ek1(M,MACk2(M)) secure?Not in general

• Encrypt-then-Authenticate: Ek1(M),MACk2(Ek1(M)) secure?Yes

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 43 / 48

Page 212: Encryption and Message Authentication - BIU

Combining Authentication and Secrecy

It is a good idea to use two different keys: one for authentication andone for encryption. But How?Suggestions:

• Encrypt-and-Authenticate: Ek1(M),MACk2(M) secure?No (some MACs may leak information on M)

• Authenticate-then-Encrypt: Ek1(M,MACk2(M)) secure?

Not in general

• Encrypt-then-Authenticate: Ek1(M),MACk2(Ek1(M)) secure?Yes

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 43 / 48

Page 213: Encryption and Message Authentication - BIU

Combining Authentication and Secrecy

It is a good idea to use two different keys: one for authentication andone for encryption. But How?Suggestions:

• Encrypt-and-Authenticate: Ek1(M),MACk2(M) secure?No (some MACs may leak information on M)

• Authenticate-then-Encrypt: Ek1(M,MACk2(M)) secure?

Not in general

• Encrypt-then-Authenticate: Ek1(M),MACk2(Ek1(M)) secure?Yes

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 43 / 48

Page 214: Encryption and Message Authentication - BIU

Combining Authentication and Secrecy

It is a good idea to use two different keys: one for authentication andone for encryption. But How?Suggestions:

• Encrypt-and-Authenticate: Ek1(M),MACk2(M) secure?No (some MACs may leak information on M)

• Authenticate-then-Encrypt: Ek1(M,MACk2(M)) secure?Not in general

• Encrypt-then-Authenticate: Ek1(M),MACk2(Ek1(M)) secure?Yes

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 43 / 48

Page 215: Encryption and Message Authentication - BIU

Combining Authentication and Secrecy

It is a good idea to use two different keys: one for authentication andone for encryption. But How?Suggestions:

• Encrypt-and-Authenticate: Ek1(M),MACk2(M) secure?No (some MACs may leak information on M)

• Authenticate-then-Encrypt: Ek1(M,MACk2(M)) secure?Not in general

• Encrypt-then-Authenticate: Ek1(M),MACk2(Ek1(M)) secure?

Yes

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 43 / 48

Page 216: Encryption and Message Authentication - BIU

Combining Authentication and Secrecy

It is a good idea to use two different keys: one for authentication andone for encryption. But How?Suggestions:

• Encrypt-and-Authenticate: Ek1(M),MACk2(M) secure?No (some MACs may leak information on M)

• Authenticate-then-Encrypt: Ek1(M,MACk2(M)) secure?Not in general

• Encrypt-then-Authenticate: Ek1(M),MACk2(Ek1(M)) secure?

Yes

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 43 / 48

Page 217: Encryption and Message Authentication - BIU

Combining Authentication and Secrecy

It is a good idea to use two different keys: one for authentication andone for encryption. But How?Suggestions:

• Encrypt-and-Authenticate: Ek1(M),MACk2(M) secure?No (some MACs may leak information on M)

• Authenticate-then-Encrypt: Ek1(M,MACk2(M)) secure?Not in general

• Encrypt-then-Authenticate: Ek1(M),MACk2(Ek1(M)) secure?Yes

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 43 / 48

Page 218: Encryption and Message Authentication - BIU

Authenticated Encryption

Authentication is important even if one is interested only in secrecy !

Alice wants to send an n-bit message M to Bob over a noisy channel.They share a secret-key of a CPA secure encryption Ek.

Alice sends a bit-by-bit encryption Ek(M1), . . . , Ek(Mn)together with an encryption of the parity-checkEk(M1

⊕. . .

⊕Mn) so that Bob can detect errors.

Bob decrypts. If the parity check does not match, he sends anerror message.

How can an active adversary recover the message M?CPA security is not always enough!(Some real world attacks follow a similar scenario)

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 44 / 48

Page 219: Encryption and Message Authentication - BIU

Authenticated Encryption

Authentication is important even if one is interested only in secrecy !

Alice wants to send an n-bit message M to Bob over a noisy channel.They share a secret-key of a CPA secure encryption Ek.

Alice sends a bit-by-bit encryption Ek(M1), . . . , Ek(Mn)together with an encryption of the parity-checkEk(M1

⊕. . .

⊕Mn) so that Bob can detect errors.

Bob decrypts. If the parity check does not match, he sends anerror message.

How can an active adversary recover the message M?CPA security is not always enough!(Some real world attacks follow a similar scenario)

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 44 / 48

Page 220: Encryption and Message Authentication - BIU

Authenticated Encryption

Authentication is important even if one is interested only in secrecy !

Alice wants to send an n-bit message M to Bob over a noisy channel.They share a secret-key of a CPA secure encryption Ek.

Alice sends a bit-by-bit encryption Ek(M1), . . . , Ek(Mn)together with an encryption of the parity-checkEk(M1

⊕. . .

⊕Mn) so that Bob can detect errors.

Bob decrypts. If the parity check does not match, he sends anerror message.

How can an active adversary recover the message M?CPA security is not always enough!(Some real world attacks follow a similar scenario)

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 44 / 48

Page 221: Encryption and Message Authentication - BIU

Authenticated Encryption

Authentication is important even if one is interested only in secrecy !

Alice wants to send an n-bit message M to Bob over a noisy channel.They share a secret-key of a CPA secure encryption Ek.

Alice sends a bit-by-bit encryption Ek(M1), . . . , Ek(Mn)together with an encryption of the parity-checkEk(M1

⊕. . .

⊕Mn) so that Bob can detect errors.

Bob decrypts. If the parity check does not match, he sends anerror message.

How can an active adversary recover the message M?CPA security is not always enough!(Some real world attacks follow a similar scenario)

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 44 / 48

Page 222: Encryption and Message Authentication - BIU

Authenticated Encryption

Authentication is important even if one is interested only in secrecy !

Alice wants to send an n-bit message M to Bob over a noisy channel.They share a secret-key of a CPA secure encryption Ek.

Alice sends a bit-by-bit encryption Ek(M1), . . . , Ek(Mn)together with an encryption of the parity-checkEk(M1

⊕. . .

⊕Mn) so that Bob can detect errors.

Bob decrypts. If the parity check does not match, he sends anerror message.

How can an active adversary recover the message M?

CPA security is not always enough!(Some real world attacks follow a similar scenario)

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 44 / 48

Page 223: Encryption and Message Authentication - BIU

Authenticated Encryption

Authentication is important even if one is interested only in secrecy !

Alice wants to send an n-bit message M to Bob over a noisy channel.They share a secret-key of a CPA secure encryption Ek.

Alice sends a bit-by-bit encryption Ek(M1), . . . , Ek(Mn)together with an encryption of the parity-checkEk(M1

⊕. . .

⊕Mn) so that Bob can detect errors.

Bob decrypts. If the parity check does not match, he sends anerror message.

How can an active adversary recover the message M?CPA security is not always enough!(Some real world attacks follow a similar scenario)

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 44 / 48

Page 224: Encryption and Message Authentication - BIU

Reminder: Security under Chosen Plaintext Attack (CPA)

Challenger

kR← {0, 1}n

bR← {0, 1}

← x1

Ek(x1)→

← x2

Ek(x2)→

. . .

← (m0,m1)

c∗ = Ek(mb)→

Adversary A

Output b′

Security: For every PPT adversary Pr[b = b′] ≤ 12 + neg(n)

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 45 / 48

Page 225: Encryption and Message Authentication - BIU

Reminder: Security under Chosen Plaintext Attack (CPA)

Challenger

kR← {0, 1}n

bR← {0, 1}

← x1

Ek(x1)→

← x2

Ek(x2)→

. . .

← (m0,m1)

c∗ = Ek(mb)→

Adversary A

Output b′

Security: For every PPT adversary Pr[b = b′] ≤ 12 + neg(n)

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 45 / 48

Page 226: Encryption and Message Authentication - BIU

Security under Chosen Ciphertext Attack (CCA)

Challenger

kR← {0, 1}n

bR← {0, 1}

← x1,y1

Ek(x1),Dk(y1)→

← x2,y2

. . .

← (m0,m1)

c∗ = Ek(mb)→

Adversary A

Output b′

Security: For every PPT adversary Pr[b = b′] ≤ 12 + neg(n)

Decryption queries can be also asked after the challenge as longas y 6= c∗.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 46 / 48

Page 227: Encryption and Message Authentication - BIU

Security under Chosen Ciphertext Attack (CCA)

Challenger

kR← {0, 1}n

bR← {0, 1}

← x1,y1

Ek(x1),Dk(y1)→

← x2,y2

. . .

← (m0,m1)

c∗ = Ek(mb)→

Adversary A

Output b′

Security: For every PPT adversary Pr[b = b′] ≤ 12 + neg(n)

Decryption queries can be also asked after the challenge as longas y 6= c∗.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 46 / 48

Page 228: Encryption and Message Authentication - BIU

Security under Chosen Ciphertext Attack (CCA)

Challenger

kR← {0, 1}n

bR← {0, 1}

← x1,y1

Ek(x1),Dk(y1)→

← x2,y2

. . .

← (m0,m1)

c∗ = Ek(mb)→

Adversary A

Output b′

Security: For every PPT adversary Pr[b = b′] ≤ 12 + neg(n)

Decryption queries can be also asked after the challenge as longas y 6= c∗.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 46 / 48

Page 229: Encryption and Message Authentication - BIU

CPA+MAC = CCAGiven CPA-secure encryption (E,D) and a MAC MACk define(E′, D′) as follows:

Construction of CCA Encryption

E′k1,k2(M) = (C, T ) where C = Ek1(M), T = MACk2(C).

D′k1,k2(C, T ) if T = MACk2(C) return Dk1(C), otherwise ⊥.

Thm. The scheme (E′, D′) is CCA secure.

Proof idea: Assume a Chosen Ciphertext Attacker.

Decryption query yi is useful if it does not equal to an outcomeof a previous encryption query.

Useful queries are (almost always) answered with ⊥, otherwisethe MAC is broken

With no useful queries, the decryption oracle isn’t really beingused

We can break E via CPA.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 47 / 48

Page 230: Encryption and Message Authentication - BIU

CPA+MAC = CCAGiven CPA-secure encryption (E,D) and a MAC MACk define(E′, D′) as follows:

Construction of CCA Encryption

E′k1,k2(M) = (C, T ) where C = Ek1(M), T = MACk2(C).

D′k1,k2(C, T ) if T = MACk2(C) return Dk1(C), otherwise ⊥.

Thm. The scheme (E′, D′) is CCA secure.

Proof idea: Assume a Chosen Ciphertext Attacker.

Decryption query yi is useful if it does not equal to an outcomeof a previous encryption query.

Useful queries are (almost always) answered with ⊥, otherwisethe MAC is broken

With no useful queries, the decryption oracle isn’t really beingused

We can break E via CPA.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 47 / 48

Page 231: Encryption and Message Authentication - BIU

CPA+MAC = CCAGiven CPA-secure encryption (E,D) and a MAC MACk define(E′, D′) as follows:

Construction of CCA Encryption

E′k1,k2(M) = (C, T ) where C = Ek1(M), T = MACk2(C).

D′k1,k2(C, T ) if T = MACk2(C) return Dk1(C), otherwise ⊥.

Thm. The scheme (E′, D′) is CCA secure.

Proof idea: Assume a Chosen Ciphertext Attacker.

Decryption query yi is useful if it does not equal to an outcomeof a previous encryption query.

Useful queries are (almost always) answered with ⊥, otherwisethe MAC is broken

With no useful queries, the decryption oracle isn’t really beingused

We can break E via CPA.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 47 / 48

Page 232: Encryption and Message Authentication - BIU

CPA+MAC = CCAGiven CPA-secure encryption (E,D) and a MAC MACk define(E′, D′) as follows:

Construction of CCA Encryption

E′k1,k2(M) = (C, T ) where C = Ek1(M), T = MACk2(C).

D′k1,k2(C, T ) if T = MACk2(C) return Dk1(C), otherwise ⊥.

Thm. The scheme (E′, D′) is CCA secure.

Proof idea: Assume a Chosen Ciphertext Attacker.

Decryption query yi is useful if it does not equal to an outcomeof a previous encryption query.

Useful queries are (almost always) answered with ⊥, otherwisethe MAC is broken

With no useful queries, the decryption oracle isn’t really beingused

We can break E via CPA.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 47 / 48

Page 233: Encryption and Message Authentication - BIU

CPA+MAC = CCAGiven CPA-secure encryption (E,D) and a MAC MACk define(E′, D′) as follows:

Construction of CCA Encryption

E′k1,k2(M) = (C, T ) where C = Ek1(M), T = MACk2(C).

D′k1,k2(C, T ) if T = MACk2(C) return Dk1(C), otherwise ⊥.

Thm. The scheme (E′, D′) is CCA secure.

Proof idea: Assume a Chosen Ciphertext Attacker.

Decryption query yi is useful if it does not equal to an outcomeof a previous encryption query.

Useful queries are (almost always) answered with ⊥, otherwisethe MAC is broken

With no useful queries, the decryption oracle isn’t really beingused

We can break E via CPA.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 47 / 48

Page 234: Encryption and Message Authentication - BIU

CPA+MAC = CCAGiven CPA-secure encryption (E,D) and a MAC MACk define(E′, D′) as follows:

Construction of CCA Encryption

E′k1,k2(M) = (C, T ) where C = Ek1(M), T = MACk2(C).

D′k1,k2(C, T ) if T = MACk2(C) return Dk1(C), otherwise ⊥.

Thm. The scheme (E′, D′) is CCA secure.

Proof idea: Assume a Chosen Ciphertext Attacker.

Decryption query yi is useful if it does not equal to an outcomeof a previous encryption query.

Useful queries are (almost always) answered with ⊥, otherwisethe MAC is broken

With no useful queries, the decryption oracle isn’t really beingused

We can break E via CPA.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 47 / 48

Page 235: Encryption and Message Authentication - BIU

CPA+MAC = CCAGiven CPA-secure encryption (E,D) and a MAC MACk define(E′, D′) as follows:

Construction of CCA Encryption

E′k1,k2(M) = (C, T ) where C = Ek1(M), T = MACk2(C).

D′k1,k2(C, T ) if T = MACk2(C) return Dk1(C), otherwise ⊥.

Thm. The scheme (E′, D′) is CCA secure.

Proof idea: Assume a Chosen Ciphertext Attacker.

Decryption query yi is useful if it does not equal to an outcomeof a previous encryption query.

Useful queries are (almost always) answered with ⊥, otherwisethe MAC is broken

With no useful queries, the decryption oracle isn’t really beingused

We can break E via CPA.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 47 / 48

Page 236: Encryption and Message Authentication - BIU

CPA+MAC = CCAGiven CPA-secure encryption (E,D) and a MAC MACk define(E′, D′) as follows:

Construction of CCA Encryption

E′k1,k2(M) = (C, T ) where C = Ek1(M), T = MACk2(C).

D′k1,k2(C, T ) if T = MACk2(C) return Dk1(C), otherwise ⊥.

Thm. The scheme (E′, D′) is CCA secure.

Proof idea: Assume a Chosen Ciphertext Attacker.

Decryption query yi is useful if it does not equal to an outcomeof a previous encryption query.

Useful queries are (almost always) answered with ⊥, otherwisethe MAC is broken

With no useful queries, the decryption oracle isn’t really beingused

We can break E via CPA.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 47 / 48

Page 237: Encryption and Message Authentication - BIU

CPA+MAC = CCAGiven CPA-secure encryption (E,D) and a MAC MACk define(E′, D′) as follows:

Construction of CCA Encryption

E′k1,k2(M) = (C, T ) where C = Ek1(M), T = MACk2(C).

D′k1,k2(C, T ) if T = MACk2(C) return Dk1(C), otherwise ⊥.

Thm. The scheme (E′, D′) is CCA secure.

Proof idea: Assume a Chosen Ciphertext Attacker.

Decryption query yi is useful if it does not equal to an outcomeof a previous encryption query.

Useful queries are (almost always) answered with ⊥, otherwisethe MAC is broken

With no useful queries, the decryption oracle isn’t really beingused

We can break E via CPA.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 47 / 48

Page 238: Encryption and Message Authentication - BIU

CPA+MAC = CCAGiven CPA-secure encryption (E,D) and a MAC MACk define(E′, D′) as follows:

Construction of CCA Encryption

E′k1,k2(M) = (C, T ) where C = Ek1(M), T = MACk2(C).

D′k1,k2(C, T ) if T = MACk2(C) return Dk1(C), otherwise ⊥.

Thm. The scheme (E′, D′) is CCA secure.

Proof idea: Assume a Chosen Ciphertext Attacker.

Decryption query yi is useful if it does not equal to an outcomeof a previous encryption query.

Useful queries are (almost always) answered with ⊥, otherwisethe MAC is broken

With no useful queries, the decryption oracle isn’t really beingused

We can break E via CPA.

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 47 / 48

Page 239: Encryption and Message Authentication - BIU

Summary

Different levels of security for encryption.

Authentication is orthogonal to secrecy – combination is tricky.

MACs and Encryption schemes can be based on PRFs/PRPs viahighly efficient (practical) transformations.

Good design methodology: Reduce a complicated task to asimpler task. Solve the simple task and extend the solution.(E.g., design encryption for a single-block messages and thenshow how to extend it to longer messages).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 48 / 48

Page 240: Encryption and Message Authentication - BIU

Summary

Different levels of security for encryption.

Authentication is orthogonal to secrecy – combination is tricky.

MACs and Encryption schemes can be based on PRFs/PRPs viahighly efficient (practical) transformations.

Good design methodology: Reduce a complicated task to asimpler task. Solve the simple task and extend the solution.(E.g., design encryption for a single-block messages and thenshow how to extend it to longer messages).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 48 / 48

Page 241: Encryption and Message Authentication - BIU

Summary

Different levels of security for encryption.

Authentication is orthogonal to secrecy – combination is tricky.

MACs and Encryption schemes can be based on PRFs/PRPs viahighly efficient (practical) transformations.

Good design methodology: Reduce a complicated task to asimpler task. Solve the simple task and extend the solution.(E.g., design encryption for a single-block messages and thenshow how to extend it to longer messages).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 48 / 48

Page 242: Encryption and Message Authentication - BIU

Summary

Different levels of security for encryption.

Authentication is orthogonal to secrecy – combination is tricky.

MACs and Encryption schemes can be based on PRFs/PRPs viahighly efficient (practical) transformations.

Good design methodology: Reduce a complicated task to asimpler task. Solve the simple task and extend the solution.(E.g., design encryption for a single-block messages and thenshow how to extend it to longer messages).

Benny Applebaum (Tel-Aviv University) Encryption and Message Authentication January, 2014 48 / 48