Verification of Security Protocols Part II eronique Cortier 1 V - - PowerPoint PPT Presentation

verification of security protocols part ii
SMART_READER_LITE
LIVE PREVIEW

Verification of Security Protocols Part II eronique Cortier 1 V - - PowerPoint PPT Presentation

Formal methods for protocols Cryptographic models Passive case Active case Verification of Security Protocols Part II eronique Cortier 1 V September, 2010 Fosad 2010 1 LORIA, CNRS 1/76 V eronique Cortier Verification of Security


slide-1
SLIDE 1

Formal methods for protocols Cryptographic models Passive case Active case

Verification of Security Protocols Part II

V´ eronique Cortier1 September, 2010

Fosad 2010

1LORIA, CNRS 1/76 V´ eronique Cortier Verification of Security Protocols

slide-2
SLIDE 2

Formal methods for protocols Cryptographic models Passive case Active case

Advertisement

ProSecure project

Goal : analysis and design of security systems → five years project (2011-2015), founded by the European Research Council. → Regular job offers ! PhD positions and Post-doc positions One research associate position (up to 5 years, with budget for PhD grant and other costs) Permanent positions (CNRS, INRIA, Universities) → contact me cortier@loria.fr

2/76 V´ eronique Cortier Verification of Security Protocols

slide-3
SLIDE 3

Formal methods for protocols Cryptographic models Passive case Active case

LORIA (Nancy)

Size : 500 researchers, among which about 150 permanent researchers and 150 PhD students.

3/76 V´ eronique Cortier Verification of Security Protocols

slide-4
SLIDE 4

Formal methods for protocols Cryptographic models Passive case Active case

Where is it ?

Well connected to : Paris, France (90 minutes) Luxembourg (90-120 minutes) Saarbrucken, Germany (120 minutes)

4/76 V´ eronique Cortier Verification of Security Protocols

slide-5
SLIDE 5

Formal methods for protocols Cryptographic models Passive case Active case Yesterday course Adding equational theories

Yesterday course

How to use formal methods for analysing cryptographic protocols ? Messages are abstracted by terms Intruder can compute new terms using a deduction system Protocols can be described by rules of the form u → v, where u, v are terms with variables.

5/76 V´ eronique Cortier Verification of Security Protocols

slide-6
SLIDE 6

Formal methods for protocols Cryptographic models Passive case Active case Yesterday course Adding equational theories

What formal methods allow to do ?

In general, secrecy preservation is undecidable.

6/76 V´ eronique Cortier Verification of Security Protocols

slide-7
SLIDE 7

Formal methods for protocols Cryptographic models Passive case Active case Yesterday course Adding equational theories

What formal methods allow to do ?

In general, secrecy preservation is undecidable. For a bounded number of sessions, secrecy is co-NP-complete [RusinowitchTuruani CSFW01] → several tools for detecting attacks (Casper, Avispa platform... )

6/76 V´ eronique Cortier Verification of Security Protocols

slide-8
SLIDE 8

Formal methods for protocols Cryptographic models Passive case Active case Yesterday course Adding equational theories

What formal methods allow to do ?

In general, secrecy preservation is undecidable. For a bounded number of sessions, secrecy is co-NP-complete [RusinowitchTuruani CSFW01] → several tools for detecting attacks (Casper, Avispa platform... ) For an unbounded number of sessions

for one-copy protocols, secrecy is DEXPTIME-complete [CortierComon RTA03] [SeildVerma LPAR04] for message-length bounded protocols, secrecy is DEXPTIME-complete [Durgin et al FMSP99] [Chevalier et al CSL03]

→ some tools for proving security (ProVerif, EVA Platform)

6/76 V´ eronique Cortier Verification of Security Protocols

slide-9
SLIDE 9

Formal methods for protocols Cryptographic models Passive case Active case Yesterday course Adding equational theories

Limitations of this approach ?

Are you ready to use any protocol verified with this technique ? Only a finite scenario is checked. → What happens if the protocol is used one more time ? The underlying mathematical properties of the primitives are abstracted away. The specification of the protocol is analysed, but not its implementation. → C´ edric Fournet course

7/76 V´ eronique Cortier Verification of Security Protocols

slide-10
SLIDE 10

Formal methods for protocols Cryptographic models Passive case Active case Yesterday course Adding equational theories

Motivation

Back to our running example : A → B : {pin}ka B → A : {{pin}ka}kb A → B : {pin}kb We need the equation for the commutativity of encryption {{z}x}y = {{z}y}x

8/76 V´ eronique Cortier Verification of Security Protocols

slide-11
SLIDE 11

Formal methods for protocols Cryptographic models Passive case Active case Yesterday course Adding equational theories

Some other examples

Encryption-Decryption theory dec(enc(x, y), y) = x π1(x, y) = x π2(x, y) = y EXclusive Or x ⊕ (y ⊕ z) = z x ⊕ y = y ⊕ x x ⊕ x = x ⊕ 0 = x Diffie-Hellmann exp(exp(z, x), y) = exp(exp(z, y), x)

9/76 V´ eronique Cortier Verification of Security Protocols

slide-12
SLIDE 12

Formal methods for protocols Cryptographic models Passive case Active case Yesterday course Adding equational theories

E-voting protocols

First phase : V → A : sign(blind(vote, r), V ) A → V : sign(blind(vote, r), A) Voting phase : V → C : sign(vote, A) ...

10/76 V´ eronique Cortier Verification of Security Protocols

slide-13
SLIDE 13

Formal methods for protocols Cryptographic models Passive case Active case Yesterday course Adding equational theories

Equational theory for blind signatures

[Kremer Ryan 05] checksign(sign(x, y), pk(y)) = x unblind(blind(x, y), y) = x unblind(sign(blind(x, y), z), y) = sign(x, z)

11/76 V´ eronique Cortier Verification of Security Protocols

slide-14
SLIDE 14

Formal methods for protocols Cryptographic models Passive case Active case Yesterday course Adding equational theories

Deduction

M ∈ T T ⊢E M T ⊢E M1 · · · T ⊢E Mk f ∈ Σ T ⊢E f (M1, . . . , Mk) T ⊢ M M =E M′ T ⊢ M′

12/76 V´ eronique Cortier Verification of Security Protocols

slide-15
SLIDE 15

Formal methods for protocols Cryptographic models Passive case Active case Yesterday course Adding equational theories

Deduction

M ∈ T T ⊢E M T ⊢E M1 · · · T ⊢E Mk f ∈ Σ T ⊢E f (M1, . . . , Mk) T ⊢ M M =E M′ T ⊢ M′ Example : E := dec(enc(x, y), y) = x and T = {enc(secret, k), k}. T ⊢ enc(secret, k) T ⊢ k f ∈ Σ T ⊢ dec(enc(secret, k), k) dec(enc(x, y), y) = x T ⊢ secret

12/76 V´ eronique Cortier Verification of Security Protocols

slide-16
SLIDE 16

Formal methods for protocols Cryptographic models Passive case Active case Yesterday course Adding equational theories

Rewriting system

For analyzing equational theories, we (try to) associate to E a finite convergent rewriting system R such that : u =E v iff u ↓= v ↓ Definition (Characterization of the deduction relation) Let t1, . . . tn and u be terms in normal form. {t1, . . . tn} ⊢ u iff ∃C s.t. C[t1, . . . , tn] →∗ u (Also called Cap Intruder problem [Narendran et al])

