Verification of security protocols: from confidentiality to privacy - - PowerPoint PPT Presentation

verification of security protocols from confidentiality
SMART_READER_LITE
LIVE PREVIEW

Verification of security protocols: from confidentiality to privacy - - PowerPoint PPT Presentation

Verification of security protocols: from confidentiality to privacy Stphanie Delaune LSV, CNRS & ENS Cachan, France Tuesday, August 25th, 2015 S. Delaune (LSV) Verification of security protocols 25th August 2015 1 / 60 ENS Cachan 12


slide-1
SLIDE 1

Verification of security protocols: from confidentiality to privacy

Stéphanie Delaune

LSV, CNRS & ENS Cachan, France

Tuesday, August 25th, 2015

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 1 / 60

slide-2
SLIDE 2

ENS Cachan

12 academic departments: mathematics, computer science, chemistry, social sciences, . . . 13 research laboratories

Laboratoire Spécification & Vérification

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 2 / 60

slide-3
SLIDE 3

Research at LSV

Verification of critical software and systems Goal: develop the mathematical and algorithmic foundations to the development of tools for automatically proving correctness and detecting flaws. Applications: computerized systems, databases, security protocols

LSV in figures

Founded in 1997 Around 25 permanents + 15 PhD students 5 research teams

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 3 / 60

slide-4
SLIDE 4

SECSI team

Security of Information Systems 4 permanents: David Baelde, H. Comon-Lundh, S. Delaune, et J. Goubault-Larrecq. 1 engineer + 1 postdoc 3 phd students

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 4 / 60

slide-5
SLIDE 5

Cryptographic protocols everywhere !

Goal: they aim at securing communications over public/insecure networks

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 5 / 60

slide-6
SLIDE 6

Some security properties

Secrecy: May an intruder learn some secret message between two honest participants? Authentication: Is the agent Alice really talking to Bob? Anonymity: Is an attacker able to learn something about the identity

  • f the participants who are communicating?

Non-repudiation: Alice sends a message to Bob. Alice cannot later deny having sent this message. Bob cannot deny having received the message. ...

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 6 / 60

slide-7
SLIDE 7

How does a cryptographic protocol work (or not)?

Protocol: small programs explaining how to exchange messages

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 7 / 60

slide-8
SLIDE 8

How does a cryptographic protocol work (or not)?

Protocol: small programs explaining how to exchange messages

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 7 / 60

slide-9
SLIDE 9

How does a cryptographic protocol work (or not)?

Protocol: small programs explaining how to exchange messages Cryptographic: make use of cryptographic primitives Examples: symmetric encryption, asymmetric encryp- tion, signature, hashes, . . .

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 7 / 60

slide-10
SLIDE 10

What is a symmetric encryption scheme?

Symmetric encryption

encryption decryption

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 8 / 60

slide-11
SLIDE 11

What is a symmetric encryption scheme?

Symmetric encryption

encryption decryption

Example: This might be as simple as shifting each letter by a number of places in the alphabet (e.g. Caesar cipher) Today: DES (1977), AES (2000)

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 8 / 60

slide-12
SLIDE 12

A famous example

Enigma machine (1918-1945)

electro-mechanical rotor cipher machines used by the German to encrypt during Wold War II permutations and substitutions A bit of history 1918: invention of the Enigma machine 1940: Battle of the Atlantic during which Alan Turing’s Bombe was used to test Enigma settings. − → Everything about the breaking of the Enigma cipher systems remained secret until the mid-1970s.

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 9 / 60

slide-13
SLIDE 13

Advertisement

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 10 / 60

slide-14
SLIDE 14

What is an asymmetric encryption scheme?

Asymmetric encryption

encryption decryption public key private key

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 11 / 60

slide-15
SLIDE 15

What is an asymmetric encryption scheme?

Asymmetric encryption

encryption decryption public key private key

Examples: 1976: first system published by W. Diffie, and M. Hellman, 1977: RSA system published by R. Rivest, A. Shamir, and L. Adleman. − → their security relies on well-known mathematical problems (e.g. factorizing large numbers, computing discrete logarithms) Today: those systems are still in use

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 11 / 60

slide-16
SLIDE 16

What is a signature scheme?

Signature

signature verification private key public key

Example: The RSA cryptosystem (in fact, most public key cryptosystems) can be used as a signature scheme.

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 12 / 60

slide-17
SLIDE 17

How does a cryptographic protocol work (or not)?

Example: A simplified version of the Denning-Sacco protocol (1981) A → B : aenc(sign(k, priv(A)), pub(B)) B → A : senc(s, k) What about secrecy of s ?

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 13 / 60

slide-18
SLIDE 18

How does a cryptographic protocol work (or not)?

Example: A simplified version of the Denning-Sacco protocol (1981) A → B : aenc(sign(k, priv(A)), pub(B)) B → A : senc(s, k) What about secrecy of s ? Consider a scenario where A starts a session with C who is dishonest.

  • 1. A → C : aenc(sign(k, priv(A)), pub(C))

C knows the key k

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 13 / 60

slide-19
SLIDE 19

How does a cryptographic protocol work (or not)?

Example: A simplified version of the Denning-Sacco protocol (1981) A → B : aenc(sign(k, priv(A)), pub(B)) B → A : senc(s, k) What about secrecy of s ? Consider a scenario where A starts a session with C who is dishonest.

  • 1. A → C : aenc(sign(k, priv(A)), pub(C))

C knows the key k

  • 2. C(A) → B : aenc(sign(k, priv(A)), pub(B))

3. B → A : senc(s, k) Attack !

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 13 / 60

slide-20
SLIDE 20

Exercise

We propose to fix the Denning-Sacco protocol as follows: Version 1 A → B : aenc(A, B, sign(k, priv(A)), pub(B)) B → A : senc(s, k) Version 2 A → B : aenc(sign(A, B, k, priv(A)), pub(B)) B → A : senc(s, k) Which version would you prefer to use?

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 14 / 60

slide-21
SLIDE 21

Exercise

We propose to fix the Denning-Sacco protocol as follows: Version 1 A → B : aenc(A, B, sign(k, priv(A)), pub(B)) B → A : senc(s, k) Version 2 A → B : aenc(sign(A, B, k, priv(A)), pub(B)) B → A : senc(s, k) Which version would you prefer to use? Version 2 − → Version 1 is still vulnerable to the aforementioned attack.

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 14 / 60

slide-22
SLIDE 22

What about protocols used in real life ?

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 15 / 60

slide-23
SLIDE 23

Credit Card payment protocol

Serge Humpich case - “ Yescard “ (1997)

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 16 / 60

slide-24
SLIDE 24

Credit Card payment protocol

Serge Humpich case - “ Yescard “ (1997) Step 1: A logical flaw in the protocol allows one to copy a card and to use it without knowing the PIN code. − → not a real problem, there is still a bank account to withdraw

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 16 / 60