13/76 V´ eronique Cortier Verification of Security Protocols

slide-17
SLIDE 17

Formal methods for protocols Cryptographic models Passive case Active case Yesterday course Adding equational theories

Some results with equational theories

Security problem Bounded number of sessions Unbounded number of sessions Commutative encryption co-NP-complete [CKRT04] Ping-pong protocols : co-NP-complete [Turuani04] Exclusive Or Decidable [CS03,CKRT03] One copy - No nonces : Decidable [CLC03] Two-way automata - No nonces : Decidable [Verma03] Abelian Groups Decidable [Shmatikov04] Two-way automata - No nonces : Decidable [Verma03] Prefix encryption co-NP-complete [CKRT03] Abelian Groups and Modular Exponentiation General case : Decidable [Shmatikov04] Restricted protocols : co-NP-complete [CKRT03] AC properties of the Modular Exponentiation No nonces : Semi-Decision Procedure [GLRV04]

14/76 V´ eronique Cortier Verification of Security Protocols

slide-18
SLIDE 18

Formal methods for protocols Cryptographic models Passive case Active case Yesterday course Adding equational theories

And now are you ready to use any protocol verified with these techniques ? Assuming : Analysis for an unbounded number of sessions With equational theories

15/76 V´ eronique Cortier Verification of Security Protocols

slide-19
SLIDE 19

Formal methods for protocols Cryptographic models Passive case Active case Yesterday course Adding equational theories

Outline of the talk

Towards more cryptographic guarantees

1

Formal methods for protocols Yesterday course Adding equational theories

2

Cryptographic models Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

3

Passive case Setting Patterns Soundness of indistinguishability

4

Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

16/76 V´ eronique Cortier Verification of Security Protocols

slide-20
SLIDE 20

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Specificity of cryptographic models

Messages are bitstrings Real encryption algorithm Real signature algorithm General and powerful adversary → very little abstract model

17/76 V´ eronique Cortier Verification of Security Protocols

slide-21
SLIDE 21

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Encryption : the old time

Caesar encryption : A → E, B → F, C → G, . . . Cypher Disk (L´ eone Battista Alberti 1466)

18/76 V´ eronique Cortier Verification of Security Protocols

slide-22
SLIDE 22

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Encryption : the old time

Caesar encryption : A → E, B → F, C → G, . . . Cypher Disk (L´ eone Battista Alberti 1466) → subject to statistical analysis (Analyzing letter frequencies)

18/76 V´ eronique Cortier Verification of Security Protocols

slide-23
SLIDE 23

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Encryption : mechanized time

Automatic substitutions and permutations Enigma

19/76 V´ eronique Cortier Verification of Security Protocols

slide-24
SLIDE 24

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Encryption nowadays

→ Based on algorithmically hard problems. RSA Function n = pq, p et q primes. e : public exponent x → xe mod n easy (cubic) y = xe → x mod n difficult x = yd o` u d = e−1 mod φ(n)

20/76 V´ eronique Cortier Verification of Security Protocols

slide-25
SLIDE 25

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Encryption nowadays

→ Based on algorithmically hard problems. RSA Function n = pq, p et q primes. e : public exponent x → xe mod n easy (cubic) y = xe → x mod n difficult x = yd o` u d = e−1 mod φ(n) Diffie-Hellman Problem Given A = ga and B = gb, Compute DH(A, B) = gab

20/76 V´ eronique Cortier Verification of Security Protocols

slide-26
SLIDE 26

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Encryption nowadays