slide-25
SLIDE 25

Credit Card payment protocol

Serge Humpich case - “ Yescard “ (1997) Step 1: A logical flaw in the protocol allows one to copy a card and to use it without knowing the PIN code. − → not a real problem, there is still a bank account to withdraw Step 2: breaking encryption via factorisation of the following (96 digits) number: 213598703592091008239502270499962879705109534182 6417406442524165008583957746445088405009430865999 − → now, the number that is used is made of 232 digits

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 16 / 60

slide-26
SLIDE 26

HTTPS connections

Lots of bugs and attacks, with fixes every month

FREAK attack discovered by Baraghavan et al (Feb. 2015)

1 a logical flaw that allows a man in the middle attacker to downgrade

connections from ’strong’ RSA to ’export-grade’ RSA;

2 breaking encryption via factorisation of such a key can be easily done.

− → ’export-grade’ were introduced under the pressure of US governments agencies to ensure that they would be able to decrypt all foreign encrypted communication.

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 17 / 60

slide-27
SLIDE 27

This talk: formal methods for protocol verification

|

Does the protocol

Modelling

satisfy

| = ϕ

a security property?

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 18 / 60

slide-28
SLIDE 28

This talk: formal methods for protocol verification

|

Does the protocol

Modelling

satisfy

| = ϕ

a security property? Two main tasks

1 Modelling cryptographic protocols and their security properties 2 Designing verification algorithms

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 18 / 60

slide-29
SLIDE 29

Modelling messages and Deciding knowledge

(in a simple setting)

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 19 / 60

slide-30
SLIDE 30

Symbolic model

− → Various models (e.g. [Dolev & Yao, 81]) having some common features

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 20 / 60

slide-31
SLIDE 31

Symbolic model

− → Various models (e.g. [Dolev & Yao, 81]) having some common features

Messages

They are abstracted by terms.

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 20 / 60

slide-32
SLIDE 32

Symbolic model

− → Various models (e.g. [Dolev & Yao, 81]) having some common features

Messages

They are abstracted by terms.

The attacker

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 20 / 60

slide-33
SLIDE 33

Symbolic model

− → Various models (e.g. [Dolev & Yao, 81]) having some common features

Messages

They are abstracted by terms.

The attacker

may read every message sent on the network, may intercept and send new messages according to its deduction capabilities. − → only symbolic manipulations on terms.

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 20 / 60

slide-34
SLIDE 34

Messages as terms

− → It is important to have a tight modelling of messages

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 21 / 60

slide-35
SLIDE 35

Messages as terms

− → It is important to have a tight modelling of messages

Terms

They are built over a signature F, and an infinite set of names N. t ::= n name n ∈ N | f(t1, . . . , tk) application of symbol f ∈ F Names are used to model atomic data − → e.g. keys, nonces, agent names, . . . Function symbols are used to model cryptographic primitives − → e.g. encryption, signature, . . .

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 21 / 60

slide-36
SLIDE 36

A typical signature

Standard primitives

F = {senc, aenc, sk, sign, }

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 22 / 60

slide-37
SLIDE 37

A typical signature

Standard primitives

F = {senc, aenc, sk, sign, } Going back to the Denning Sacco protocol A → B : aenc(sign(k, priv(A)), pub(B)) B → A : senc(s, k) These messages can be modelled as follows:

1 aenc(sign(k, sk(a)), b); 2 senc(s, k)

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 22 / 60

slide-38
SLIDE 38

Capabilities of the attacker

Symbolic manipulation on terms

He may build new messages following deduction rules Pairing Symmetric encryption x y x, y x, y x x, y y x y senc(x, y) senc(x, y) y x Asymmetric encryption Signature x y aenc(x, y) aenc(x, y) sk(y) x x sk(y) sign(x, sk(y)) sign(x, sk(y)) x

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 23 / 60

slide-39
SLIDE 39

Deduction relation T ⊢ u

We say that u is deducible from T if there exists a proof tree such that:

1 each leaf is labeled by v with v ∈ T; 2 for each node labeled by v0 and having n sons labeled by v1, . . . , vn,

there exists a deduction rule R such that v1 . . . vn v0 is an instance of R

3 the root is labeled by u.

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 24 / 60

slide-40
SLIDE 40

Deduction relation T ⊢ u

We say that u is deducible from T if there exists a proof tree such that:

1 each leaf is labeled by v with v ∈ T; 2 for each node labeled by v0 and having n sons labeled by v1, . . . , vn,

there exists a deduction rule R such that v1 . . . vn v0 is an instance of R

3 the root is labeled by u.

Exercise - Going back to the Denning Sacco protocol

Let T = {a, b, c, sk(c), aenc(sign(k, sk(a)), c), senc(s, k)}. Is s deducible from T ?

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 24 / 60

slide-41
SLIDE 41

Exercise

Exercise - Going back to the Denning Sacco protocol

Let T = {a, b, c, sk(c), aenc(sign(k, sk(a)), c), senc(s, k)}. Is s deducible from T ?

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 25 / 60

slide-42
SLIDE 42

Exercise

Exercise - Going back to the Denning Sacco protocol

Let T = {a, b, c, sk(c), aenc(sign(k, sk(a)), c), senc(s, k)}. Is s deducible from T ? Answer: Of course, Yes ! senc(s, k) aenc(sign(k, sk(a)), c) sk(c) sign(k, sk(a)) k s

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 25 / 60

slide-43
SLIDE 43

Denning Sacco protocol

  • 1. A → C : aenc(sign(k, priv(A)), pub(C))
  • 2. C(A) → B : aenc(sign(k, priv(A)), pub(B))

3. B → A : senc(s, k) Attack !

Exercise (continued)

Let T0 = {a, b, c, sk(c), aenc(sign(k, sk(a)), c)}. Is aenc(sign(k, sk(a)), b) deducible from T0?

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 26 / 60

slide-44
SLIDE 44

Denning Sacco protocol

  • 1. A → C : aenc(sign(k, priv(A)), pub(C))
  • 2. C(A) → B : aenc(sign(k, priv(A)), pub(B))

3. B → A : senc(s, k) Attack !

Exercise (continued)

Let T0 = {a, b, c, sk(c), aenc(sign(k, sk(a)), c)}. Is aenc(sign(k, sk(a)), b) deducible from T0? Answer: Of course, Yes ! aenc(sign(k, sk(a)), c) sk(c) sign(k, sk(a)) b aenc(sign(k, sk(a)), b)

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 26 / 60

slide-45
SLIDE 45

Deciding deduction (in this simple setting)

The deduction problem

Input: a finite set of terms T (the knowledge of the attacker) and a term u (the secret), Output: Is u deducible from T?

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 27 / 60

slide-46
SLIDE 46

Deciding deduction (in this simple setting)

The deduction problem

Input: a finite set of terms T (the knowledge of the attacker) and a term u (the secret), Output: Is u deducible from T?

Proposition

The deduction problem is decidable in PTIME.

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 27 / 60

slide-47
SLIDE 47

Deciding deduction (in this simple setting)

The deduction problem

Input: a finite set of terms T (the knowledge of the attacker) and a term u (the secret), Output: Is u deducible from T?

Proposition

The deduction problem is decidable in PTIME. Algorithm

1 Saturation of T with terms in St(T ∪ {u}) that are deducible in one

step;

2 if u is in the saturated set then return Yes else return No.

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 27 / 60

slide-48
SLIDE 48

Soundness, completeness, and termination

Soundness If the algorithm returns Yes then u is indeed deducible from T. − → easy to prove

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 28 / 60

slide-49
SLIDE 49

Soundness, completeness, and termination

Soundness If the algorithm returns Yes then u is indeed deducible from T. − → easy to prove Termination The set of subterms is finite and polynomial, and one-step deducibility can be checked in polynomial time. − → easy to prove for the deduction rules under study

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 28 / 60

slide-50
SLIDE 50

Soundness, completeness, and termination

Soundness If the algorithm returns Yes then u is indeed deducible from T. − → easy to prove Termination The set of subterms is finite and polynomial, and one-step deducibility can be checked in polynomial time. − → easy to prove for the deduction rules under study Completeness If the term u is deducible from T, then the algorithm returns Yes. Otherwise, it returns No. − → this relies on a locality property

Locality lemma

Let T and u be such that T ⊢ u. There exists a prooftree witnessing this fact for which all the nodes are labeled by some v with v ∈ St(T ∪ {u}).

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 28 / 60

slide-51
SLIDE 51

Proof sketch

Locality lemma

Let T and u be such that T ⊢ u. There exists a tree witnessing this fact for which all the nodes are labeled by some v with v ∈ St(T ∪ {u}). Let P be a proof tree witnessing the fact that T ⊢ u having a minimal size (number of nodes). We show by induction on P that: if P ends with root labeled by v then P only contains terms in St(T ∪ {v});

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 29 / 60

slide-52
SLIDE 52

Proof sketch

Locality lemma

Let T and u be such that T ⊢ u. There exists a tree witnessing this fact for which all the nodes are labeled by some v with v ∈ St(T ∪ {u}). We first split the deduction rules into two categories:

1 composition rules: encryption, signature, and pairing 2 decomposition rules: decryption, projections, . . .

Let P be a proof tree witnessing the fact that T ⊢ u having a minimal size (number of nodes). We show by induction on P that: if P ends with root labeled by v then P only contains terms in St(T ∪ {v}); if P ends with a decomposition rule then P only contains terms in St(T). − → this is left as an exercise

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 29 / 60

slide-53
SLIDE 53

Exercise

Consider the following set of deduction rules: x sk(y) sign(x, sk(y)) sign(x, sk(y)) vk(y) x y vk(y)

1 Give an example showing that these deduction rules are not local. 2 Extend the notion of subterms to restore the locality property, and

show that de deduction problem is decidable.

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 30 / 60

slide-54
SLIDE 54

Exercise

Consider the following set of deduction rules: x sk(y) sign(x, sk(y)) sign(x, sk(y)) vk(y) x y vk(y)

1 Give an example showing that these deduction rules are not local. 2 Extend the notion of subterms to restore the locality property, and

show that de deduction problem is decidable. Solution

1 Let T = {sign(s, sk(a)); a} and u = s. 2 St+(T) = St(T) ∪ {vk(u) | sk(u) ∈ vk(u) ∈ St(T)}.

− → the locality proof is left as an exercise

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 30 / 60

slide-55
SLIDE 55

Exercise

Consider the following set of deduction rules: x y x, y x, y x x, y y x y senc(x, y) senc(x, y) y x In order to decide whether a term u is deducible from a set of terms T, we propose the following algorithm:

1 Starting from T, apply as much as possible the decryption and the

projection rules This leads to a set of terms called Decomposition(T).

2 Check whether u can be obtained by applying the composition rules

  • n top of terms in Decomposition(T).

3 In case of success, the algorithm returns Yes. Otherwise, it returns No.

Questions

What about termination, soundness, and completness?

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 31 / 60

slide-56
SLIDE 56

Modelling messages and Deciding knowledge

(in a richer setting)

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 32 / 60

slide-57
SLIDE 57

More cryptographic primitives

We may want to consider a richer term algebra and rely on an equational theory E to take into account the properties of the primitives Exclusive or operator: (x ⊕ y) ⊕ z = x ⊕ (y ⊕ z) x ⊕ x = x ⊕ y = y ⊕ x x ⊕ 0 = x

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 33 / 60

slide-58
SLIDE 58

More cryptographic primitives

We may want to consider a richer term algebra and rely on an equational theory E to take into account the properties of the primitives Exclusive or operator: (x ⊕ y) ⊕ z = x ⊕ (y ⊕ z) x ⊕ x = x ⊕ y = y ⊕ x x ⊕ 0 = x Blind signature (used in evoting protocol) check(sign(x, y), vk(y)) = x unblind(blind(y, y), y) = x unblindsign(sign(blind(x, y), z), y) = sign(x, z)

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 33 / 60

slide-59
SLIDE 59

More cryptographic primitives

We may want to consider a richer term algebra and rely on an equational theory E to take into account the properties of the primitives Exclusive or operator: (x ⊕ y) ⊕ z = x ⊕ (y ⊕ z) x ⊕ x = x ⊕ y = y ⊕ x x ⊕ 0 = x Blind signature (used in evoting protocol) check(sign(x, y), vk(y)) = x unblind(blind(y, y), y) = x unblindsign(sign(blind(x, y), z), y) = sign(x, z) Homomorphic encryption: sdec(senc(x, y), y) = x enc(x, y, z) = enc(x, z), enc(y, z) proj1(x, y) = x dec(x, y, z) = dec(x, z), dec(y, z) proj2(x, y) = y

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 33 / 60

slide-60
SLIDE 60

Going back to the Denning Sacco protocol

A → B : aenc(sign(k, priv(A)), pub(B)) B → A : senc(s, k) What function symbols and equations do we need to model this protocol?

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 34 / 60

slide-61
SLIDE 61

Going back to the Denning Sacco protocol

A → B : aenc(sign(k, priv(A)), pub(B)) B → A : senc(s, k) What function symbols and equations do we need to model this protocol?

1 symmetric encryption: senc(·, ·), sdec(·, ·)

− → sdec(senc(x, y), y) = x

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 34 / 60

slide-62
SLIDE 62

Going back to the Denning Sacco protocol

A → B : aenc(sign(k, priv(A)), pub(B)) B → A : senc(s, k) What function symbols and equations do we need to model this protocol?