→ Based on algorithmically hard problems. RSA Function n = pq, p et q primes. e : public exponent x → xe mod n easy (cubic) y = xe → x mod n difficult x = yd o` u d = e−1 mod φ(n) Diffie-Hellman Problem Given A = ga and B = gb, Compute DH(A, B) = gab → Based on hardness of integer factorization.

20/76 V´ eronique Cortier Verification of Security Protocols

slide-27
SLIDE 27

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Estimations for integer factorization

Module Operations (bits) (in log2) 512 58 1024 80 2048 111 4096 149 8192 156 ≈ 260 years → Lower bound for RSA and Diffie-Hellman.

21/76 V´ eronique Cortier Verification of Security Protocols

slide-28
SLIDE 28

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

How does an (asymmetric) encryption algorithm look like ?

Example : OAEP [Bellare Rogaway]

M n k1 r k2 G H s t ⊕ ⊕

M : plaintext of length n r : randomness of length k0 G, H : hash function fk : trapdoor function EK(x; r) = fK(s||t)

22/76 V´ eronique Cortier Verification of Security Protocols

slide-29
SLIDE 29

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

What is a secure encryption scheme ?

23/76 V´ eronique Cortier Verification of Security Protocols

slide-30
SLIDE 30

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

What is a secure encryption scheme ?

Intuitively : An adversary should not know the underlying plaintext.

23/76 V´ eronique Cortier Verification of Security Protocols

slide-31
SLIDE 31

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Security of asymmetric encryption

Public data : c = Eke(m, r) cyphertext ke encryption key There exists a unique message m satisfying the relation (with possible several relevant r) → An exhaustive search on m and r yields m !

24/76 V´ eronique Cortier Verification of Security Protocols

slide-32
SLIDE 32

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Security of asymmetric encryption

Public data : c = Eke(m, r) cyphertext ke encryption key There exists a unique message m satisfying the relation (with possible several relevant r) → An exhaustive search on m and r yields m ! ⇒ Unconditional secrecy is impossible, one has to rely on algorithmic assumptions.

24/76 V´ eronique Cortier Verification of Security Protocols

slide-33
SLIDE 33

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

How to define an attacker/adversary

We wish to model an attacker : as clever as possible → he/she should be able to perform any operation with a limited time.

E.g. we do not wish to consider attacks that require 260 years Otherwise, the adversary could enumerate all keys (exponential time in 2size(keys))

25/76 V´ eronique Cortier Verification of Security Protocols

slide-34
SLIDE 34

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

How to define an attacker/adversary

We wish to model an attacker : as clever as possible → he/she should be able to perform any operation with a limited time.

E.g. we do not wish to consider attacks that require 260 years Otherwise, the adversary could enumerate all keys (exponential time in 2size(keys))

Model : we consider any Turing machine that models any algorithm probabilistic : The adversary can generate keys and chose randomly his behavior polynomial in the size of the keys : which represents a reasonable execution time.

25/76 V´ eronique Cortier Verification of Security Protocols

slide-35
SLIDE 35

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Security proof in a nutshell

Proof by reduction

1 Hypothesis : The algorithmic problem P is hard = there is no

polynomial algorithm (P = RSA, DL, DDH, CDH...)

26/76 V´ eronique Cortier Verification of Security Protocols

slide-36
SLIDE 36

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Security proof in a nutshell

Proof by reduction

1 Hypothesis : The algorithmic problem P is hard = there is no

polynomial algorithm (P = RSA, DL, DDH, CDH...)

2 Reduction :

If there exists a (polynomial) adversary A un adversaire (polynomial) breaking the encryption scheme, Then one can build upon A for solving P in polynomial time.

26/76 V´ eronique Cortier Verification of Security Protocols

slide-37
SLIDE 37

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Security proof in a nutshell

Proof by reduction

1 Hypothesis : The algorithmic problem P is hard = there is no

polynomial algorithm (P = RSA, DL, DDH, CDH...)

2 Reduction :

If there exists a (polynomial) adversary A un adversaire (polynomial) breaking the encryption scheme, Then one can build upon A for solving P in polynomial time.

3 Conclusion : the encryption scheme is secure, there is no

polynomial adversary.

26/76 V´ eronique Cortier Verification of Security Protocols

slide-38
SLIDE 38

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

What is a secure encryption scheme ?

An adversary should not know the underlying plaintext. → several possible definitions of knowledge

27/76 V´ eronique Cortier Verification of Security Protocols

slide-39
SLIDE 39

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

One-Wayness (OW)

Basic security property : One-Wayness (OW) without the inverse key, one cannot retrieve the underlying plaintext : Prm,r[c = E(m; r) | A(c) = m] is negligible.

28/76 V´ eronique Cortier Verification of Security Protocols

slide-40
SLIDE 40

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

One-Wayness (OW)

Basic security property : One-Wayness (OW) without the inverse key, one cannot retrieve the underlying plaintext : Prm,r[c = E(m; r) | A(c) = m] is negligible. Negligibility : f is negligible if for any polynomial p, there exists η0 s.t. for all η ≥ η0 f (η) ≤ 1/p(η)

28/76 V´ eronique Cortier Verification of Security Protocols

slide-41
SLIDE 41

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Not strong enough !

The adversary may be able to compute half of the secret message. There is no guarantee in case that some partial information on the secret is known.

29/76 V´ eronique Cortier Verification of Security Protocols

slide-42
SLIDE 42

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Not strong enough !

The adversary may be able to compute half of the secret message. There is no guarantee in case that some partial information on the secret is known. → Introduction of a notion of indistinguishability. : The adversary shall not guess even one bit of the underlying plaintext.

29/76 V´ eronique Cortier Verification of Security Protocols

slide-43
SLIDE 43

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Indistinguabilit´ e (IND)

Game Adversary : A = (A1, A2)

1 the adversary A1 is given the public key pk.

A E A1 A2 pk

30/76 V´ eronique Cortier Verification of Security Protocols

slide-44
SLIDE 44

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Indistinguabilit´ e (IND)

Game Adversary : A = (A1, A2)

1 the adversary A1 is given the public key pk. 2 The adversary A1 chooses two messages m0, m1.

A E A1 A2 pk (m0, m1)

30/76 V´ eronique Cortier Verification of Security Protocols

slide-45
SLIDE 45

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Indistinguabilit´ e (IND)

Game Adversary : A = (A1, A2)

1 the adversary A1 is given the public key pk. 2 The adversary A1 chooses two messages m0, m1. 3 one bit b = 0, 1 is flipped and c = E(mb; r) is given to the

adversary. A E A1 A2 pk (m0, m1) E(mb; r)

30/76 V´ eronique Cortier Verification of Security Protocols

slide-46
SLIDE 46

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Indistinguabilit´ e (IND)

Game Adversary : A = (A1, A2)

1 the adversary A1 is given the public key pk. 2 The adversary A1 chooses two messages m0, m1. 3 one bit b = 0, 1 is flipped and c = E(mb; r) is given to the

adversary.

4 The adversary A2 outputs b′.

A E A1 A2 pk b′ (m0, m1) E(mb; r)

30/76 V´ eronique Cortier Verification of Security Protocols

slide-47
SLIDE 47

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Indistinguabilit´ e (IND)

Game Adversary : A = (A1, A2)

1 the adversary A1 is given the public key pk. 2 The adversary A1 chooses two messages m0, m1. 3 one bit b = 0, 1 is flipped and c = E(mb; r) is given to the

adversary.

4 The adversary A2 outputs b′.

A E A1 A2 pk b′ (m0, m1) E(mb; r) The probability Pr[b = b′] − 1

2 should be negligible.

30/76 V´ eronique Cortier Verification of Security Protocols

slide-48
SLIDE 48

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Even stronger !

Non Malleability (NM) Given a cyphertext E(m; r), the adversary should not be able to create a cyphertext E(m′; r′) such that messages m and m′ have a meaningful relation.

31/76 V´ eronique Cortier Verification of Security Protocols

slide-49
SLIDE 49

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Definition of Non Malleability (NM)

Game Adversary : A = (A1, A2)

1 The adversary A1 is given the public key pk.

A E A1 A2 pk

32/76 V´ eronique Cortier Verification of Security Protocols

slide-50
SLIDE 50

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Definition of Non Malleability (NM)

Game Adversary : A = (A1, A2)

1 The adversary A1 is given the public key pk. 2 The adversary A1 chooses a set of messages M.

A E A1 A2 pk M

32/76 V´ eronique Cortier Verification of Security Protocols

slide-51
SLIDE 51

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Definition of Non Malleability (NM)

Game Adversary : A = (A1, A2)

1 The adversary A1 is given the public key pk. 2 The adversary A1 chooses a set of messages M. 3 Two messages m and m∗ are chosen at random in M and

c = E(m; r) is given to the adversary. A E A1 A2 pk m ∈ M, r M c = E(m; r)

32/76 V´ eronique Cortier Verification of Security Protocols

slide-52
SLIDE 52

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Definition of Non Malleability (NM)

Game Adversary : A = (A1, A2)

1 The adversary A1 is given the public key pk. 2 The adversary A1 chooses a set of messages M. 3 Two messages m and m∗ are chosen at random in M and

c = E(m; r) is given to the adversary.

4 The adversary A2 outputs a binary relation R and a

cyphertext c′. A E A1 A2 pk R, c′ M c = E(m; r) m ∈ M, r

32/76 V´ eronique Cortier Verification of Security Protocols

slide-53
SLIDE 53

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Definition of Non Malleability (NM)

A E A1 A2 pk R, c′ M c = E(m; r) m ∈ M, r

33/76 V´ eronique Cortier Verification of Security Protocols

slide-54
SLIDE 54

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Definition of Non Malleability (NM)

A E A1 A2 pk R, c′ D m′ = D(c′) M c = E(m; r) m ∈ M, r

33/76 V´ eronique Cortier Verification of Security Protocols

slide-55
SLIDE 55

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Definition of Non Malleability (NM)

A E A1 A2 pk R, c′ D m′ = D(c′) M c = E(m; r) m ∈ M, r The probability Pr[R(m, m′)] − Pr[R(m, m∗)] should be negligible.

33/76 V´ eronique Cortier Verification of Security Protocols

slide-56
SLIDE 56

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Relations

Non Malleability ⇓ Indistinguishability ⇓ One-Wayness Exercise (medium) : show the implications.

34/76 V´ eronique Cortier Verification of Security Protocols

slide-57
SLIDE 57

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Adding even more security

The adversary has access to oracles : → Encryption of all messages of his choice → Decryption of all messages of his choice Three standard levels of security : Chosen-Plaintext Attacks (CPA)

35/76 V´ eronique Cortier Verification of Security Protocols

slide-58
SLIDE 58

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Adding even more security

The adversary has access to oracles : → Encryption of all messages of his choice → Decryption of all messages of his choice Three standard levels of security : Chosen-Plaintext Attacks (CPA) Non adaptive Chosen-Ciphertext Attacks (CCA1) → access to the (decryption) oracle before the challenge.

35/76 V´ eronique Cortier Verification of Security Protocols

slide-59
SLIDE 59

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Adding even more security

The adversary has access to oracles : → Encryption of all messages of his choice → Decryption of all messages of his choice Three standard levels of security : Chosen-Plaintext Attacks (CPA) Non adaptive Chosen-Ciphertext Attacks (CCA1) → access to the (decryption) oracle before the challenge. Adaptive Chosen-Ciphertext Attacks (CCA2) → unlimited access to the (decryption) oracle (except for the challenge)

35/76 V´ eronique Cortier Verification of Security Protocols

slide-60
SLIDE 60

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Relations

OW-CPA IND-CPA IND-CCA1 IND-CCA2 NM-CPA NM-CCA1 NM-CCA2

36/76 V´ eronique Cortier Verification of Security Protocols

slide-61
SLIDE 61

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Outline of the talk

Towards more cryptographic guarantees

1

Formal methods for protocols Yesterday course Adding equational theories

2

Cryptographic models Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

3

Passive case Setting Patterns Soundness of indistinguishability

4

Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

37/76 V´ eronique Cortier Verification of Security Protocols

slide-62
SLIDE 62

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Cryptographic models

Encryption is only one component of cryptographic models Cryptographic primitives : encryption, signatures, ... Protocol model Adversary Security notions

38/76 V´ eronique Cortier Verification of Security Protocols

slide-63
SLIDE 63

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Setting for cryptographic protocols

Protocol : Message exchange program using cryptographic primitives Adversary A : any probabilistic polynomial Turing machine, i.e. any probabilistic polynomial program. polynomial : captures what is feasible probabilistic : the adversary may try to guess some information

39/76 V´ eronique Cortier Verification of Security Protocols

slide-64
SLIDE 64

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Definition of secrecy preservation

→ Several notions of secrecy : One-Wayness : The probability for an adversary A to compute the secret s against a protocol P is negligible (smaller than any inverse

  • f polynomial).

∀p polynomial ∃η0 ∀η ≥ η0 Prη

m,r[A(PK) = s] ≤

1 p(η) η : security parameter = key length

40/76 V´ eronique Cortier Verification of Security Protocols

slide-65
SLIDE 65

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Definition of secrecy preservation

→ Several notions of secrecy : One-Wayness : The probability for an adversary A to compute the secret s against a protocol P is negligible (smaller than any inverse

  • f polynomial).

∀p polynomial ∃η0 ∀η ≥ η0 Prη

m,r[A(PK) = s] ≤

1 p(η) η : security parameter = key length → Not enough ! (why ?)

40/76 V´ eronique Cortier Verification of Security Protocols

slide-66
SLIDE 66

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Computational secrecy

Computational secrecy of s is defined through the following game : Two values n0 and n1 are randomly generated instead of s ; The adversary interacts with the protocol where s is replaced by nb, b ∈ {0, 1} ; We give the pair (n0, n1) to the adversary ; The adversary gives b′, The data s is secret if Pr[b = b′] − 1

2 is a negligible function.

41/76 V´ eronique Cortier Verification of Security Protocols

slide-67
SLIDE 67

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

A typical cryptographic proof

1 Assume that some algorithmic problem P is difficult (E.g. RSA

  • r integer factorization or Discrete Log or CDH, DDH, ...)

2 Suppose that a (polynomial probabilistic) adversary A breaks

the protocol security with non negligible probability

42/76 V´ eronique Cortier Verification of Security Protocols

slide-68
SLIDE 68

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

A typical cryptographic proof

1 Assume that some algorithmic problem P is difficult (E.g. RSA

  • r integer factorization or Discrete Log or CDH, DDH, ...)

2 Suppose that a (polynomial probabilistic) adversary A breaks

the protocol security with non negligible probability

3 Build out of A an adversary B that solves P. 42/76 V´ eronique Cortier Verification of Security Protocols

slide-69
SLIDE 69

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

A typical cryptographic proof

1 Assume that some algorithmic problem P is difficult (E.g. RSA

  • r integer factorization or Discrete Log or CDH, DDH, ...)

2 Suppose that a (polynomial probabilistic) adversary A breaks

the protocol security with non negligible probability

3 Build out of A an adversary B that solves P. 4 Conclude that the protocol is secure provided P is difficult. 42/76 V´ eronique Cortier Verification of Security Protocols

slide-70
SLIDE 70

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Outline of the talk

Towards more cryptographic guarantees

1

Formal methods for protocols Yesterday course Adding equational theories

2

Cryptographic models Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

3

Passive case Setting Patterns Soundness of indistinguishability

4

Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

43/76 V´ eronique Cortier Verification of Security Protocols

slide-71
SLIDE 71

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Formal and Cryptographic approaches

Formal approach Cryptographic approach Messages terms bitstrings Encryption idealized algorithm Adversary idealized any polynomial algorithm Secrecy property reachability-based property indistinguishability Guarantees unclear strong Protocol may be complex usually simpler

44/76 V´ eronique Cortier Verification of Security Protocols

slide-72
SLIDE 72

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Formal and Cryptographic approaches

Formal approach Cryptographic approach Messages terms bitstrings Encryption idealized algorithm Adversary idealized any polynomial algorithm Secrecy property reachability-based property indistinguishability Guarantees unclear strong Protocol may be complex usually simpler Proof automatic by hand, tedious and error-prone Link between the two approaches ?

44/76 V´ eronique Cortier Verification of Security Protocols

slide-73
SLIDE 73

Formal methods for protocols Cryptographic models Passive case Active case Encryption schemes Security of encryption Cryptographic models Linking formal and cryptographic models

Composition of the two approaches

Automatic cryptographically sound proofs

Ideal protocol protocol Implemented

  • f the cryptographic primitives
  • f idealized protocols

Formal approach: verification encryption algorithm algorithm signature Cryptographers: verification

45/76 V´ eronique Cortier Verification of Security Protocols

slide-74
SLIDE 74

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Passive Case

A first result : seminal result from M. Abadi and Ph. Rogaway

  • J. of Cryptology, 2002

How to symbolically abstract computational indistinguishability of distributions ?

46/76 V´ eronique Cortier Verification of Security Protocols

slide-75
SLIDE 75

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Setting

Messages are represented by terms T ::= terms | x variable | a name/nonce | f (T1, . . . , Tk) application of symbol f ∈ F In the initial result of Abadi and Rogaway, F = {enc, , } Each functional symbol has a concrete implementation ⇒ a sequence of messages n, enc(n, k), enc(n , n, k) generates a distribution : uniform distribution for nonces and application of the functions (symmetric encryption and pairing).

47/76 V´ eronique Cortier Verification of Security Protocols

slide-76
SLIDE 76

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Distinguishing distributions

The two distributions [ [ψ] ] and [ [ψ′] ] are indistinguishable, [ [ψ] ] ≈ [ [ψ′] ], if P

  • ψ ← [

[ψ] ]; A(η, ψ) = 1

  • − P
  • ψ ← [

[ψ′] ]; A(η, ψ) = 1

  • is a negligible function of η.

48/76 V´ eronique Cortier Verification of Security Protocols

slide-77
SLIDE 77

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Distinguishing distributions

The two distributions [ [ψ] ] and [ [ψ′] ] are indistinguishable, [ [ψ] ] ≈ [ [ψ′] ], if P

  • ψ ← [

[ψ] ]; A(η, ψ) = 1

  • − P
  • ψ ← [

[ψ′] ]; A(η, ψ) = 1

  • is a negligible function of η.

Examples φ1 = n0, n1, enc(n0, k) φ2 = n0, n1, enc(n1, k)

48/76 V´ eronique Cortier Verification of Security Protocols

slide-78
SLIDE 78

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Distinguishing distributions

The two distributions [ [ψ] ] and [ [ψ′] ] are indistinguishable, [ [ψ] ] ≈ [ [ψ′] ], if P

  • ψ ← [

[ψ] ]; A(η, ψ) = 1

  • − P
  • ψ ← [

[ψ′] ]; A(η, ψ) = 1

  • is a negligible function of η.

Examples φ1 = n0, n1, enc(n0, k) ≈ φ2 = n0, n1, enc(n1, k) φ3 = n0, n1, enc(n0, k), k φ4 = n0, n1, enc(n1, k), k

48/76 V´ eronique Cortier Verification of Security Protocols

slide-79
SLIDE 79

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Distinguishing distributions

The two distributions [ [ψ] ] and [ [ψ′] ] are indistinguishable, [ [ψ] ] ≈ [ [ψ′] ], if P

  • ψ ← [

[ψ] ]; A(η, ψ) = 1

  • − P
  • ψ ← [

[ψ′] ]; A(η, ψ) = 1

  • is a negligible function of η.

Examples φ1 = n0, n1, enc(n0, k) ≈ φ2 = n0, n1, enc(n1, k) φ3 = n0, n1, enc(n0, k), k ≈ φ4 = n0, n1, enc(n1, k), k φ5 = enc(n0, k), k φ6 = enc(n0, k′), k

48/76 V´ eronique Cortier Verification of Security Protocols

slide-80
SLIDE 80

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Distinguishing distributions

The two distributions [ [ψ] ] and [ [ψ′] ] are indistinguishable, [ [ψ] ] ≈ [ [ψ′] ], if P

  • ψ ← [

[ψ] ]; A(η, ψ) = 1

  • − P
  • ψ ← [

[ψ′] ]; A(η, ψ) = 1

  • is a negligible function of η.

Examples φ1 = n0, n1, enc(n0, k) ≈ φ2 = n0, n1, enc(n1, k) φ3 = n0, n1, enc(n0, k), k ≈ φ4 = n0, n1, enc(n1, k), k φ5 = enc(n0, k), k ≈ φ6 = enc(n0, k′), k

48/76 V´ eronique Cortier Verification of Security Protocols

slide-81
SLIDE 81

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Patterns : Definition of what is visible to an intruder

Given a sequence S = M1, M2, . . . , Mk, we define Pat(S) = {PatS(M1), PatS(M2), . . . , PatS(Mk)} with

49/76 V´ eronique Cortier Verification of Security Protocols

slide-82
SLIDE 82

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Patterns : Definition of what is visible to an intruder

Given a sequence S = M1, M2, . . . , Mk, we define Pat(S) = {PatS(M1), PatS(M2), . . . , PatS(Mk)} with PatS(a) = a if S ⊢ a

  • therwise

49/76 V´ eronique Cortier Verification of Security Protocols

slide-83
SLIDE 83

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Patterns : Definition of what is visible to an intruder

Given a sequence S = M1, M2, . . . , Mk, we define Pat(S) = {PatS(M1), PatS(M2), . . . , PatS(Mk)} with PatS(a) = a if S ⊢ a

  • therwise

PatS(M1, M2) = PatS(M1), PatS(M2)

49/76 V´ eronique Cortier Verification of Security Protocols

slide-84
SLIDE 84

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Patterns : Definition of what is visible to an intruder

Given a sequence S = M1, M2, . . . , Mk, we define Pat(S) = {PatS(M1), PatS(M2), . . . , PatS(Mk)} with PatS(a) = a if S ⊢ a

  • therwise

PatS(M1, M2) = PatS(M1), PatS(M2) PatS({M}k) =

  • {PatS(M)}k

if S ⊢ k

  • therwise

49/76 V´ eronique Cortier Verification of Security Protocols

slide-85
SLIDE 85

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Reminder : deduction system

Standard “Dolev Yao” deduction system, seen Part I of this course. T ⊢ u T ⊢ v T ⊢ u , v T ⊢ u T ⊢ v T ⊢ enc(u, v) u ∈ T T ⊢ u T ⊢ u , v T ⊢ u T ⊢ u , v T ⊢ v T ⊢ enc(u, v) T ⊢ v T ⊢ u

50/76 V´ eronique Cortier Verification of Security Protocols

slide-86
SLIDE 86

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Examples

φ1 = n0, n1, enc(n0, k) ≈ φ2 = n0, n1, enc(n1, k) n0, n1, n0, n1,

51/76 V´ eronique Cortier Verification of Security Protocols

slide-87
SLIDE 87

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Examples

φ1 = n0, n1, enc(n0, k) ≈ φ2 = n0, n1, enc(n1, k) n0, n1, n0, n1, φ3 = n0, n1, enc(n0, k), k ≈ φ4 = n0, n1, enc(n1, k), k n0, n1, enc(n0, k), k n0, n1, enc(n1, k), k

51/76 V´ eronique Cortier Verification of Security Protocols

slide-88
SLIDE 88

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Examples

φ1 = n0, n1, enc(n0, k) ≈ φ2 = n0, n1, enc(n1, k) n0, n1, n0, n1, φ3 = n0, n1, enc(n0, k), k ≈ φ4 = n0, n1, enc(n1, k), k n0, n1, enc(n0, k), k n0, n1, enc(n1, k), k φ5 = enc(n0, k), k ≈ φ6 = enc(n0, k′), k enc(n0, k), k , k

51/76 V´ eronique Cortier Verification of Security Protocols

slide-89
SLIDE 89

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Examples

φ1 = n0, n1, enc(n0, k) ≈ φ2 = n0, n1, enc(n1, k) n0, n1, n0, n1, φ3 = n0, n1, enc(n0, k), k ≈ φ4 = n0, n1, enc(n1, k), k n0, n1, enc(n0, k), k n0, n1, enc(n1, k), k φ5 = enc(n0, k), k ≈ φ6 = enc(n0, k′), k enc(n0, k), k , k Definition Two patterns are equivalent, denoted by ≡ if they are equal up-to bijective renaming.

51/76 V´ eronique Cortier Verification of Security Protocols

slide-90
SLIDE 90

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Soundness of indistinguishability

Theorem (Abadi-Rogaway) Equivalence of patterns implies computational indistinguishability Pat(S1) ≡ Pat(S2) ⇒ [ [S1] ] ≈ [ [S2] ]

52/76 V´ eronique Cortier Verification of Security Protocols

slide-91
SLIDE 91

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Soundness of indistinguishability

Theorem (Abadi-Rogaway) Equivalence of patterns implies computational indistinguishability Pat(S1) ≡ Pat(S2) ⇒ [ [S1] ] ≈ [ [S2] ] Provided that : Encryption is

IND-CPA

52/76 V´ eronique Cortier Verification of Security Protocols

slide-92
SLIDE 92

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Soundness of indistinguishability

Theorem (Abadi-Rogaway) Equivalence of patterns implies computational indistinguishability Pat(S1) ≡ Pat(S2) ⇒ [ [S1] ] ≈ [ [S2] ] Provided that : Encryption is

IND-CPA message length-concealing Pat(enc(n, k)) = = Pat(enc(n , n, n, n, k))

52/76 V´ eronique Cortier Verification of Security Protocols

slide-93
SLIDE 93

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Soundness of indistinguishability

Theorem (Abadi-Rogaway) Equivalence of patterns implies computational indistinguishability Pat(S1) ≡ Pat(S2) ⇒ [ [S1] ] ≈ [ [S2] ] Provided that : Encryption is

IND-CPA message length-concealing Pat(enc(n, k)) = = Pat(enc(n , n, n, n, k)) which key-concealing Pat(enc(n, k), enc(n′, k)) = = Pat(Pat(enc(n, k), enc(n′, k′)))

52/76 V´ eronique Cortier Verification of Security Protocols

slide-94
SLIDE 94

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Soundness of indistinguishability

Theorem (Abadi-Rogaway) Equivalence of patterns implies computational indistinguishability Pat(S1) ≡ Pat(S2) ⇒ [ [S1] ] ≈ [ [S2] ] Provided that : Encryption is

IND-CPA message length-concealing Pat(enc(n, k)) = = Pat(enc(n , n, n, n, k)) which key-concealing Pat(enc(n, k), enc(n′, k)) = = Pat(Pat(enc(n, k), enc(n′, k′)))

S1, S2 contain no key cycles Examples : enc(k, k) or enc(k1, k2), enc(k2, k1)

52/76 V´ eronique Cortier Verification of Security Protocols

slide-95
SLIDE 95

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Proof of soundness of indistinguishability

Lemma (Main lemma) [ [S] ] ≈ [ [Pat(S)] ] We can then easily deduce the main theorem.

53/76 V´ eronique Cortier Verification of Security Protocols

slide-96
SLIDE 96

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Proof of soundness of indistinguishability

Lemma (Main lemma) [ [S] ] ≈ [ [Pat(S)] ] We can then easily deduce the main theorem. Indeed, assume Pat(S1) ≡ Pat(S2).

1 By the lemma, we have [

[S1] ] ≈ [ [Pat(S1)] ] and [ [S2] ] ≈ [ [Pat(S2)] ].

2 Then Pat(S1) ≡ Pat(S2) implies [

[Pat(S1)] ] ≈ [ [Pat(S2)] ].

53/76 V´ eronique Cortier Verification of Security Protocols

slide-97
SLIDE 97

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Proof of the main lemma [ [S] ] ≈ [ [Pat(S)] ]

Main steps : Renaming Let K1, . . . , kn be the hidden (non deducible) keys of S and J1, . . . , Jl be the visible (deducible) keys of S. Since S contain no key cycles, we may assume that Kj does not encrypt ki whenever i < j.

54/76 V´ eronique Cortier Verification of Security Protocols

slide-98
SLIDE 98

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Proof of the main lemma [ [S] ] ≈ [ [Pat(S)] ]

Main steps : Renaming Let K1, . . . , kn be the hidden (non deducible) keys of S and J1, . . . , Jl be the visible (deducible) keys of S. Since S contain no key cycles, we may assume that Kj does not encrypt ki whenever i < j. Intermediate patterns We define a sequence Pato(S), . . . , . . . Patn(S) such that Pato(S) = Pat(S) and Patn(S) = S

54/76 V´ eronique Cortier Verification of Security Protocols

slide-99
SLIDE 99

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Proof of the main lemma [ [S] ] ≈ [ [Pat(S)] ]

Main steps : Renaming Let K1, . . . , kn be the hidden (non deducible) keys of S and J1, . . . , Jl be the visible (deducible) keys of S. Since S contain no key cycles, we may assume that Kj does not encrypt ki whenever i < j. Intermediate patterns We define a sequence Pato(S), . . . , . . . Patn(S) such that Pato(S) = Pat(S) and Patn(S) = S Hybrid argument If [ [S] ] ≈ [ [Pat(S)] ] then there exists i such that [ [Pati(S)] ] ≈ [ [Pati+1(S)] ].

54/76 V´ eronique Cortier Verification of Security Protocols

slide-100
SLIDE 100

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Proof of the main lemma [ [S] ] ≈ [ [Pat(S)] ]

Main steps : Renaming Let K1, . . . , kn be the hidden (non deducible) keys of S and J1, . . . , Jl be the visible (deducible) keys of S. Since S contain no key cycles, we may assume that Kj does not encrypt ki whenever i < j. Intermediate patterns We define a sequence Pato(S), . . . , . . . Patn(S) such that Pato(S) = Pat(S) and Patn(S) = S Hybrid argument If [ [S] ] ≈ [ [Pat(S)] ] then there exists i such that [ [Pati(S)] ] ≈ [ [Pati+1(S)] ]. Security of encryption [ [Pati(S)] ] ≈ [ [Pati+1(S)] ] contradicts the security of encryption.

54/76 V´ eronique Cortier Verification of Security Protocols

slide-101
SLIDE 101

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Intermediate patterns

Let K1, . . . , kn be the hidden (non deducible) keys of S and J1, . . . , Jl be the visible (deducible) keys of S such that Kj does not encrypt ki whenever i < j. Definition (Intermediate patterns) Pati(S) = PatS∪{K1,...,Ki}(S) Pati(S) : what is visible to an intruder, with the extra knowledge K1, . . . , Ki.

55/76 V´ eronique Cortier Verification of Security Protocols

slide-102
SLIDE 102

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Example of intermediate patterns

Visible keys : J1, J2 Hidden keys : K1, K2 S = Pat2(S) = enc(enc(J1, K2) , J1, K1), enc(J1, J2), J2

56/76 V´ eronique Cortier Verification of Security Protocols

slide-103
SLIDE 103

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Example of intermediate patterns

Visible keys : J1, J2 Hidden keys : K1, K2 S = Pat2(S) = enc(enc(J1, K2) , J1, K1), enc(J1, J2), J2 Pat1(S) = enc( , J1, K1), enc(J1, J2), J2

56/76 V´ eronique Cortier Verification of Security Protocols

slide-104
SLIDE 104

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Example of intermediate patterns

Visible keys : J1, J2 Hidden keys : K1, K2 S = Pat2(S) = enc(enc(J1, K2) , J1, K1), enc(J1, J2), J2 Pat1(S) = enc( , J1, K1), enc(J1, J2), J2 Pat(S) = Pat0(S) = , enc(J1, J2), J2

56/76 V´ eronique Cortier Verification of Security Protocols

slide-105
SLIDE 105

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Hybrid argument

Pat(S) = Pat0(S) Pat1(S) · · · Patn−1(S) Patn(S) = S Assume by contradiction that [ [Pat(S)] ] ≈ [ [S] ]. Then, since the number n of intermediate steps is fixed, there must exist i such that [ [Pati(S)] ] ≈ [ [Pati+1(S)] ]

57/76 V´ eronique Cortier Verification of Security Protocols

slide-106
SLIDE 106

Formal methods for protocols Cryptographic models Passive case Active case Setting Patterns Soundness of indistinguishability

Exercises

Abstracting indistinguishability in various contexts

1 How to adapt the definition of patterns for encryption

schemes that are not which key-concealing ?

2 How to adapt the definition of patterns for encryption

schemes that are not message length-concealing ?

3 How to adapt the definition of patterns for asymmetric

encryption schemes ?

58/76 V´ eronique Cortier Verification of Security Protocols

slide-107
SLIDE 107

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Active Case

Can we extend the work to the active case ? that is, Are standard Dolev-Yao models sound w.r.t. to computational

  • nes ?

59/76 V´ eronique Cortier Verification of Security Protocols

slide-108
SLIDE 108

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

A common setting

Same setting in formal and cryptographic models Adversary Protocol corrupt(a1, . . . , al) private keys of a1, . . . , al new(i, a1, . . . , ak) sid = (s, i, (a1, . . . , ak)) send(sid, m) m′

60/76 V´ eronique Cortier Verification of Security Protocols

slide-109
SLIDE 109

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Formal Intruder Deduction Rules

S⊢m1 S⊢m2 S⊢m1 ,m2 S⊢m1 ,m2 S⊢mi

i ∈ {1, 2}

S⊢ek(b) S⊢m S⊢{m}adv(i)

ek(b)

i ∈ N

S⊢{m}l

ek(b)

S⊢dk(b) S⊢m S⊢sk(b) S⊢m S⊢[m]adv(i)

sk(b)

i ∈ N

S⊢[m]l

sk(b)

S⊢m

61/76 V´ eronique Cortier Verification of Security Protocols

slide-110
SLIDE 110

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Result : Soundness of trace properties

Theorem (extension of [Micciancio Warinschi TCC’04]) Every concrete trace is the image of a valid formal trace, except with negligible probability.

62/76 V´ eronique Cortier Verification of Security Protocols

slide-111
SLIDE 111

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Result : Soundness of trace properties

Theorem (extension of [Micciancio Warinschi TCC’04]) Every concrete trace is the image of a valid formal trace, except with negligible probability. Corollary : Let Π be protocol, Ps an arbitrary predicate on formal traces and Pc its corresponding predicate on concrete traces. Then Π | =s Ps implies Π | =c Pc.

62/76 V´ eronique Cortier Verification of Security Protocols

slide-112
SLIDE 112

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Result : Soundness of trace properties

Theorem (extension of [Micciancio Warinschi TCC’04]) Every concrete trace is the image of a valid formal trace, except with negligible probability. Corollary : Let Π be protocol, Ps an arbitrary predicate on formal traces and Pc its corresponding predicate on concrete traces. Then Π | =s Ps implies Π | =c Pc. Applications : authentication, secrecy, ...

62/76 V´ eronique Cortier Verification of Security Protocols

slide-113
SLIDE 113

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Hypotheses on the Implementation

encryption : IND-CCA2 → the adversary cannot distinguish between {n0}k and {n1}k even if he has access to encryption and decryption oracles. signature : randomized and existentially unforgeable under chosen-message attack i.e. one can not produce a valid pair (m, σ) parsing :

each bit-string has a label which indicates his type (identity, nonce, key, signature, ...)

  • ne can retrieve the (public) encryption key from an encrypted

message.

  • ne can retrieve the signed message from the signature

skip the proof 63/76 V´ eronique Cortier Verification of Security Protocols

slide-114
SLIDE 114

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Proof idea

Proof technique : Reducing the protocol security to the robustness

  • f the primitives (which itself reduces to hardness of algorithmic

problem like integer factorization). A breaks P ⇒ A′ breaks { } or sign

64/76 V´ eronique Cortier Verification of Security Protocols

slide-115
SLIDE 115

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Proof idea

Proof technique : Reducing the protocol security to the robustness

  • f the primitives (which itself reduces to hardness of algorithmic

problem like integer factorization). A breaks P ⇒ A′ breaks { } or sign Example : If a computational (concrete) adversary A is able to compute {na}Ka out of {< A, na >}Ka, Then we can build an adversary A′ that breaks the encryption { }Ka.

64/76 V´ eronique Cortier Verification of Security Protocols

slide-116
SLIDE 116

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Proof idea

Key result : every concrete trace is the image of a valid formal trace, except with negligible probability. init(1, a, b) → {a, na}Kb {na}Kbnon valid ! ↑ ↓ ↑ A : init(1, a, b) m1 → send(m2)

65/76 V´ eronique Cortier Verification of Security Protocols

slide-117
SLIDE 117

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Proof idea

Key result : every concrete trace is the image of a valid formal trace, except with negligible probability. init(1, a, b) → {a, na}Kb {na}Kbnon valid ! ↑ ↓ ↑ A : init(1, a, b) m1 → send(m2) Using the adversary A, we build an adversary A′ that breaks encryption. A′ : (a, n0

a, a, n1 a) → encryption

  • racle

→ {a, nα

a }Kb

65/76 V´ eronique Cortier Verification of Security Protocols

slide-118
SLIDE 118

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Proof idea

Key result : every concrete trace is the image of a valid formal trace, except with negligible probability. init(1, a, b) → {a, na}Kb {na}Kbnon valid ! ↑ ↓ ↑ A : init(1, a, b) m1 → send(m2) Using the adversary A, we build an adversary A′ that breaks encryption. A′ : (a, n0

a, a, n1 a) → encryption

  • racle

→ {a, nα

a }Kb

→ A → {nα

a }Kb

65/76 V´ eronique Cortier Verification of Security Protocols

slide-119
SLIDE 119

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Proof idea

Key result : every concrete trace is the image of a valid formal trace, except with negligible probability. init(1, a, b) → {a, na}Kb {na}Kbnon valid ! ↑ ↓ ↑ A : init(1, a, b) m1 → send(m2) Using the adversary A, we build an adversary A′ that breaks encryption. A′ : (a, n0

a, a, n1 a) → encryption

  • racle

→ {a, nα

a }Kb

→ A → {nα

a }Kb → decryption

  • racle

→ nα

a → α

65/76 V´ eronique Cortier Verification of Security Protocols

slide-120
SLIDE 120

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Trace properties vs observational equivalence

Fact 1 : Computational security properties are often stated as indistinguishability games rather than trace properties. Example : secrecy, ideal functionalities, ...

66/76 V´ eronique Cortier Verification of Security Protocols

slide-121
SLIDE 121

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Trace properties vs observational equivalence

Fact 1 : Computational security properties are often stated as indistinguishability games rather than trace properties. Example : secrecy, ideal functionalities, ... Fact 2 : Some security properties cannot be expressed as trace properties. Example : Privacy properties of e-voting protocols P(A, a)P(B, b) ∼o P(A, b)P(B, a)

66/76 V´ eronique Cortier Verification of Security Protocols

slide-122
SLIDE 122

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Correspondence of computational secrecy

Theorem Symbolic secrecy implies computational secrecy. For protocols with only public key encryption, signatures and nonces Provided the public key encryption and the signature algorithms verify strong existing cryptographic properties (IND-CCA2, existentially unforgeable),

67/76 V´ eronique Cortier Verification of Security Protocols

slide-123
SLIDE 123

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

The previous result does not work in general

Example A → B : h(s) s is inaccessible but not indistinguishable to an attacker : h(nb), n0, n1 → b

68/76 V´ eronique Cortier Verification of Security Protocols

slide-124
SLIDE 124

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

The previous result does not work in general

Example A → B : h(s) s is inaccessible but not indistinguishable to an attacker : h(nb), n0, n1 → b Results :

1 Design of a new formal secrecy property 2 Proof of its soundness and its faithfulness w.r.t.

indistinguishability in our new setting :

pairing asymmetric encryption hashes (random oracle model)

3 NP-completeness of the secrecy property 68/76 V´ eronique Cortier Verification of Security Protocols

slide-125
SLIDE 125

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Patterns : extension to hashes

Given S = {M1, M2, . . . , Mk} and some addintional knowledge T, we define PatT(S) = {PatS∪{T}(M1), PatS∪{T}(M2), . . . , PatS∪{T}(Mk)} with

69/76 V´ eronique Cortier Verification of Security Protocols

slide-126
SLIDE 126

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Patterns : extension to hashes

Given S = {M1, M2, . . . , Mk} and some addintional knowledge T, we define PatT(S) = {PatS∪{T}(M1), PatS∪{T}(M2), . . . , PatS∪{T}(Mk)} with PatS(a) = a if S ⊢ a

  • therwise

69/76 V´ eronique Cortier Verification of Security Protocols

slide-127
SLIDE 127

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Patterns : extension to hashes

Given S = {M1, M2, . . . , Mk} and some addintional knowledge T, we define PatT(S) = {PatS∪{T}(M1), PatS∪{T}(M2), . . . , PatS∪{T}(Mk)} with PatS(a) = a if S ⊢ a

  • therwise

PatS(M1, M2) = PatS(M1), PatS(M2)

69/76 V´ eronique Cortier Verification of Security Protocols

slide-128
SLIDE 128

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Patterns : extension to hashes

Given S = {M1, M2, . . . , Mk} and some addintional knowledge T, we define PatT(S) = {PatS∪{T}(M1), PatS∪{T}(M2), . . . , PatS∪{T}(Mk)} with PatS(a) = a if S ⊢ a

  • therwise

PatS(M1, M2) = PatS(M1), PatS(M2) PatS({M}r

ek(a))

=      {PatS(M)}r

ek(a)

if S ⊢ dk(a) {PatS(M)}r

ek(a)

  • r if r ∈ Randadv
  • therwise

69/76 V´ eronique Cortier Verification of Security Protocols

slide-129
SLIDE 129

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Patterns : extension to hashes

Given S = {M1, M2, . . . , Mk} and some addintional knowledge T, we define PatT(S) = {PatS∪{T}(M1), PatS∪{T}(M2), . . . , PatS∪{T}(Mk)} with PatS(a) = a if S ⊢ a

  • therwise

PatS(M1, M2) = PatS(M1), PatS(M2) PatS({M}r

ek(a))

=      {PatS(M)}r

ek(a)

if S ⊢ dk(a) {PatS(M)}r

ek(a)

  • r if r ∈ Randadv
  • therwise

PatS(h(M)) =

  • h(PatS(M))

if S ⊢ M

  • therwise

69/76 V´ eronique Cortier Verification of Security Protocols

slide-130
SLIDE 130

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Examples

φ1 = {h(nb, n′)}. Then Patnb(φ1) = {} → nb is intuitively hidden by n′.

70/76 V´ eronique Cortier Verification of Security Protocols

slide-131
SLIDE 131

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Examples

φ1 = {h(nb, n′)}. Then Patnb(φ1) = {} → nb is intuitively hidden by n′. φ2 = {h(nb, {n′}r

ek(a)), n′}. Patnb(φ2) = {, n′}.

→ The encryption of n′ does hide nb.

70/76 V´ eronique Cortier Verification of Security Protocols

slide-132
SLIDE 132

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Pattern-based secrecy definition

Π protocol X j

Ai nonce variable occurring in some role Ai.

M set of sent messages s session number Definition X j

Ai is secret in Π, written Π |

=f Invisible(i, j), if : nai,j,s does not occur in Patnai ,j,s(M) ∀M ∈ Exec(Π) ∀s

71/76 V´ eronique Cortier Verification of Security Protocols

slide-133
SLIDE 133

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Soundness and decidability of the secrecy property

Theorem Π | =f Invisiblef (i, j) iff Π | =c Indist(i, j) Remark : Our formal secrecy definition is both sufficient and necessary for indistinguishability in the computational world.

72/76 V´ eronique Cortier Verification of Security Protocols

slide-134
SLIDE 134

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Soundness and decidability of the secrecy property

Theorem Π | =f Invisiblef (i, j) iff Π | =c Indist(i, j) Remark : Our formal secrecy definition is both sufficient and necessary for indistinguishability in the computational world. Theorem Deciding Π | =f Invisiblef (i, j) is NP-complete for a finite number

  • f sessions.

72/76 V´ eronique Cortier Verification of Security Protocols

slide-135
SLIDE 135

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

General computational indistinguishability

Observational equivalence is a sound abstraction of computational indistinguishability. P ∼o Q ⇒ [ [P] ] ≈ [ [Q] ] For simple processes (A fragment of applied pi-calculus that captures most security protocols) For symmetric encryption implemented using IND-CC2 schemes

73/76 V´ eronique Cortier Verification of Security Protocols

slide-136
SLIDE 136

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

General computational indistinguishability

Observational equivalence is a sound abstraction of computational indistinguishability. P ∼o Q ⇒ [ [P] ] ≈ [ [Q] ] For simple processes (A fragment of applied pi-calculus that captures most security protocols) For symmetric encryption implemented using IND-CC2 schemes Limitation : No dishonest keys ! (currently solved by Guillaume Scerri)

73/76 V´ eronique Cortier Verification of Security Protocols

slide-137
SLIDE 137

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Related Work

Abadi-Rogaway, followed by several extensions : passive case. Backes-Pfitzmann very general results : symmetric and asymmetric encryption, pairing, signatures, MACs. less abstract model than classical Dolev-Yao models, Laud : specialized decision procedure for symmetric encryption Datta-Derek-Mitchell-Shmatikov-Turuani : symbolic deduction system for proofs in the concrete model (asymmetric encryption, no automatic procedure) Blanchet : direct automation of the (game-based) cryptographic proofs in the concrete model → tool CryptoVerif

74/76 V´ eronique Cortier Verification of Security Protocols

slide-138
SLIDE 138

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Conclusion

Formal methods form a powerful approach for analyzing security protocols Makes use of classical techniques in formal methods : term algebra, equational theories, clauses and resolution techniques, tree automata, etc. ⇒ Many decision procedures Several automatic tools

For successfully detecting attacks on protocols (e.g. Casper, Avispa) For proving security for an arbitrary number of sessions (e.g. ProVerif)

Provides cryptographic guarantees under classical assumptions

  • n the implementation of the primitives

75/76 V´ eronique Cortier Verification of Security Protocols

slide-139
SLIDE 139

Formal methods for protocols Cryptographic models Passive case Active case Setting Trace mapping A special case : computational secrecy General computational indistinguishability

Some current directions of research

Enriching the symbolic model

Considering more equational theories (e.g. theories for e-voting protocols) Adding more complex structures for data (list, XML, ...) Considering recursive protocols (e.g. group protocol) where the number of message exchanges in a session is not fixed Proving more complex security properties like equivalence-based properties (e.g. for anonymity or e-voting protocols)

With cryptographic guarantees

Combining formal and cryptographic models for more complex primitives and security properties. How far can we go ? Is it possible to consider weaker cryptographic primitives ?

76/76 V´ eronique Cortier Verification of Security Protocols