1 symmetric encryption: senc(·, ·), sdec(·, ·)

− → sdec(senc(x, y), y) = x

2 asymmetric encryption: aenc(·, ·), adec(·, ·), pk(·)

− → adec(aenc(x, pk(y)), y) = x

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 34 / 60

slide-63
SLIDE 63

Going back to the Denning Sacco protocol

A → B : aenc(sign(k, priv(A)), pub(B)) B → A : senc(s, k) What function symbols and equations do we need to model this protocol?

1 symmetric encryption: senc(·, ·), sdec(·, ·)

− → sdec(senc(x, y), y) = x

2 asymmetric encryption: aenc(·, ·), adec(·, ·), pk(·)

− → adec(aenc(x, pk(y)), y) = x

3 signature: sign(·, ·), check(·, ·)

− → check(sign(x, y), pk(y)) = x

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 34 / 60

slide-64
SLIDE 64

Deduction in this more general setting

Deduction rules are as follows: u1 · · · uk f ∈ F f(u1, . . . , uk) u u =E u′ u′

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 35 / 60

slide-65
SLIDE 65

Deduction in this more general setting

Deduction rules are as follows: u1 · · · uk f ∈ F f(u1, . . . , uk) u u =E u′ u′ Example: Let E := sdec(senc(x, y), y) = x and T = {senc(secret, k), k}. We have that T ⊢ secret. senc(secret, k) k sdec ∈ F sdec(senc(secret, k), k) sdec(senc(x, y), y) = x secret

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 35 / 60

slide-66
SLIDE 66

The deduction problem: is u deducible from φ?

We consider a signature F and an equational theory E.

The deduction problem

Input A sequence φ = {w1 ⊲ v1, . . . , wn ⊲ vn} of terms and a term u Output Is u deducible from φ ?

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 36 / 60

slide-67
SLIDE 67

The deduction problem: is u deducible from φ?

We consider a signature F and an equational theory E.

The deduction problem

Input A sequence φ = {w1 ⊲ v1, . . . , wn ⊲ vn} of terms and a term u Output Is u deducible from φ ? Characterization of deduction T ⊢ u if, and only if, there exists a term R such that Rφ =E u. − → such a term R is a recipe of the term u.

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 36 / 60

slide-68
SLIDE 68

The deduction problem: is u deducible from φ?

We consider a signature F and an equational theory E.

The deduction problem

Input A sequence φ = {w1 ⊲ v1, . . . , wn ⊲ vn} of terms and a term u Output Is u deducible from φ ? Characterization of deduction T ⊢ u if, and only if, there exists a term R such that Rφ =E u. − → such a term R is a recipe of the term u. Example: Let φ = {w1 ⊲ pk(ska); w2 ⊲ pk(skb); w3 ⊲ skc; w4 ⊲ aenc(sign(k, ska), pk(skc)); w5 ⊲ senc(s, k)}. We have that:

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 36 / 60

slide-69
SLIDE 69

The deduction problem: is u deducible from φ?

We consider a signature F and an equational theory E.

The deduction problem

Input A sequence φ = {w1 ⊲ v1, . . . , wn ⊲ vn} of terms and a term u Output Is u deducible from φ ? Characterization of deduction T ⊢ u if, and only if, there exists a term R such that Rφ =E u. − → such a term R is a recipe of the term u. Example: Let φ = {w1 ⊲ pk(ska); w2 ⊲ pk(skb); w3 ⊲ skc; w4 ⊲ aenc(sign(k, ska), pk(skc)); w5 ⊲ senc(s, k)}. We have that: k is deducible from φ using R1 = check(adec(w4, w3), w1),

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 36 / 60

slide-70
SLIDE 70

The deduction problem: is u deducible from φ?

We consider a signature F and an equational theory E.

The deduction problem

Input A sequence φ = {w1 ⊲ v1, . . . , wn ⊲ vn} of terms and a term u Output Is u deducible from φ ? Characterization of deduction T ⊢ u if, and only if, there exists a term R such that Rφ =E u. − → such a term R is a recipe of the term u. Example: Let φ = {w1 ⊲ pk(ska); w2 ⊲ pk(skb); w3 ⊲ skc; w4 ⊲ aenc(sign(k, ska), pk(skc)); w5 ⊲ senc(s, k)}. We have that: k is deducible from φ using R1 = check(adec(w4, w3), w1), s is deducible from φ using R2 = sdec(w5, R1).

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 36 / 60

slide-71
SLIDE 71

Deduction problem in this richer setting

Proposition

The deduction problem is decidable for the equational theory modelling the DS protocol (and actually any subterm convergent equational theory). Algorithm:

1 saturation of φ with its deducible subterm; we get φ+ 2 does there exist a recipe R such that Rφ+ = s (syntaxic equality)

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 37 / 60

slide-72
SLIDE 72

Deduction problem in this richer setting

Proposition

The deduction problem is decidable for the equational theory modelling the DS protocol (and actually any subterm convergent equational theory). Algorithm:

1 saturation of φ with its deducible subterm; we get φ+ 2 does there exist a recipe R such that Rφ+ = s (syntaxic equality)

Going back to the previous example: φ = {w1 ⊲ pk(ska); w2 ⊲ pk(skb); w3 ⊲ skc; w4 ⊲ aenc(sign(k, ska), pk(skc)); w5 ⊲ senc(s, k)}.

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 37 / 60

slide-73
SLIDE 73

Deduction problem in this richer setting

Proposition

The deduction problem is decidable for the equational theory modelling the DS protocol (and actually any subterm convergent equational theory). Algorithm:

1 saturation of φ with its deducible subterm; we get φ+ 2 does there exist a recipe R such that Rφ+ = s (syntaxic equality)

Going back to the previous example: φ = {w1 ⊲ pk(ska); w2 ⊲ pk(skb); w3 ⊲ skc; w4 ⊲ aenc(sign(k, ska), pk(skc)); w5 ⊲ senc(s, k)}.

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 37 / 60

slide-74
SLIDE 74

Deduction problem in this richer setting

Proposition

The deduction problem is decidable for the equational theory modelling the DS protocol (and actually any subterm convergent equational theory). Algorithm:

1 saturation of φ with its deducible subterm; we get φ+ 2 does there exist a recipe R such that Rφ+ = s (syntaxic equality)

Going back to the previous example: φ = {w1 ⊲ pk(ska); w2 ⊲ pk(skb); w3 ⊲ skc; w4 ⊲ aenc(sign(k, ska), pk(skc)); w5 ⊲ senc(s, k)}. φ+ = φ ⊎ {w6 ⊲ sign(k, ska); w7 ⊲ pk(skc); w8 ⊲ k; w9 ⊲ s}.

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 37 / 60

slide-75
SLIDE 75

Some other equational theories

Blind signature check(sign(x, y), vk(y)) = x unblind(blind(y, y), y) = x unblindsign(sign(blind(x, y), z), y) = sign(x, z) Decidability can be shown in a similar fashion extending the notion of subterm. − → sign(m, k) will be considered as a subterm of sign(blind(m, r), k)

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 38 / 60

slide-76
SLIDE 76

Some other equational theories

Blind signature check(sign(x, y), vk(y)) = x unblind(blind(y, y), y) = x unblindsign(sign(blind(x, y), z), y) = sign(x, z) Decidability can be shown in a similar fashion extending the notion of subterm. − → sign(m, k) will be considered as a subterm of sign(blind(m, r), k) Exclusive or (x ⊕ y) ⊕ z = x ⊕ (y ⊕ z) x ⊕ x = x ⊕ y = y ⊕ x x ⊕ 0 = x The deduction problem can be reduced to the problem of solving systems

  • f linear equations over Z/2Z.
  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 38 / 60

slide-77
SLIDE 77

Deduction is not always sufficient

pub(k) enc(yes, pub(k)) → The intruder knows the values yes and no !

The real question

Is the intruder able to tell whether Alice sends yes or no?

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 39 / 60

slide-78
SLIDE 78

Static equivalence

The static equivalence problem

Input Two frames φ and ψ φ = {w1 ⊲ u1, . . . , wℓ ⊲ uℓ} ψ = {w1 ⊲ v1, . . . , wℓ ⊲ vℓ} Ouput Can the attacker distinguish the two frames, i.e. does there exist a test R1

?

= R2 such that: R1φ =E R2φ but R1ψ =E R2ψ (or the converse).

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 40 / 60

slide-79
SLIDE 79

Static equivalence

The static equivalence problem

Input Two frames φ and ψ φ = {w1 ⊲ u1, . . . , wℓ ⊲ uℓ} ψ = {w1 ⊲ v1, . . . , wℓ ⊲ vℓ} Ouput Can the attacker distinguish the two frames, i.e. does there exist a test R1

?

= R2 such that: R1φ =E R2φ but R1ψ =E R2ψ (or the converse). Example: Consider the frames: φ = {w1 ⊲ pk(sks); w2 ⊲ aenc(yes, pk(sks))}; and ψ = {w1 ⊲ pk(sks); w2 ⊲ aenc(no, pk(sks))}. They are not in static equivalence: aenc(yes, w1) ? = w2.

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 40 / 60

slide-80
SLIDE 80

Exercise

Consider the equational theories: Esenc defined by sdec(senc(x, y), y) = x, and Ecipher which extends Esenc by the equation senc(sdec(x, y), y) = x.

Questions

Which of the following pairs of frames are statically equivalent ? Whenever applicable give the distinguishing test. {w1 ⊲ yes}

?

∼Esenc {w1 ⊲ no} {w1 ⊲ senc(yes, k)}

?

∼Esenc {w1 ⊲ senc(no, k)} {w1 ⊲ senc(n, k), w2 ⊲ k}

?

∼Esenc {w1 ⊲ senc(n, k), w2 ⊲ k′} {w1 ⊲ senc(n, k), w2 ⊲ k}

?

∼Ecipher {w1 ⊲ senc(n, k), w2 ⊲ k′}

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 41 / 60

slide-81
SLIDE 81

Exercise

Consider the equational theories: Esenc defined by sdec(senc(x, y), y) = x, and Ecipher which extends Esenc by the equation senc(sdec(x, y), y) = x.

Questions

Which of the following pairs of frames are statically equivalent ? Whenever applicable give the distinguishing test. {w1 ⊲ yes}

?

∼Esenc {w1 ⊲ no} X {w1 ⊲ senc(yes, k)}

?

∼Esenc {w1 ⊲ senc(no, k)} {w1 ⊲ senc(n, k), w2 ⊲ k}

?

∼Esenc {w1 ⊲ senc(n, k), w2 ⊲ k′} {w1 ⊲ senc(n, k), w2 ⊲ k}

?

∼Ecipher {w1 ⊲ senc(n, k), w2 ⊲ k′}

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 41 / 60

slide-82
SLIDE 82

Exercise

Consider the equational theories: Esenc defined by sdec(senc(x, y), y) = x, and Ecipher which extends Esenc by the equation senc(sdec(x, y), y) = x.

Questions

Which of the following pairs of frames are statically equivalent ? Whenever applicable give the distinguishing test. {w1 ⊲ yes}

?

∼Esenc {w1 ⊲ no} X {w1 ⊲ senc(yes, k)}

?

∼Esenc {w1 ⊲ senc(no, k)}

  • {w1 ⊲ senc(n, k), w2 ⊲ k}

?

∼Esenc {w1 ⊲ senc(n, k), w2 ⊲ k′} {w1 ⊲ senc(n, k), w2 ⊲ k}

?

∼Ecipher {w1 ⊲ senc(n, k), w2 ⊲ k′}

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 41 / 60

slide-83
SLIDE 83

Exercise

Consider the equational theories: Esenc defined by sdec(senc(x, y), y) = x, and Ecipher which extends Esenc by the equation senc(sdec(x, y), y) = x.

Questions

Which of the following pairs of frames are statically equivalent ? Whenever applicable give the distinguishing test. {w1 ⊲ yes}

?

∼Esenc {w1 ⊲ no} X {w1 ⊲ senc(yes, k)}

?

∼Esenc {w1 ⊲ senc(no, k)}

  • {w1 ⊲ senc(n, k), w2 ⊲ k}

?

∼Esenc {w1 ⊲ senc(n, k), w2 ⊲ k′} X {w1 ⊲ senc(n, k), w2 ⊲ k}

?

∼Ecipher {w1 ⊲ senc(n, k), w2 ⊲ k′}

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 41 / 60

slide-84
SLIDE 84

Exercise

Consider the equational theories: Esenc defined by sdec(senc(x, y), y) = x, and Ecipher which extends Esenc by the equation senc(sdec(x, y), y) = x.

Questions

Which of the following pairs of frames are statically equivalent ? Whenever applicable give the distinguishing test. {w1 ⊲ yes}

?

∼Esenc {w1 ⊲ no} X {w1 ⊲ senc(yes, k)}

?

∼Esenc {w1 ⊲ senc(no, k)}

  • {w1 ⊲ senc(n, k), w2 ⊲ k}

?

∼Esenc {w1 ⊲ senc(n, k), w2 ⊲ k′} X {w1 ⊲ senc(n, k), w2 ⊲ k}

?

∼Ecipher {w1 ⊲ senc(n, k), w2 ⊲ k′}

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 41 / 60

slide-85
SLIDE 85

Static equivalence

Proposition

The static equivalence problem is decidable in PTIME for the theory modelling the DS protocol (and actually any subterm convergent equational theory).

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 42 / 60

slide-86
SLIDE 86

Static equivalence

Proposition

The static equivalence problem is decidable in PTIME for the theory modelling the DS protocol (and actually any subterm convergent equational theory). Algorithm:

1 saturation of φ/ψ with their deducible subterms φ+/ψ+ 2 does there exist a test R1

?

= R2 such that R1φ+ = R2φ+ whereas R1ψ+ = R2ψ+ (again syntaxic equality) ? − → actually, we only need to consider small tests

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 42 / 60

slide-87
SLIDE 87

Example

Consider the frames: φ = {w1 ⊲ aenc(yes, r1, pk(sks)); w2 ⊲ sks}; and ψ = {w1 ⊲ aenc(no, r2, pk(sks)); w2 ⊲ sks}. They are not in static equivalence: proj1(adec(w1, w2)) ? = yes.

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 43 / 60

slide-88
SLIDE 88

Example

Consider the frames: φ = {w1 ⊲ aenc(yes, r1, pk(sks)); w2 ⊲ sks}; and ψ = {w1 ⊲ aenc(no, r2, pk(sks)); w2 ⊲ sks}. They are not in static equivalence: proj1(adec(w1, w2)) ? = yes. Applying the algorithm on these frames, we get: φ+ = φ ⊎ { , and ψ+ = ψ ⊎ { .

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 43 / 60

slide-89
SLIDE 89

Example

Consider the frames: φ = {w1 ⊲ aenc(yes, r1, pk(sks)); w2 ⊲ sks}; and ψ = {w1 ⊲ aenc(no, r2, pk(sks)); w2 ⊲ sks}. They are not in static equivalence: proj1(adec(w1, w2)) ? = yes. Applying the algorithm on these frames, we get: φ+ = φ ⊎ {w3 ⊲ yes, r1; , and ψ+ = ψ ⊎ {w3 ⊲ no, r2; .

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 43 / 60

slide-90
SLIDE 90

Example

Consider the frames: φ = {w1 ⊲ aenc(yes, r1, pk(sks)); w2 ⊲ sks}; and ψ = {w1 ⊲ aenc(no, r2, pk(sks)); w2 ⊲ sks}. They are not in static equivalence: proj1(adec(w1, w2)) ? = yes. Applying the algorithm on these frames, we get: φ+ = φ ⊎ {w3 ⊲ yes, r1; w4 ⊲ yes; , and ψ+ = ψ ⊎ {w3 ⊲ no, r2; w4 ⊲ no; .

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 43 / 60

slide-91
SLIDE 91

Example

Consider the frames: φ = {w1 ⊲ aenc(yes, r1, pk(sks)); w2 ⊲ sks}; and ψ = {w1 ⊲ aenc(no, r2, pk(sks)); w2 ⊲ sks}. They are not in static equivalence: proj1(adec(w1, w2)) ? = yes. Applying the algorithm on these frames, we get: φ+ = φ ⊎ {w3 ⊲ yes, r1; w4 ⊲ yes; w5 ⊲ r1}, and ψ+ = ψ ⊎ {w3 ⊲ no, r2; w4 ⊲ no; w5 ⊲ r2}.

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 43 / 60

slide-92
SLIDE 92

Example

Consider the frames: φ = {w1 ⊲ aenc(yes, r1, pk(sks)); w2 ⊲ sks}; and ψ = {w1 ⊲ aenc(no, r2, pk(sks)); w2 ⊲ sks}. They are not in static equivalence: proj1(adec(w1, w2)) ? = yes. Applying the algorithm on these frames, we get: φ+ = φ ⊎ {w3 ⊲ yes, r1; w4 ⊲ yes; w5 ⊲ r1}, and ψ+ = ψ ⊎ {w3 ⊲ no, r2; w4 ⊲ no; w5 ⊲ r2}. − → Conclusion: φ+ and ψ+ are not in static equivalence: w4

?

= yes.

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 43 / 60

slide-93
SLIDE 93

Some other equational theories

Blind signature check(sign(x, y), vk(y)) = x unblind(blind(x, y), y) = x unblindsign(sign(blind(x, y), z), y) = sign(x, z) This can be done in a similar fashion extending a bit the notion of subterm − → again sign(m, k) will be considered as a subterm of sign(blind(m, r), k).

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 44 / 60

slide-94
SLIDE 94

Some other equational theories

Blind signature check(sign(x, y), vk(y)) = x unblind(blind(x, y), y) = x unblindsign(sign(blind(x, y), z), y) = sign(x, z) This can be done in a similar fashion extending a bit the notion of subterm − → again sign(m, k) will be considered as a subterm of sign(blind(m, r), k). Exclusive or (x ⊕ y) ⊕ z = x ⊕ (y ⊕ z) x ⊕ x = x ⊕ y = y ⊕ x x ⊕ 0 = x The static equivalence problem can be reduced in PTIME to the problem of deciding whether two systems of linear equations have the same set of solutions overs Z/2Z.

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 44 / 60

slide-95
SLIDE 95

Existing decidability/complexity results and tools

Theory E Deduction Static Equivalence subterm convergent PTIME blind sign., addition, decidable

  • homo. encryption

[Abadi & Cortier, TCS’06]

ACU NP-complete PTIME Exclusive Or PTIME PTIME Abelian Group ACUNh/AGh PTIME decidable

[D., IPL’05;Cortier & D., JAR’12]

− → A combination result for disjoint theories [Cortier & D., JAR’12] − → Automatic tools for checking static equivalence: YAPA M. Baudet (2006); KISS S. Ciobaca (2010); and FAST B. Conchinha (2011)

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 45 / 60

slide-96
SLIDE 96

Modelling protocols and security properties

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 46 / 60

slide-97
SLIDE 97

Protocols as processes

Applied pi calculus [Abadi & Fournet, 01]

basic programming language with constructs for concurrency and communication − → based on the π-calculus [Milner et al., 92], and in some ways similar to the spi-calculus [Abadi & Gordon, 98]

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 47 / 60

slide-98
SLIDE 98

Protocols as processes

Applied pi calculus [Abadi & Fournet, 01]

basic programming language with constructs for concurrency and communication − → based on the π-calculus [Milner et al., 92], and in some ways similar to the spi-calculus [Abadi & Gordon, 98] Some advantages: allows us to model cryptographic primitives both reachability and equivalence-based specification of properties

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 47 / 60

slide-99
SLIDE 99

Protocols as processes - syntax and semantics

Syntax : P, Q := null process in(c, x).P input

  • ut(c, u).P
  • utput

if u = v then P else Q conditional P | Q parallel composition !P replication new n.P fresh name generation

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 48 / 60

slide-100
SLIDE 100

Protocols as processes - syntax and semantics

Syntax : P, Q := null process in(c, x).P input

  • ut(c, u).P
  • utput

if u = v then P else Q conditional P | Q parallel composition !P replication new n.P fresh name generation Semantics →: Comm

  • ut(c, M).P | in(c, x).Q → P | Q{M/x}

Then if M = N then P else Q → P when M =E N Else if M = N then P else Q → Q when M =E N closed by structural equivalence (≡) and application of evaluation contexts.

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 48 / 60

slide-101
SLIDE 101

Going back to Denning Sacco protocol

A → B : aenc(sign(k, priv(A)), pub(B)) B → A : senc(s, k)

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 49 / 60

slide-102
SLIDE 102

Going back to Denning Sacco protocol

A → B : aenc(sign(k, priv(A)), pub(B)) B → A : senc(s, k)

Alice and Bob as processes:

PA(ska, pkb) = new k. out(c, aenc(sign(k, ska), pkb)). in(c, xa). let ya = sdec(xa, k) in...

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 49 / 60

slide-103
SLIDE 103

Going back to Denning Sacco protocol

A → B : aenc(sign(k, priv(A)), pub(B)) B → A : senc(s, k)

Alice and Bob as processes:

PA(ska, pkb) = new k. out(c, aenc(sign(k, ska), pkb)). in(c, xa). let ya = sdec(xa, k) in... PB(skb, pka) = in(c, xb). let yb = check(adec(xb, skb), pka) in new s.out(c, senc(s, yb))

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 49 / 60

slide-104
SLIDE 104

Going back to Denning Sacco protocol

A → B : aenc(sign(k, priv(A)), pub(B)) B → A : senc(s, k)

Alice and Bob as processes:

PA(ska, pkb) = new k. out(c, aenc(sign(k, ska), pkb)). in(c, xa). let ya = sdec(xa, k) in... PB(skb, pka) = in(c, xb). let yb = check(adec(xb, skb), pka) in new s.out(c, senc(s, yb)) One possible scenario: PDS = new ska, skb.

  • PA(ska, pk(skb)) | PB(skb, pk(ska))
  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 49 / 60

slide-105
SLIDE 105

Going back to Denning Sacco protocol

A → B : aenc(sign(k, priv(A)), pub(B)) B → A : senc(s, k)

Alice and Bob as processes:

PA(ska, pkb) = new k. out(c, aenc(sign(k, ska), pkb)). in(c, xa). let ya = sdec(xa, k) in... PB(skb, pka) = in(c, xb). let yb = check(adec(xb, skb), pka) in new s.out(c, senc(s, yb)) One possible scenario: PDS = new ska, skb.

  • PA(ska, pk(skb)) | PB(skb, pk(ska))

new ska, skb, k.

  • in(c, xa). let ya = sdec(xa, k) in . . .

| let yb = k in new s.out(c, senc(s, yb)

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 49 / 60

slide-106
SLIDE 106

Going back to Denning Sacco protocol

A → B : aenc(sign(k, priv(A)), pub(B)) B → A : senc(s, k)

Alice and Bob as processes:

PA(ska, pkb) = new k. out(c, aenc(sign(k, ska), pkb)). in(c, xa). let ya = sdec(xa, k) in... PB(skb, pka) = in(c, xb). let yb = check(adec(xb, skb), pka) in new s.out(c, senc(s, yb)) One possible scenario: PDS = new ska, skb.

  • PA(ska, pk(skb)) | PB(skb, pk(ska))

new ska, skb, k.

  • in(c, xa). let ya = sdec(xa, k) in . . .

| let yb = k in new s.out(c, senc(s, yb)

new ska, skb, k, s.

  • let ya = sdec(senc(s, k), k) in . . . | 0
  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 49 / 60

slide-107
SLIDE 107

Going back to Denning Sacco protocol

A → B : aenc(sign(k, priv(A)), pub(B)) B → A : senc(s, k)

Alice and Bob as processes:

PA(ska, pkb) = new k. out(c, aenc(sign(k, ska), pkb)). in(c, xa). let ya = sdec(xa, k) in... PB(skb, pka) = in(c, xb). let yb = check(adec(xb, skb), pka) in new s.out(c, senc(s, yb)) One possible scenario: PDS = new ska, skb.

  • PA(ska, pk(skb)) | PB(skb, pk(ska))

new ska, skb, k.

  • in(c, xa). let ya = sdec(xa, k) in . . .

| let yb = k in new s.out(c, senc(s, yb)

new ska, skb, k, s.

  • let ya = sdec(senc(s, k), k) in . . . | 0

→ this simply models a normal execution between two honest participants

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 49 / 60

slide-108
SLIDE 108

Security properties - confidentiality

Confidentiality for process P w.r.t. secret s

For all processes A such that A | P →∗ Q, we have that Q is not of the form C[out(c, s).Q′] with c public.

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 50 / 60

slide-109
SLIDE 109

Security properties - confidentiality

Confidentiality for process P w.r.t. secret s

For all processes A such that A | P →∗ Q, we have that Q is not of the form C[out(c, s).Q′] with c public. Some difficulties: we have to consider all the possible executions in presence of an arbitrary adversary (modelled as a process) we have to consider realistic initial configurations − → replications to model an unbounded number of sessions, − → reveal public keys and private keys to model dishonest agents, − → PA/PB may play with other (and perhaps) dishonest agents, . . .

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 50 / 60

slide-110
SLIDE 110

Going back to the Denning Sacco protocol

A → B : aenc(sign(k, priv(A)), pub(B)) B → A : senc(s, k) The aforementioned attack

  • 1. A → C : aenc(sign(k, priv(A)), pub(C))
  • 2. C(A) → B : aenc(sign(k, priv(A)), pub(B))

3. B → A : senc(s, k) The “minimal” initial configuration to retrieve the attack is: new ska.new skb.

  • ut(c, pk(skb)) | PA(ska, pk(skc)) | PB(skb, pk(ska))
  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 51 / 60

slide-111
SLIDE 111

Going back to the Denning Sacco protocol

A → B : aenc(sign(k, priv(A)), pub(B)) B → A : senc(s, k) The aforementioned attack

  • 1. A → C : aenc(sign(k, priv(A)), pub(C))
  • 2. C(A) → B : aenc(sign(k, priv(A)), pub(B))

3. B → A : senc(s, k) The “minimal” initial configuration to retrieve the attack is: new ska.new skb.

  • ut(c, pk(skb)) | PA(ska, pk(skc)) | PB(skb, pk(ska))
  • Exercise: Exhibit the process A (the behaviour of the attacker) that

witnesses the aforementioned attack.

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 51 / 60

slide-112
SLIDE 112

Security properties - authentication

This can be expressed as a correspondence property: if B finishes a session, thinking he has talked to A then A has also finished a session, thinking she has talked to B (+ possibly agreement on some values). Enriched syntax for processes: P, Q := null process in(c, x).P input . . . event p(u1, . . . , un).P event Authentication properties with agreement on some values: ∀x.EndB(a, b, x) ⇒ EndA(a, b, x)

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 52 / 60

slide-113
SLIDE 113

State of the art in a nutshell

confidentiality for an unbounded number of sessions undecidable in general [Even & Goldreich, 83; Durgin et al, 99]

More details

some decidability results for some restricted fragment, e.g. one variable per protocol’s rule [Comon & Cortier, 03] ProVerif: A tool that does not correspond to any decidability result but works well in practice. [Blanchet, 01]

More details

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 53 / 60

slide-114
SLIDE 114

State of the art in a nutshell

confidentiality for a bounded number of sessions a decidability result (NP-complete) [Rusinowitch & Turuani, 01; Millen & Shmatikov, 01] result extended to deal with various cryptographic primitives. − → various automatic tools, e.g. AVISPA platform [Armando et al., 05] More details about this tomorrow !

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 54 / 60

slide-115
SLIDE 115

Challenge

Would you be able to find the attack on the well-known Needham-Schroeder protocol? A → B : {A, Na}pub(B) B → A : {Na, Nb}pub(A) A → B : {Nb}pub(B) To help you: http://www.lsv.ens-cachan.fr/~delaune/VTSA/proverif.pdf

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 55 / 60

slide-116
SLIDE 116

Questions ?

See you tomorrow !

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 56 / 60

slide-117
SLIDE 117

Undecidability

Post Correspondence Problem

Input A sequence of tiles (u0, v0) (u1, v1) . . . (un, vn) with ui, vi ∈ {a, b}∗. Output Does there exist k ≥ 1, and 1 ≤ i1, . . . , ik ≤ n such that

  • ui1. . . . uik = vi1 . . . vik
  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 57 / 60

slide-118
SLIDE 118

Undecidability

Post Correspondence Problem

Input A sequence of tiles (u0, v0) (u1, v1) . . . (un, vn) with ui, vi ∈ {a, b}∗. Output Does there exist k ≥ 1, and 1 ≤ i1, . . . , ik ≤ n such that

  • ui1. . . . uik = vi1 . . . vik

Example: u1 u2 u3 u4 v1 v2 v3 v4 aba bbb aab bb a aaa abab babba A solution is 1431. Indeed, we have that: u1.u4.u3.u1 = aba.bb.aab.aba = a.babba.abab.a = v1.v4.v3.v1 No solution if we remove the tile (u4, v4).

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 57 / 60

slide-119
SLIDE 119

Undecidability

Post Correspondence Problem

Input A sequence of tiles (u0, v0) (u1, v1) . . . (un, vn) with ui, vi ∈ {a, b}∗. Output Does there exist k ≥ 1, and 1 ≤ i1, . . . , ik ≤ n such that

  • ui1. . . . uik = vi1 . . . vik

Example: u1 u2 u3 u4 v1 v2 v3 v4 aba bbb aab bb a aaa abab babba A solution is 1431. Indeed, we have that: u1.u4.u3.u1 = aba.bb.aab.aba = a.babba.abab.a = v1.v4.v3.v1 No solution if we remove the tile (u4, v4). Proposition: The PCP is undecidable.

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 57 / 60

slide-120
SLIDE 120

Undecidability proof

Reduction from PCP

We built a protocol that admits an attack (s is revealed) if, and only if, PCP has a solution.

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 58 / 60

slide-121
SLIDE 121

Undecidability proof

Reduction from PCP

We built a protocol that admits an attack (s is revealed) if, and only if, PCP has a solution. We encode words and concatenation using pairs babba is encoded as b, a, b, b, a, x · (babba) is encoded as x, b, a, b, b, a

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 58 / 60

slide-122
SLIDE 122

Undecidability proof

Reduction from PCP

We built a protocol that admits an attack (s is revealed) if, and only if, PCP has a solution. We encode words and concatenation using pairs babba is encoded as b, a, b, b, a, x · (babba) is encoded as x, b, a, b, b, a Initialisation: out(senc(u1, v1, k)) . . . out(senc(un, vn, k))

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 58 / 60

slide-123
SLIDE 123

Undecidability proof

Reduction from PCP

We built a protocol that admits an attack (s is revealed) if, and only if, PCP has a solution. We encode words and concatenation using pairs babba is encoded as b, a, b, b, a, x · (babba) is encoded as x, b, a, b, b, a Initialisation: out(senc(u1, v1, k)) . . . out(senc(un, vn, k)) Building words ! in(senc(x, y, k)).out(senc(x · u1, y · v1, k)) . . . ! in(senc(x, y, k)).out(senc(x · u1, y · v1, k))

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 58 / 60

slide-124
SLIDE 124

Undecidability proof

Reduction from PCP

We built a protocol that admits an attack (s is revealed) if, and only if, PCP has a solution. We encode words and concatenation using pairs babba is encoded as b, a, b, b, a, x · (babba) is encoded as x, b, a, b, b, a Initialisation: out(senc(u1, v1, k)) . . . out(senc(un, vn, k)) Building words ! in(senc(x, y, k)).out(senc(x · u1, y · v1, k)) . . . ! in(senc(x, y, k)).out(senc(x · u1, y · v1, k)) Revealing the secret s: in(senc(z, z, k)).out(s)

Back

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 58 / 60

slide-125
SLIDE 125

ProVerif

ProVerif is a verifier for cryptographic protocols that may prove that a protocol is secure or exhibit attacks. Online demo available at: http://proverif.rocq.inria.fr/ Sources available on Bruno Blanchet’s webpage Advantages fully automatic, and quite efficient A rich process algebra: replication, else branches, . . . Handles many cryptographic primitives Proves various security properties: secrecy, correspondences, equivalences

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 59 / 60

slide-126
SLIDE 126

ProVerif

ProVerif is a verifier for cryptographic protocols that may prove that a protocol is secure or exhibit attacks. Online demo available at: http://proverif.rocq.inria.fr/ Sources available on Bruno Blanchet’s webpage Advantages fully automatic, and quite efficient A rich process algebra: replication, else branches, . . . Handles many cryptographic primitives Proves various security properties: secrecy, correspondences, equivalences

No miracle

Termination is not guaranteed and sometimes the tool is not able to conclude.

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 59 / 60

slide-127
SLIDE 127

Experimental results

− → still, ProVerif works well in practice. Protocol Result ms Needham-Schroeder shared key Attack 52 Needham-Schroeder shared key corrected Secure 109 Denning-Sacco Attack 6 Denning-Sacco corrected Secure 7 Otway-Rees Secure 10 Otway-Rees, variant of Paulson98 Attack 12 Yahalom Secure 10 Simpler Yahalom Secure 11 Main mode of Skeme Secure 23 Pentium III, 1 GHz.

Back

  • S. Delaune (LSV)

Verification of security protocols 25th August 2015 60 / 60