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, Universit Paris Saclay, France Monday, June 27th, 2016 S. Delaune (LSV) Verification of security protocols 27th June 2016 1


slide-1
SLIDE 1

Verification of security protocols: from confidentiality to privacy

Stéphanie Delaune

LSV, CNRS & ENS Cachan, Université Paris Saclay, France

Monday, June 27th, 2016

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 1 / 72

slide-2
SLIDE 2

Research at LSV

Verification of critical software and systems Goal: develop the algorithmic foundations for proving correctness and detecting flaws in various types of programs Applications: computerized systems, databases, security protocols

LSV in figures

founded in 1997 around 25 permanents + 15 PhD students 6 research teams

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 2 / 72

slide-3
SLIDE 3

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 27th June 2016 3 / 72

slide-4
SLIDE 4

Cryptographic protocols everywhere !

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

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 4 / 72

slide-5
SLIDE 5

A variety of security properties

Secrecy: May an intruder learn some secret message exchanged 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 27th June 2016 5 / 72

slide-6
SLIDE 6

How does a cryptographic protocol work (or not)?

Protocol: small programs explaining how to exchange messages

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 6 / 72

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 27th June 2016 6 / 72

slide-8
SLIDE 8

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 en- cryption, signature, hashes, . . .

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 6 / 72

slide-9
SLIDE 9

What is a symmetric encryption scheme?

Symmetric encryption

encryption decryption

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 7 / 72

slide-10
SLIDE 10

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 27th June 2016 7 / 72

slide-11
SLIDE 11

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 27th June 2016 8 / 72

slide-12
SLIDE 12

Advertisement

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 9 / 72

slide-13
SLIDE 13

What is an asymmetric encryption scheme?

Asymmetric encryption

encryption decryption public key private key

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 10 / 72

slide-14
SLIDE 14

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 Prix Turing 2016

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 10 / 72

slide-15
SLIDE 15

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 27th June 2016 11 / 72

slide-16
SLIDE 16

Example: Denning Sacco protocol (1981)

aenc(sign(kAB, priv(A)), pub(B)) Is the Denning Sacco protocol a good key exchange protocol?

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 12 / 72

slide-17
SLIDE 17

Example: Denning Sacco protocol (1981)

aenc(sign(kAB, priv(A)), pub(B)) Is the Denning Sacco protocol a good key exchange protocol? No !

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 12 / 72

slide-18
SLIDE 18

Example: Denning Sacco protocol (1981)

aenc(sign(kAB, priv(A)), pub(B)) Is the Denning Sacco protocol a good key exchange protocol? No ! Description of a possible attack: aenc(sign(kAC, priv(A)), pub(C))

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 12 / 72

slide-19
SLIDE 19

Example: Denning Sacco protocol (1981)

aenc(sign(kAB, priv(A)), pub(B)) Is the Denning Sacco protocol a good key exchange protocol? No ! Description of a possible attack: aenc(sign(kAC, priv(A)), pub(C))

sign(kAC, priv(A)) kAC

aenc(sign(kAC, priv(A)), pub(B))

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 12 / 72

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)) Version 2 A → B : aenc(sign(A, B, k, priv(A)), pub(B)) Which version would you prefer to use?

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 13 / 72

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)) Version 2 A → B : aenc(sign(A, B, k, priv(A)), pub(B)) 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 27th June 2016 13 / 72

slide-22
SLIDE 22

What about protocols used in real life ?

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 14 / 72

slide-23
SLIDE 23

Credit Card payment protocol

Serge Humpich case - “ Yescard “ (1997)

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 15 / 72

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 27th June 2016 15 / 72

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 27th June 2016 15 / 72

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 27th June 2016 16 / 72

slide-27
SLIDE 27

Electronic passport

− → studied in [Arapinis et al., 10] This is a passport with an RFID tag embedded in it. The RFID tag stores: the information printed on your passport, a JPEG copy of your picture.

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 17 / 72

slide-28
SLIDE 28

Electronic passport

− → studied in [Arapinis et al., 10] This is a passport with an RFID tag embedded in it. The RFID tag stores: the information printed on your passport, a JPEG copy of your picture. The Basic Access Control (BAC) protocol is a key establishment protocol that has been designed to also ensure unlinkability.

ISO/IEC standard 15408

Unlinkability aims to ensure that a user may make multiple uses of a service

  • r resource without others being able to link these uses together.
  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 17 / 72

slide-29
SLIDE 29

BAC protocol

Passport

(KE , KM)

Reader

(KE , KM)

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 18 / 72

slide-30
SLIDE 30

BAC protocol

Passport

(KE , KM)

Reader

(KE , KM)

get_challenge

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 18 / 72

slide-31
SLIDE 31

BAC protocol

Passport

(KE , KM)

Reader

(KE , KM)

get_challenge NP , KP NP

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 18 / 72

slide-32
SLIDE 32

BAC protocol

Passport

(KE , KM)

Reader

(KE , KM)

get_challenge NP , KP NP NR , KR {NR , NP , KR }KE , MACKM ({NR , NP , KR }KE )

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 18 / 72

slide-33
SLIDE 33

BAC protocol

Passport

(KE , KM)

Reader

(KE , KM)

get_challenge NP , KP NP NR , KR {NR , NP , KR }KE , MACKM ({NR , NP , KR }KE ) {NP , NR , KP }KE , MACKM ({NP , NR , KP }KE )

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 18 / 72

slide-34
SLIDE 34

BAC protocol

Passport

(KE , KM)

Reader

(KE , KM)

get_challenge NP , KP NP NR , KR {NR , NP , KR }KE , MACKM ({NR , NP , KR }KE ) {NP , NR , KP }KE , MACKM ({NP , NR , KP }KE ) Kseed = f(KP , KR ) Kseed = f(KP , KR )

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 18 / 72

slide-35
SLIDE 35

This talk: formal methods for protocol verification

|

Does the protocol

Modelling

satisfy

| = ϕ

a security property?

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 19 / 72

slide-36
SLIDE 36

This talk: formal methods for protocol verification

|

Does the protocol

Modelling

satisfy

| = ϕ

a security property?

E-passport application

What about unlinkability of the ePassport holders ?

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 19 / 72

slide-37
SLIDE 37

This talk: formal methods for protocol verification

|

Does the protocol

Modelling

satisfy

| = ϕ

a security property? Outline of the this talk

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

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 19 / 72

slide-38
SLIDE 38

Part I Modelling cryptographic protocols and their security properties

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 20 / 72

slide-39
SLIDE 39

Two major families of models ...

... with some advantages and some drawbacks. Computational model + messages are bitstring, a general and powerful adversary – manual proofs, tedious and error-prone Symbolic model – abstract model, e.g. messages are terms + automatic proofs

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 21 / 72

slide-40
SLIDE 40

Two major families of models ...

... with some advantages and some drawbacks. Computational model + messages are bitstring, a general and powerful adversary – manual proofs, tedious and error-prone Symbolic model – abstract model, e.g. messages are terms + automatic proofs Some results allowed to make a link between these two very different models. − → Abadi & Rogaway 2000

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 21 / 72

slide-41
SLIDE 41

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] ... 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 27th June 2016 22 / 72

slide-42
SLIDE 42

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] ... 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 ... but messages that are exchanged are not necessarily atomic !

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 22 / 72

slide-43
SLIDE 43

Messages as terms

Terms are built over a set of names N, and a signature F. t ::= n name n | f (t1, . . . , tk) application of symbol f ∈ F

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 23 / 72

slide-44
SLIDE 44

Messages as terms

Terms are built over a set of names N, and a signature F. t ::= n name n | f (t1, . . . , tk) application of symbol f ∈ F Example: representation of {a, n}k Names: n, k, a constructors: senc, pair, senc pair k a n

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 23 / 72

slide-45
SLIDE 45

Messages as terms

Terms are built over a set of names N, and a signature F. t ::= n name n | f (t1, . . . , tk) application of symbol f ∈ F Example: representation of {a, n}k Names: n, k, a constructors: senc, pair, destructors: sdec, proj1, proj2. senc pair k a n The term algebra is equipped with an equational theory E. sdec(senc(x, y), y) = x proj1(pair(x, y)) = x proj2(pair(x, y)) = y Example: sdec(senc(s, k), k) =E s.

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 23 / 72

slide-46
SLIDE 46

Semantics

Semantics →: Comm

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

Then if u = v then P else Q → P when u =E v Else if u = v then P else Q → Q when u =E v

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 24 / 72

slide-47
SLIDE 47

Semantics

Semantics →: Comm

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

Then if u = v then P else Q → P when u =E v Else if u = v then P else Q → Q when u =E v closed by structural equivalence (≡): P | Q ≡ Q | P, P | 0 ≡ P, . . . application of evaluation contexts: P → P′

  • newn. P → newn. P′

P → P′ P | Q → P′ | Q

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 24 / 72

slide-48
SLIDE 48

Going back to the Denning Sacco protocol (1/2)

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 27th June 2016 25 / 72

slide-49
SLIDE 49

Going back to the Denning Sacco protocol (1/2)

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 27th June 2016 25 / 72

slide-50
SLIDE 50

Going back to the Denning Sacco protocol (1/2)

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 27th June 2016 25 / 72

slide-51
SLIDE 51

Going back to the Denning Sacco protocol (1/2)

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: ok, sign(·, ·), check(·, ·), getmsg(·)

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

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 25 / 72

slide-52
SLIDE 52

Going back to the Denning Sacco protocol (1/2)

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: ok, sign(·, ·), check(·, ·), getmsg(·)

− → check(sign(x, y), pk(y)) = ok − → getmsg(sign(x, y)) = x The two terms involved in a normal execution are: aenc(sign(k, ska), pk(skb)), and senc(s, k)

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 25 / 72

slide-53
SLIDE 53

Going back to the Denning Sacco protocol (2/2)

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

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 26 / 72

slide-54
SLIDE 54

Going back to the Denning Sacco protocol (2/2)

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). . . .

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 26 / 72

slide-55
SLIDE 55

Going back to the Denning Sacco protocol (2/2)

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). . . . PB(skb, pka) = in(c, xb). if check(adec(xb, skb), pka) = ok then new s.out(c, senc(s, getmsg(adec(xb, skb))))

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 26 / 72

slide-56
SLIDE 56

Going back to the Denning Sacco protocol (2/2)

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). . . . PB(skb, pka) = in(c, xb). if check(adec(xb, skb), pka) = ok then new s.out(c, senc(s, getmsg(adec(xb, skb)))) One possible scenario: PDS = new ska, skb.

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

Verification of security protocols 27th June 2016 26 / 72

slide-57
SLIDE 57

Going back to the Denning Sacco protocol (2/2)

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). . . . PB(skb, pka) = in(c, xb). if check(adec(xb, skb), pka) = ok then new s.out(c, senc(s, getmsg(adec(xb, skb)))) One possible scenario: PDS = new ska, skb.

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

new ska, skb, k.

  • in(c, xa). . . .

| if check(adec(aenc(sign(k, ska), pkb), skb), pka) = ok then new s.out(c, senc(s, getmsg(adec(aenc(sign(k, ska), pkb), skb))))

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 26 / 72

slide-58
SLIDE 58

Going back to the Denning Sacco protocol (2/2)

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). . . . PB(skb, pka) = in(c, xb). if check(adec(xb, skb), pka) = ok then new s.out(c, senc(s, getmsg(adec(xb, skb)))) One possible scenario: PDS = new ska, skb.

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

new ska, skb, k.

  • in(c, xa). . . .

| if check(adec(aenc(sign(k, ska), pkb), skb), pka) = ok then new s.out(c, senc(s, getmsg(adec(aenc(sign(k, ska), pkb), skb))))

new ska, skb, k.

  • in(c, xa). . . .

new s.out(c, senc(s, getmsg(adec(aenc(sign(k, ska), pkb), skb))))

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 26 / 72

slide-59
SLIDE 59

Going back to the Denning Sacco protocol (2/2)

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). . . . PB(skb, pka) = in(c, xb). if check(adec(xb, skb), pka) = ok then new s.out(c, senc(s, getmsg(adec(xb, skb)))) One possible scenario: PDS = new ska, skb.

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

new ska, skb, k.

  • in(c, xa). . . .

| if check(adec(aenc(sign(k, ska), pkb), skb), pka) = ok then new s.out(c, senc(s, getmsg(adec(aenc(sign(k, ska), pkb), skb))))

new ska, skb, k.

  • in(c, xa). . . .

new s.out(c, senc(s, getmsg(adec(aenc(sign(k, ska), pkb), skb))))

→ this simply models a normal execution between two honest participants

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 26 / 72

slide-60
SLIDE 60

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 27th June 2016 27 / 72

slide-61
SLIDE 61

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 − → an unbounded number of agents, − → replications to model an unbounded number of sessions, − → reveal public keys and private keys to model dishonest agents, − → honest agents may initiate a session with a dishonest agent, . . .

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 27 / 72

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) 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: PDS = new ska, skb.

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

Verification of security protocols 27th June 2016 28 / 72

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) 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: PDS = new ska, skb.

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

witnesses the aforementioned attack, i.e. such that: A | PDS →∗ C[out(c, s).Q′]

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 28 / 72

slide-64
SLIDE 64

Security properties - privacy

Privacy-type properties are modelled as equivalence-based properties

Testing equivalence between P and Q, denoted P ≈ Q

for all processes A, we have that: (A | P) ⇓c if, and only if, (A | Q) ⇓c where R ⇓c means that R can evolve and emits on public channel c.

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 29 / 72

slide-65
SLIDE 65

Security properties - privacy

Privacy-type properties are modelled as equivalence-based properties

Testing equivalence between P and Q, denoted P ≈ Q

for all processes A, we have that: (A | P) ⇓c if, and only if, (A | Q) ⇓c where R ⇓c means that R can evolve and emits on public channel c. Exercise 1:

  • ut(a, yes)

?

≈ out(a, no)

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 29 / 72

slide-66
SLIDE 66

Security properties - privacy

Privacy-type properties are modelled as equivalence-based properties

Testing equivalence between P and Q, denoted P ≈ Q

for all processes A, we have that: (A | P) ⇓c if, and only if, (A | Q) ⇓c where R ⇓c means that R can evolve and emits on public channel c. Exercise 1:

  • ut(a, yes) ≈ out(a, no)

− → A = in(a, x).if x = yes then out(c, ok)

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 29 / 72

slide-67
SLIDE 67

Security properties - privacy

Privacy-type properties are modelled as equivalence-based properties

Testing equivalence between P and Q, denoted P ≈ Q

for all processes A, we have that: (A | P) ⇓c if, and only if, (A | Q) ⇓c where R ⇓c means that R can evolve and emits on public channel c. Exercise 2: k and k′ are known to the attacker new s.out(a, senc(s, k)).out(a, senc(s, k′))

?

≈ new s, s′.out(a, senc(s, k)).out(a, senc(s′, k′))

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 29 / 72

slide-68
SLIDE 68

Security properties - privacy

Privacy-type properties are modelled as equivalence-based properties

Testing equivalence between P and Q, denoted P ≈ Q

for all processes A, we have that: (A | P) ⇓c if, and only if, (A | Q) ⇓c where R ⇓c means that R can evolve and emits on public channel c. Exercise 2: k and k′ are known to the attacker new s.out(a, senc(s, k)).out(a, senc(s, k′)) ≈ new s, s′.out(a, senc(s, k)).out(a, senc(s′, k′)) − → A = in(a, x).in(a, y).if (sdec(x, k) = sdec(y, k′)) then out(c, ok)

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 29 / 72

slide-69
SLIDE 69

Security properties - privacy

Privacy-type properties are modelled as equivalence-based properties

Testing equivalence between P and Q, denoted P ≈ Q

for all processes A, we have that: (A | P) ⇓c if, and only if, (A | Q) ⇓c where R ⇓c means that R can evolve and emits on public channel c. Exercise 3: Are the two following processes in testing equivalence? new s.out(a, s)

?

≈ new s.new k.out(a, senc(s, k))

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 29 / 72

slide-70
SLIDE 70

Some privacy-type properties

Unlinkability [Arapinis et al, 2010] !new ke.new km.(!PBAC | !RBAC) ≈ !new ke.new km.( PBAC | !RBAC) ↑ ↑

many sessions for each passport

  • nly one session

for each passport

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 30 / 72

slide-71
SLIDE 71

Some privacy-type properties

Unlinkability [Arapinis et al, 2010] !new ke.new km.(!PBAC | !RBAC) ≈ !new ke.new km.( PBAC | !RBAC) ↑ ↑

many sessions for each passport

  • nly one session

for each passport

Vote privacy [Kremer and Ryan, 2005] S[VA(yes)| VB(no)] ≈ S[VA(no)| VB(yes)] ↑ ↑

A votes yes B votes no A votes no B votes yes

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 30 / 72

slide-72
SLIDE 72

Part II Designing verification algorithms (from confidentiality to privacy)

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 31 / 72

slide-73
SLIDE 73

State of the art in a nutshell

for analysing confidentiality properties Unbounded number of sessions undecidable in general [Even & Goldreich, 83; Durgin et al, 99] decidable for restricted classes [Lowe, 99; Rammanujam & Suresh, 03] − → ProVerif: A tool that does not correspond to any decidability result but works well in practice. [Blanchet, 01]

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 32 / 72

slide-74
SLIDE 74

State of the art in a nutshell

for analysing confidentiality properties Unbounded number of sessions undecidable in general [Even & Goldreich, 83; Durgin et al, 99] decidable for restricted classes [Lowe, 99; Rammanujam & Suresh, 03] − → ProVerif: A tool that does not correspond to any decidability result but works well in practice. [Blanchet, 01] 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]

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 32 / 72

slide-75
SLIDE 75

The deduction problem: is u deducible from T?

We consider a signature F and an equational theory E.

The deduction problem

input A sequence φ of ground terms (i.e. messages) and a term s (the secret) φ = {w1 ⊲ v1, . . . , wn ⊲ vn}

  • utput Can the attacker learn s from φ, i.e. does there exist a term

(called recipe) R built using public symbols and w1, . . . , wn such that Rφ =E s.

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 33 / 72

slide-76
SLIDE 76

The deduction problem: is u deducible from T?

We consider a signature F and an equational theory E.

The deduction problem

input A sequence φ of ground terms (i.e. messages) and a term s (the secret) φ = {w1 ⊲ v1, . . . , wn ⊲ vn}

  • utput Can the attacker learn s from φ, i.e. does there exist a term

(called recipe) R built using public symbols and w1, . . . , wn such that Rφ =E s. Exercise: Let φ = {w1 ⊲ pk(ska); w2 ⊲ pk(skb); w3 ⊲ skc; w4 ⊲ aenc(sign(k, ska), pk(skc)); w5 ⊲ senc(s, k)}.

1 Is k deducible from φ? 2 What about s?

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 33 / 72

slide-77
SLIDE 77

The deduction problem: is u deducible from T?

We consider a signature F and an equational theory E.

The deduction problem

input A sequence φ of ground terms (i.e. messages) and a term s (the secret) φ = {w1 ⊲ v1, . . . , wn ⊲ vn}

  • utput Can the attacker learn s from φ, i.e. does there exist a term

(called recipe) R built using public symbols and w1, . . . , wn such that Rφ =E s. Exercise: Let φ = {w1 ⊲ pk(ska); w2 ⊲ pk(skb); w3 ⊲ skc; w4 ⊲ aenc(sign(k, ska), pk(skc)); w5 ⊲ senc(s, k)}.

1 Is k deducible from φ? Yes, using R1 = getmsg(adec(w4, w3)) 2 What about s?

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 33 / 72

slide-78
SLIDE 78

The deduction problem: is u deducible from T?

We consider a signature F and an equational theory E.

The deduction problem

input A sequence φ of ground terms (i.e. messages) and a term s (the secret) φ = {w1 ⊲ v1, . . . , wn ⊲ vn}

  • utput Can the attacker learn s from φ, i.e. does there exist a term

(called recipe) R built using public symbols and w1, . . . , wn such that Rφ =E s. Exercise: Let φ = {w1 ⊲ pk(ska); w2 ⊲ pk(skb); w3 ⊲ skc; w4 ⊲ aenc(sign(k, ska), pk(skc)); w5 ⊲ senc(s, k)}.

1 Is k deducible from φ? Yes, using R1 = getmsg(adec(w4, w3)) 2 What about s? Yes, using R2 = sdec(w5, R1).

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 33 / 72

slide-79
SLIDE 79

The deduction problem

Proposition

The deduction problem is decidable in PTIME for the equational theory modelling the DS protocol (and for many others) Algorithm

1 saturation of φ with its deducible subterms in one-step: φ+ 2 does there exist R such that Rφ+=s

(syntaxic equality)

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 34 / 72

slide-80
SLIDE 80

The deduction problem

Proposition

The deduction problem is decidable in PTIME for the equational theory modelling the DS protocol (and for many others) Algorithm

1 saturation of φ with its deducible subterms in one-step: φ+ 2 does there exist 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 ⊲ k; w8 ⊲ s}.

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 34 / 72

slide-81
SLIDE 81

Soundness, completeness, and termination

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

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 35 / 72

slide-82
SLIDE 82

Soundness, completeness, and termination

Soundness If the algorithm returns Yes then u is indeed deducible from φ. − → 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 27th June 2016 35 / 72

slide-83
SLIDE 83

Soundness, completeness, and termination

Soundness If the algorithm returns Yes then u is indeed deducible from φ. − → 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 u is deducible from φ, then the algorithm returns Yes.

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 35 / 72

slide-84
SLIDE 84

Soundness, completeness, and termination

Soundness If the algorithm returns Yes then u is indeed deducible from φ. − → 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 u is deducible from φ, then the algorithm returns Yes. − → this relies on a locality property

Locality lemma

Let φ be a frame and u be a deducible subterm of φ. There exists a recipe R witnessing this fact which satisfies the locality property: for any R′ subterm of R, we have that R′φ↓ is a subterm of φ.

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 35 / 72

slide-85
SLIDE 85

Caution !

One should never underestimate the attacker ! The attacker can listen to the communication but also: intercept the messages that are sent by the participants, build new messages according to his deduction capabilities, and send messages on the communication network. − → this is the co-called active attacker

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 36 / 72

slide-86
SLIDE 86

Confidentiality using the constraint solving approach

− → active attacker, only for a bounded number of sessions

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 37 / 72

slide-87
SLIDE 87

Confidentiality using the constraint solving approach

− → active attacker, only for a bounded number of sessions Two main steps:

1 A symbolic exploration of all the possible traces

The infinite number of possible traces (i.e. experiment) are represented by a finite set of constraint systems − → this set can be huge (exponential on the number of sessions) ... but some optimizations are used to reduce this number

2 A decision procedure for deciding whether a constraint system has a

solution or not. − → this algorithm works quite well

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 37 / 72

slide-88
SLIDE 88

Step 1: confidentiality via constraint solving

We consider a finite sequence of actions: in(u1); out(v1); in(u2); . . . out(vn) − → ui and vi may contain variables We build the following constraint system: C =              T0

?

⊢ u1 T0, v1

?

⊢ u2 ... T0, v1, .., vn

?

⊢ s

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 38 / 72

slide-89
SLIDE 89

Step 1: confidentiality via constraint solving

We consider a finite sequence of actions: in(u1); out(v1); in(u2); . . . out(vn) − → ui and vi may contain variables We build the following constraint system: C =              T0

?

⊢ u1 T0, v1

?

⊢ u2 ... T0, v1, .., vn

?

⊢ s

Solution of a constraint system C

A substitution σ such that: for every T

?

⊢ u ∈ C, uσ is deducible from Tσ.

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 38 / 72

slide-90
SLIDE 90

Going back to the Denning Sacco protocol

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

  • ut(aenc(sign(k, ska), pk(skc)))

in(aenc(sign(x, ska), pk(skb))); out(senc(s, x))

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 39 / 72

slide-91
SLIDE 91

Going back to the Denning Sacco protocol

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

  • ut(aenc(sign(k, ska), pk(skc)))

in(aenc(sign(x, ska), pk(skb))); out(senc(s, x)) The associated constraint system is: T0; aenc(sign(k, ska), pk(skc))

?

⊢ aenc(sign(x, ska), pk(skb)) T0; aenc(sign(k, ska), pk(skc)); senc(s, x)

?

⊢ s with T0 = {pk(ska), pk(skb); skc}.

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 39 / 72

slide-92
SLIDE 92

Going back to the Denning Sacco protocol

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

  • ut(aenc(sign(k, ska), pk(skc)))

in(aenc(sign(x, ska), pk(skb))); out(senc(s, x)) The associated constraint system is: T0; aenc(sign(k, ska), pk(skc))

?

⊢ aenc(sign(x, ska), pk(skb)) T0; aenc(sign(k, ska), pk(skc)); senc(s, x)

?

⊢ s with T0 = {pk(ska), pk(skb); skc}. Question: Does C admit a solution?

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 39 / 72

slide-93
SLIDE 93

Going back to the Denning Sacco protocol

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

  • ut(aenc(sign(k, ska), pk(skc)))

in(aenc(sign(x, ska), pk(skb))); out(senc(s, x)) The associated constraint system is: T0; aenc(sign(k, ska), pk(skc))

?

⊢ aenc(sign(x, ska), pk(skb)) T0; aenc(sign(k, ska), pk(skc)); senc(s, x)

?

⊢ s with T0 = {pk(ska), pk(skb); skc}. Question: Does C admit a solution? Yes: x → k.

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 39 / 72

slide-94
SLIDE 94

The general case: is the constraint system C satisfiable?

Main idea: simplify them until reaching ⊥ or solved forms Constraint system in solved form C =              T0

?

⊢ x0 T0 ∪ T1

?

⊢ x1 ... T0 ∪ T1 . . . ∪ Tn

?

⊢ xn

Question

Is there a solution to such a system ?

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 40 / 72

slide-95
SLIDE 95

The general case: is the constraint system C satisfiable?

Main idea: simplify them until reaching ⊥ or solved forms Constraint system in solved form C =              T0

?

⊢ x0 T0 ∪ T1

?

⊢ x1 ... T0 ∪ T1 . . . ∪ Tn

?

⊢ xn

Question

Is there a solution to such a system ? Of course, yes ! Choose u0 ∈ T0, and consider the substitution: σ = {x0 → u0, . . . , xn → u0}

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 40 / 72

slide-96
SLIDE 96

Step 2: simplification rules

− → these rules deal with pairs and symmetric encryption only Rax : C ∧ T

?

⊢ u

  • C

if u is deducible from T ∪ {x | T ′ ? ⊢ x ∈ C, T ′ T} Runif : C ∧ T

?

⊢ u σ Cσ ∧ Tσ

?

⊢ uσ if σ = mgu(t1, t2) where t1, t2 ∈ st(T) ∪ {u} Rfail : C ∧ T

?

⊢ u

if vars(T ∪ {u}) = ∅ and T ⊢ u Rf : C ∧ T

?

⊢ f (u1, u2) C ∧ T

?

⊢ u1 ∧ T

?

⊢ u2 f ∈ {, senc}

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 41 / 72

slide-97
SLIDE 97

Applying rule Rf

Rf : C ∧ T

?

⊢ f(u1, u2) C ∧ T

?

⊢ u1 ∧ T

?

⊢ u2 Example: T0; aenc(sign(k, ska), pk(skc))

?

⊢ aenc(sign(x, ska), pk(skb))

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 42 / 72

slide-98
SLIDE 98

Applying rule Rf

Rf : C ∧ T

?

⊢ f(u1, u2) C ∧ T

?

⊢ u1 ∧ T

?

⊢ u2 Example: T0; aenc(sign(k, ska), pk(skc))

?

⊢ aenc(sign(x, ska), pk(skb))

  T0; aenc(sign(k, ska), pk(skc))

?

⊢ sign(x, ska) T0; aenc(sign(k, ska), pk(skc))

?

⊢ pk(skb)

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 42 / 72

slide-99
SLIDE 99

Applying rule Runif

Runif : C ∧ T

?

⊢ u σ Cσ ∧ Tσ

?

⊢ uσ if σ = mgu(t1, t2) where t1, t2 ∈ st(T) ∪ {u} Example:    T0; aenc(sign(k, ska), pk(skc))

?

⊢ sign(x, ska) T0; aenc(sign(k, ska), pk(skc))

?

⊢ pk(skb)

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 43 / 72

slide-100
SLIDE 100

Applying rule Runif

Runif : C ∧ T

?

⊢ u σ Cσ ∧ Tσ

?

⊢ uσ if σ = mgu(t1, t2) where t1, t2 ∈ st(T) ∪ {u} Example:    T0; aenc(sign(k, ska), pk(skc))

?

⊢ sign(x, ska) T0; aenc(sign(k, ska), pk(skc))

?

⊢ pk(skb)

  T0; aenc(sign(k, ska), pk(skc))

?

⊢ sign(k, ska) T0; aenc(sign(k, ska), pk(skc))

?

⊢ pk(skb)

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 43 / 72

slide-101
SLIDE 101

Applying rule Rax

Rax : C ∧ T

?

⊢ u

  • C

if u deducible from T ∪ {x | T ′ ? ⊢ x ∈ C, T ′ T} Example: (assuming that skc and pk(skb) are in T0)    T0; aenc(sign(k, ska), pk(skc))

?

⊢ sign(k, ska) T0; aenc(sign(k, ska), pk(skc))

?

⊢ pk(skb)

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 44 / 72

slide-102
SLIDE 102

Applying rule Rax

Rax : C ∧ T

?

⊢ u

  • C

if u deducible from T ∪ {x | T ′ ? ⊢ x ∈ C, T ′ T} Example: (assuming that skc and pk(skb) are in T0)    T0; aenc(sign(k, ska), pk(skc))

?

⊢ sign(k, ska) T0; aenc(sign(k, ska), pk(skc))

?

⊢ pk(skb)

  • T0; aenc(sign(k, ska), pk(skc))

?

⊢ sign(k, ska)

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 44 / 72

slide-103
SLIDE 103

Applying rule Rax

Rax : C ∧ T

?

⊢ u

  • C

if u deducible from T ∪ {x | T ′ ? ⊢ x ∈ C, T ′ T} Example: (assuming that skc and pk(skb) are in T0)    T0; aenc(sign(k, ska), pk(skc))

?

⊢ sign(k, ska) T0; aenc(sign(k, ska), pk(skc))

?

⊢ pk(skb)

  • T0; aenc(sign(k, ska), pk(skc))

?

⊢ sign(k, ska)

(empty constraint system)

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 44 / 72

slide-104
SLIDE 104

Results on the simplification rules

Rax : C ∧ T

?

⊢ u

  • C

if u is deducible from T ∪ {x | T ′ ? ⊢ x ∈ C, T ′ T} Runif : C ∧ T

?

⊢ u σ Cσ ∧ Tσ

?

⊢ uσ if σ = mgu(t1, t2) where t1, t2 ∈ st(T) ∪ {u} Rfail : C ∧ T

?

⊢ u

if vars(T ∪ {u}) = ∅ and T ⊢ u Rf : C ∧ T

?

⊢ f (u1, u2) C ∧ T

?

⊢ u1 ∧ T

?

⊢ u2 f ∈ {, senc} Given a (well-formed) constraint system C:

Soundness

If C ∗

σ C′ and θ solution of C′ then σθ is a solution of C.

− → easy to show

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 45 / 72

slide-105
SLIDE 105

Results on the simplification rules

Rax : C ∧ T

?

⊢ u

  • C

if u is deducible from T ∪ {x | T ′ ? ⊢ x ∈ C, T ′ T} Runif : C ∧ T

?

⊢ u σ Cσ ∧ Tσ

?

⊢ uσ if σ = mgu(t1, t2) where t1, t2 ∈ st(T) ∪ {u} Rfail : C ∧ T

?

⊢ u

if vars(T ∪ {u}) = ∅ and T ⊢ u Rf : C ∧ T

?

⊢ f (u1, u2) C ∧ T

?

⊢ u1 ∧ T

?

⊢ u2 f ∈ {, senc} Given a (well-formed) constraint system C:

Exercise: Termination

There is no infinite chain C σ1 C1 . . . σn Cn.

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 45 / 72

slide-106
SLIDE 106

Results on the simplification rules

Rax : C ∧ T

?

⊢ u

  • C

if u is deducible from T ∪ {x | T ′ ? ⊢ x ∈ C, T ′ T} Runif : C ∧ T

?

⊢ u σ Cσ ∧ Tσ

?

⊢ uσ if σ = mgu(t1, t2) where t1, t2 ∈ st(T) ∪ {u} Rfail : C ∧ T

?

⊢ u

if vars(T ∪ {u}) = ∅ and T ⊢ u Rf : C ∧ T

?

⊢ f (u1, u2) C ∧ T

?

⊢ u1 ∧ T

?

⊢ u2 f ∈ {, senc} Given a (well-formed) constraint system C:

Exercise: Termination

There is no infinite chain C σ1 C1 . . . σn Cn. − → using the lexicographic order (number of var, size of rhs)

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 45 / 72

slide-107
SLIDE 107

Results on the simplification rules

Rax : C ∧ T

?

⊢ u

  • C

if u is deducible from T ∪ {x | T ′ ? ⊢ x ∈ C, T ′ T} Runif : C ∧ T

?

⊢ u σ Cσ ∧ Tσ

?

⊢ uσ if σ = mgu(t1, t2) where t1, t2 ∈ st(T) ∪ {u} Rfail : C ∧ T

?

⊢ u

if vars(T ∪ {u}) = ∅ and T ⊢ u Rf : C ∧ T

?

⊢ f (u1, u2) C ∧ T

?

⊢ u1 ∧ T

?

⊢ u2 f ∈ {, senc} Given a (well-formed) constraint system C:

Completeness

If θ is a solution of C then there exists C′ and θ′ such that C ∗

σ C′, θ′ is a

solution of C′, and θ = σθ′. − → more involved to show

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 45 / 72

slide-108
SLIDE 108

Step 2: procedure for solving a constraint system

Main idea of the procedure:

C =            T0

?

⊢ u1 T0, v1

?

⊢ u2 . . . T0, v1, . . . , vn

?

⊢ s

C1 C2 C3 ⊥ C4 solved ⊥ − → this gives us a symbolic representation of all the solutions.

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 46 / 72

slide-109
SLIDE 109

Main result

Theorem

Deciding confidentiality for a bounded number of sessions is decidable for classical primitives (actually in co-NP). Exercise: NP-hardness can be shown by encoding 3-SAT

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 47 / 72

slide-110
SLIDE 110

Main result

Theorem

Deciding confidentiality for a bounded number of sessions is decidable for classical primitives (actually in co-NP). Exercise: NP-hardness can be shown by encoding 3-SAT Some extensions that already exist:

1 disequality tests (protocol with else branches) 2 more primitives: asymmetric encryption, blind signature, exclusive-or,

. . .

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 47 / 72

slide-111
SLIDE 111

Avantssar platform

This approach has been implemented in the Avantssar Platform. http://www.avantssar.eu − → Typically concludes within few seconds over the flawed protocols of the Clark/Jacob library .

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 48 / 72

slide-112
SLIDE 112

Part II Designing verification algorithms (from confidentiality to privacy)

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 49 / 72

slide-113
SLIDE 113

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 27th June 2016 50 / 72

slide-114
SLIDE 114

The ground case: are φ and ψ in static equivalence?

The static equivalence problem

input Two frames φ and ψ φ = {w1 ⊲ u1, . . . , wℓ ⊲ uℓ} ψ = {w1 ⊲ v1, . . . , wℓ ⊲ vℓ}

  • uput 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 27th June 2016 51 / 72

slide-115
SLIDE 115

The ground case: are φ and ψ in static equivalence?

The static equivalence problem

input Two frames φ and ψ φ = {w1 ⊲ u1, . . . , wℓ ⊲ uℓ} ψ = {w1 ⊲ v1, . . . , wℓ ⊲ vℓ}

  • uput 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 ⊲ 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 27th June 2016 51 / 72

slide-116
SLIDE 116

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′} k, k′, and n are a priori unknown to the attacker

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 52 / 72

slide-117
SLIDE 117

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′} k, k′, and n are a priori unknown to the attacker

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 52 / 72

slide-118
SLIDE 118

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′} k, k′, and n are a priori unknown to the attacker

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 52 / 72

slide-119
SLIDE 119

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′} k, k′, and n are a priori unknown to the attacker

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 52 / 72

slide-120
SLIDE 120

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′}

  • k, k′, and n are a priori unknown to the attacker
  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 52 / 72

slide-121
SLIDE 121

The static equivalence problem

Proposition

The static equivalence problem is decidable in PTIME for the theory modelling the DS protocol (and for many others)

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 53 / 72

slide-122
SLIDE 122

The static equivalence problem

Proposition

The static equivalence problem is decidable in PTIME for the theory modelling the DS protocol (and for many others) 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 27th June 2016 53 / 72

slide-123
SLIDE 123

Going back to our previous example

Example φ = {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 27th June 2016 54 / 72

slide-124
SLIDE 124

Going back to our previous example

Example φ = {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 φ+ = φ ⊎ { , and ψ+ = ψ ⊎ { .

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 54 / 72

slide-125
SLIDE 125

Going back to our previous example

Example φ = {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 φ+ = φ ⊎ {w3 ⊲ yes, r1; , and ψ+ = ψ ⊎ {w3 ⊲ no, r2; .

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 54 / 72

slide-126
SLIDE 126

Going back to our previous example

Example φ = {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 φ+ = φ ⊎ {w3 ⊲ yes, r1; w4 ⊲ yes; , and ψ+ = ψ ⊎ {w3 ⊲ no, r2; w4 ⊲ no; .

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 54 / 72

slide-127
SLIDE 127

Going back to our previous example

Example φ = {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 φ+ = φ ⊎ {w3 ⊲ yes, r1; w4 ⊲ yes; w5 ⊲ r1}, and ψ+ = ψ ⊎ {w3 ⊲ no, r2; w4 ⊲ no; w5 ⊲ r2}.

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 54 / 72

slide-128
SLIDE 128

Going back to our previous example

Example φ = {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 φ+ = φ ⊎ {w3 ⊲ yes, r1; w4 ⊲ yes; w5 ⊲ r1}, and ψ+ = ψ ⊎ {w3 ⊲ no, r2; w4 ⊲ no; w5 ⊲ r2}. − → φ+ and ψ+ are not in static equivalence: w4

?

= yes.

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 54 / 72

slide-129
SLIDE 129

State of the art in a nutshell (active attacker)

for analysing privacy properties Unbounded number of sessions undecidable in general (and even under quite severe restriction) decidable for restricted classes [Chrétien PhD thesis, 16] − → ProVerif checks diff-equivalence (too strong) [Blanchet et al, 05]

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 55 / 72

slide-130
SLIDE 130

State of the art in a nutshell (active attacker)

for analysing privacy properties Unbounded number of sessions undecidable in general (and even under quite severe restriction) decidable for restricted classes [Chrétien PhD thesis, 16] − → ProVerif checks diff-equivalence (too strong) [Blanchet et al, 05] Bounded number of sessions several decision procedures under various restrictions e.g. [Baudet, 05], [Dawson & Tiu, 10], [Chevalier & Rusinowitch, 10], [Chadha et al., 12], [Cheval PhD thesis, 12].

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 55 / 72

slide-131
SLIDE 131

One “recent” contribution

− → PhD thesis of V. Cheval, 2012

Main result

A procedure for deciding testing equivalence for a large class of processes for a bounded number of sessions.

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 56 / 72

slide-132
SLIDE 132

One “recent” contribution

− → PhD thesis of V. Cheval, 2012

Main result

A procedure for deciding testing equivalence for a large class of processes for a bounded number of sessions. Class of processes: + non-trivial else branches, private channels, and non-deterministic choice; – a fixed set of cryptographic primitives (signature, encryption, hash function, mac).

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 56 / 72

slide-133
SLIDE 133

Privacy using the constraint solving approach

What about unlinkability of the ePassport holders ? PBAC(KE, KM)

?

≈ PBAC(K ′

E, K ′ M)

Two main steps:

1 A symbolic exploration of all the possible traces

The infinite number of possible traces (i.e. experiment) are represented by a finite set of constraint systems − → this set can be huge (exponential on the number of sessions) !

2 A decision procedure for deciding (symbolic) equivalence between sets

  • f constraint systems

− → this algorithm works quite well

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 57 / 72

slide-134
SLIDE 134

French electronic passport

− → the passport must reply to all received messages. Passport

(KE ,KM)

Reader

(KE ,KM)

get_challenge NP , KP NP NR , KR {NR , NP , KR }KE , MACKM ({NR , NP , KR }KE )

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 58 / 72

slide-135
SLIDE 135

French electronic passport

− → the passport must reply to all received messages. Passport

(KE ,KM)

Reader

(KE ,KM)

get_challenge NP , KP NP NR , KR {NR , NP , KR }KE , MACKM ({NR , NP , KR }KE ) If MAC check fails mac_error

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 58 / 72

slide-136
SLIDE 136

French electronic passport

− → the passport must reply to all received messages. Passport

(KE ,KM)

Reader

(KE ,KM)

get_challenge NP , KP NP NR , KR {NR , NP , KR }KE , MACKM ({NR , NP , KR }KE ) If MAC check succeeds If nonce check fails nonce_error

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 58 / 72

slide-137
SLIDE 137

Step 1: from processes to constraint systems

Passport P(KE, KM)

in(= get_challenge); new NP; new KP;

  • ut(NP); in(zE, zM);

if zM = macKM(zE) then if NP = proj1(proj2(sdec(zE, KE))) then

  • ut(m, macKM(m))

else out(nonce_error) else out(mac_error) where m = {NP, proj1(sdec(zE, KE)), KP}KE Once an interleaving of symbolic actions has been fixed (e.g. in; in; out), we generate the associated constraint systems:

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 59 / 72

slide-138
SLIDE 138

Step 1: from processes to constraint systems

Passport P(KE, KM)

in(= get_challenge); new NP; new KP;

  • ut(NP); in(zE, zM);

if zM = macKM(zE) then if NP = proj1(proj2(sdec(zE, KE))) then

  • ut(m, macKM(m))

else out(nonce_error) else out(mac_error) where m = {NP, proj1(sdec(zE, KE)), KP}KE T0

?

⊢ get_challenge Φ = T0; Once an interleaving of symbolic actions has been fixed (e.g. in; in; out), we generate the associated constraint systems:

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 59 / 72

slide-139
SLIDE 139

Step 1: from processes to constraint systems

Passport P(KE, KM)

in(= get_challenge); new NP; new KP;

  • ut(NP); in(zE, zM);

if zM = macKM(zE) then if NP = proj1(proj2(sdec(zE, KE))) then

  • ut(m, macKM(m))

else out(nonce_error) else out(mac_error) where m = {NP, proj1(sdec(zE, KE)), KP}KE T0

?

⊢ get_challenge Φ = T0; NP; Once an interleaving of symbolic actions has been fixed (e.g. in; in; out), we generate the associated constraint systems:

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 59 / 72

slide-140
SLIDE 140

Step 1: from processes to constraint systems

Passport P(KE, KM)

in(= get_challenge); new NP; new KP;

  • ut(NP); in(zE, zM);

if zM = macKM(zE) then if NP = proj1(proj2(sdec(zE, KE))) then

  • ut(m, macKM(m))

else out(nonce_error) else out(mac_error) where m = {NP, proj1(sdec(zE, KE)), KP}KE T0

?

⊢ get_challenge T0, NP

?

⊢ zE, zM Φ = T0; NP; Once an interleaving of symbolic actions has been fixed (e.g. in; in; out), we generate the associated constraint systems:

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 59 / 72

slide-141
SLIDE 141

Step 1: from processes to constraint systems

Passport P(KE, KM)

in(= get_challenge); new NP; new KP;

  • ut(NP); in(zE, zM);

if zM = macKM(zE) then if NP = proj1(proj2(sdec(zE, KE))) then

  • ut(m, macKM(m))

else out(nonce_error) else out(mac_error) where m = {NP, proj1(sdec(zE, KE)), KP}KE T0

?

⊢ get_challenge T0, NP

?

⊢ zE, zM zM

?

= macKM(zE) Φ = T0; NP; mac_error Once an interleaving of symbolic actions has been fixed (e.g. in; in; out), we generate the associated constraint systems:

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 59 / 72

slide-142
SLIDE 142

Step 1: from processes to constraint systems

Passport P(KE, KM)

in(= get_challenge); new NP; new KP;

  • ut(NP); in(zE, zM);

if zM = macKM(zE) then if NP = proj1(proj2(sdec(zE, KE))) then

  • ut(m, macKM(m))

else out(nonce_error) else out(mac_error) where m = {NP, proj1(sdec(zE, KE)), KP}KE T0

?

⊢ get_challenge T0, NP

?

⊢ zE, zM zM

?

= macKM(zE) Φ = T0; NP; mac_error − → Cmac Once an interleaving of symbolic actions has been fixed (e.g. in; in; out), we generate the associated constraint systems: Cmac;

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 59 / 72

slide-143
SLIDE 143

Step 1: from processes to constraint systems

Passport P(KE, KM)

in(= get_challenge); new NP; new KP;

  • ut(NP); in(zE, zM);

if zM = macKM(zE) then if NP = proj1(proj2(sdec(zE, KE))) then

  • ut(m, macKM(m))

else out(nonce_error) else out(mac_error) where m = {NP, proj1(sdec(zE, KE)), KP}KE T0

?

⊢ get_challenge Φ = T0; Once an interleaving of symbolic actions has been fixed (e.g. in; in; out), we generate the associated constraint systems: Cmac;

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 59 / 72

slide-144
SLIDE 144

Step 1: from processes to constraint systems

Passport P(KE, KM)

in(= get_challenge); new NP; new KP;

  • ut(NP); in(zE, zM);

if zM = macKM(zE) then if NP = proj1(proj2(sdec(zE, KE))) then

  • ut(m, macKM(m))

else out(nonce_error) else out(mac_error) where m = {NP, proj1(sdec(zE, KE)), KP}KE T0

?

⊢ get_challenge Φ = T0; NP; Once an interleaving of symbolic actions has been fixed (e.g. in; in; out), we generate the associated constraint systems: Cmac;

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 59 / 72

slide-145
SLIDE 145

Step 1: from processes to constraint systems

Passport P(KE, KM)

in(= get_challenge); new NP; new KP;

  • ut(NP); in(zE, zM);

if zM = macKM(zE) then if NP = proj1(proj2(sdec(zE, KE))) then

  • ut(m, macKM(m))

else out(nonce_error) else out(mac_error) where m = {NP, proj1(sdec(zE, KE)), KP}KE T0

?

⊢ get_challenge T0, NP

?

⊢ zE, zM Φ = T0; NP; Once an interleaving of symbolic actions has been fixed (e.g. in; in; out), we generate the associated constraint systems: Cmac;

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 59 / 72

slide-146
SLIDE 146

Step 1: from processes to constraint systems

Passport P(KE, KM)

in(= get_challenge); new NP; new KP;

  • ut(NP); in(zE, zM);

if zM = macKM(zE) then if NP = proj1(proj2(sdec(zE, KE))) then

  • ut(m, macKM(m))

else out(nonce_error) else out(mac_error) where m = {NP, proj1(sdec(zE, KE)), KP}KE T0

?

⊢ get_challenge T0, NP

?

⊢ zE, zM zM

?

= macKM(zE) NP

?

= proj1(proj2(sdec(zE, KE))) Φ = T0; NP; nonce_error Once an interleaving of symbolic actions has been fixed (e.g. in; in; out), we generate the associated constraint systems: Cmac;

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 59 / 72

slide-147
SLIDE 147

Step 1: from processes to constraint systems

Passport P(KE, KM)

in(= get_challenge); new NP; new KP;

  • ut(NP); in(zE, zM);

if zM = macKM(zE) then if NP = proj1(proj2(sdec(zE, KE))) then

  • ut(m, macKM(m))

else out(nonce_error) else out(mac_error) where m = {NP, proj1(sdec(zE, KE)), KP}KE T0

?

⊢ get_challenge T0, NP

?

⊢ zE, zM zM

?

= macKM(zE) NP

?

= proj1(proj2(sdec(zE, KE))) Φ = T0; NP; nonce_error − → Cnonce Once an interleaving of symbolic actions has been fixed (e.g. in; in; out), we generate the associated constraint systems: Cmac; Cnonce;

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 59 / 72

slide-148
SLIDE 148

Step 1: from processes to constraint systems

Passport P(KE, KM)

in(= get_challenge); new NP; new KP;

  • ut(NP); in(zE, zM);

if zM = macKM(zE) then if NP = proj1(proj2(sdec(zE, KE))) then

  • ut(m, macKM(m))

else out(nonce_error) else out(mac_error) where m = {NP, proj1(sdec(zE, KE)), KP}KE Once an interleaving of symbolic actions has been fixed (e.g. in; in; out), we generate the associated constraint systems: Cmac; Cnonce; ...

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 59 / 72

slide-149
SLIDE 149

Step 2: symbolic equivalence

To check whether P ≈ P′, we have to check whether Σ ≈s Σ′ for all sequence of symbolic actions (e.g. in;in;out).

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 60 / 72

slide-150
SLIDE 150

Step 2: symbolic equivalence

To check whether P ≈ P′, we have to check whether Σ ≈s Σ′ for all sequence of symbolic actions (e.g. in;in;out).

Symbolic equivalence Σ ≈s Σ′

for all C ∈ Σ for all (σ, θ) ∈ Sol(C), there exists C′ ∈ Σ′ such that: (σ′, θ) ∈ Sol(C′) and Φσ ∼ Φ′σ′ (static equivalence). and conversely

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 60 / 72

slide-151
SLIDE 151

Step 2: symbolic equivalence

To check whether P ≈ P′, we have to check whether Σ ≈s Σ′ for all sequence of symbolic actions (e.g. in;in;out).

Symbolic equivalence Σ ≈s Σ′

for all C ∈ Σ for all (σ, θ) ∈ Sol(C), there exists C′ ∈ Σ′ such that: (σ′, θ) ∈ Sol(C′) and Φσ ∼ Φ′σ′ (static equivalence). and conversely Going back to the E-passport example PBAC(KE, KM)

?

≈ PBAC(K ′

E.K ′ M)

Among others, we have to check: {Cmac; Cnonce; . . .}

?

≈s {C′

mac; C′ nonce; . . .}

where C′

mac, C′ nonce, . . . are the counterparts of Cmac, Cnonce, . . . in which

KE/KM are replaced by K ′

E/K ′ M.

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 60 / 72

slide-152
SLIDE 152

French passport (1/2)

{Cmac; Cnonce; . . .}

?

≈s {C′

mac; C′ nonce; . . .}

when T0 contains w0 ⊲ {N0

R, N0 P, K 0 R}KE , macKM({N0 R, N0 P, K 0 R}KE )

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 61 / 72

slide-153
SLIDE 153

French passport (1/2)

{Cmac; Cnonce; . . .}

?

≈s {C′

mac; C′ nonce; . . .}

when T0 contains w0 ⊲ {N0

R, N0 P, K 0 R}KE , macKM({N0 R, N0 P, K 0 R}KE )

Cnonce =                      T0

?

⊢ get_challenge T0

?

⊢ zE, zM zM

?

= macKM(zE) NP

?

= proj1(proj2(sdec(zE, KE))) Φ = T0; nonce_error − → A solution for Cnonce is: σ =

  • zE → {N0

R, N0 P, K 0 R}KE , zM → macKM({N0 R, N0 P, K 0 R}KE )

  • with θ =
  • X1 → get_challenge, X2 → w0
  • .
  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 61 / 72

slide-154
SLIDE 154

French passport (2/2)

{Cmac; Cnonce; . . .}

?

≈s {C′

mac; C′ nonce; . . .}

when T0 contains w0 ⊲ {N0

R, N0 P, K 0 R}KE , macKM({N0 R, N0 P, K 0 R}KE )

Is θ =

  • X1 → get_challenge, X2 → w0
  • also a solution on the other side?
  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 62 / 72

slide-155
SLIDE 155

French passport (2/2)

{Cmac; Cnonce; . . .}

?

≈s {C′

mac; C′ nonce; . . .}

when T0 contains w0 ⊲ {N0

R, N0 P, K 0 R}KE , macKM({N0 R, N0 P, K 0 R}KE )

Is θ =

  • X1 → get_challenge, X2 → w0
  • also a solution on the other side?

What about the constraint system C′

nonce?

C′

nonce =

                     T0

?

⊢ get_challenge T0, NP

?

⊢ zE, zM zM

?

= macK ′

M(zE)

NP

?

= proj1(proj2(sdec(zE, K ′

E)))

Φ = T0; NP; nonce_error

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 62 / 72

slide-156
SLIDE 156

French passport (2/2)

{Cmac; Cnonce; . . .}

?

≈s {C′

mac; C′ nonce; . . .}

when T0 contains w0 ⊲ {N0

R, N0 P, K 0 R}KE , macKM({N0 R, N0 P, K 0 R}KE )

Is θ =

  • X1 → get_challenge, X2 → w0
  • also a solution on the other side?

What about the constraint system C′

nonce?

C′

nonce =

                     T0

?

⊢ get_challenge T0, NP

?

⊢ zE, zM zM

?

= macK ′

M(zE)

NP

?

= proj1(proj2(sdec(zE, K ′

E)))

Φ = T0; NP; nonce_error − → θ is not a solution !

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 62 / 72

slide-157
SLIDE 157

French passport (2/2)

{Cmac; Cnonce; . . .}

?

≈s {C′

mac; C′ nonce; . . .}

when T0 contains w0 ⊲ {N0

R, N0 P, K 0 R}KE , macKM({N0 R, N0 P, K 0 R}KE )

Is θ =

  • X1 → get_challenge, X2 → w0
  • also a solution on the other side?

What about the constraint system C′

mac?

C′

mac =

               T0

?

⊢ get_challenge T0

?

⊢ zE, zM zM

?

= macK ′

M(zE)

Φ′ = T0; NP; mac_error

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 62 / 72

slide-158
SLIDE 158

French passport (2/2)

{Cmac; Cnonce; . . .}

?

≈s {C′

mac; C′ nonce; . . .}

when T0 contains w0 ⊲ {N0

R, N0 P, K 0 R}KE , macKM({N0 R, N0 P, K 0 R}KE )

Is θ =

  • X1 → get_challenge, X2 → w0
  • also a solution on the other side?

What about the constraint system C′

mac?

C′

mac =

               T0

?

⊢ get_challenge T0

?

⊢ zE, zM zM

?

= macK ′

M(zE)

Φ′ = T0; NP; mac_error − → θ is a solution ... but the resulting sequence of messages are not in static equivalence. T0; NP; nonce_error ∼ T0; NP, mac_error

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 62 / 72

slide-159
SLIDE 159

An attack on the French passport [Chothia & Smirnov, 10]

Attack against unlinkability

An attacker can track a French passport, provided he has once witnessed a successful authentication.

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 63 / 72

slide-160
SLIDE 160

An attack on the French passport [Chothia & Smirnov, 10]

Attack against unlinkability

An attacker can track a French passport, provided he has once witnessed a successful authentication. Part 1 of the attack. The attacker eavesdropes on Alice using her passport and records message M. Alice’s Passport

(KE ,KM)

Reader

(KE ,KM)

get_challenge NP , KP NP NR , KR M = {NR , NP , KR }KE , MACKM ({NR , NP , KR }KE )

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 63 / 72

slide-161
SLIDE 161

An attack on the French passport [Chothia & Smirnov, 10]

Part 2 of the attack. The attacker replays the message M and checks the error code he receives. ????’s Passport

(K ′

E ,K ′ M)

Attacker

get_challenge N′

P , K′ P

N′

P

M = {NR , NP , KR }KE , MACKM ({NR , NP , KR }KE )

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 63 / 72

slide-162
SLIDE 162

An attack on the French passport [Chothia & Smirnov, 10]

Part 2 of the attack. The attacker replays the message M and checks the error code he receives. ????’s Passport

(K ′

E ,K ′ M)

Attacker

get_challenge N′

P , K′ P

N′

P

M = {NR , NP , KR }KE , MACKM ({NR , NP , KR }KE ) mac_error

= ⇒ MAC check failed = ⇒ K ′

M = KM

= ⇒ ???? is not Alice

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 63 / 72

slide-163
SLIDE 163

An attack on the French passport [Chothia & Smirnov, 10]

Part 2 of the attack. The attacker replays the message M and checks the error code he receives. ????’s Passport

(K ′

E ,K ′ M)

Attacker

get_challenge N′

P , K′ P

N′

P

M = {NR , NP , KR }KE , MACKM ({NR , NP , KR }KE ) nonce_error

= ⇒ MAC check succeeded = ⇒ K ′

M = KM

= ⇒ ???? is Alice

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 63 / 72

slide-164
SLIDE 164

Step 2: deciding symbolic equivalence

Main idea: We rewrite pairs (Σ, Σ′) of sets of constraint systems (extended to keep track of some information) until a trivial failure or a trivial success is found. (Σ, Σ′) (Σ1, Σ′

1)

(Σ2, Σ′

2)

(⊥, ⊥) (Σ3, Σ′

3)

(solved,solved) (⊥,solved)

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 64 / 72

slide-165
SLIDE 165

Results on the simplification rules

Termination Applying blindly the simplification rules does not terminate but there is a particular strategy S that allows us to ensure termination. Soundness/Completeness Let (Σ0, Σ′

0) be pair of sets of constraint systems, and consider a binary

tree obtained by applying our simplification rule following a strategy S.

1 soundness: If all leaves of the tree are labeled with (⊥, ⊥) or

(solved, solved), then Σ0 ≈s Σ′

0.

2 completeness: if Σ0 ≈s Σ′

0, then all leaves of the tree are labeled with

(⊥, ⊥) or (solved, solved).

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 65 / 72

slide-166
SLIDE 166

APTE- Algorithm for Proving Trace Equivalence

http://projects.lsv.ens-cachan.fr/APTE (Ocaml - 12 KLocs) − → developed by Vincent Cheval [Cheval, TACAS’14]

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 66 / 72

slide-167
SLIDE 167

APTE- Algorithm for Proving Trace Equivalence

http://projects.lsv.ens-cachan.fr/APTE (Ocaml - 12 KLocs) − → developed by Vincent Cheval [Cheval, TACAS’14] − → but a limited practical impact because it scales badly

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 67 / 72

slide-168
SLIDE 168

Partial order reduction for security protocols

part of the PhD thesis of L. Hirschi

Main objective

to develop POR techniques that are suitable for analysing security protocols (especially testing equivalence)

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 68 / 72

slide-169
SLIDE 169

Partial order reduction for security protocols

part of the PhD thesis of L. Hirschi

Main objective

to develop POR techniques that are suitable for analysing security protocols (especially testing equivalence) Example: in(c1, x1).out(c1, ok) | in(c2, x2).out(c2, ok) We propose two optimizations:

1 compression: we impose a simple strategy on the exploration of the

available actions (roughly outputs are performed first and using a fixed arbitrary order)

2 reduction: we avoid exploring some redundant traces taking into

account the data that are exchanged

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 68 / 72

slide-170
SLIDE 170

Practical impact of our optimizations (in APTE)

Toy example Denning Sacco protocol

− → Each optimisation brings an exponential speedup.

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 69 / 72

slide-171
SLIDE 171

Practical impact of our optimizations (in APTE)

Toy example Denning Sacco protocol

− → Each optimisation brings an exponential speedup.

Protocol reference with POR Yahalom (3-party) 4 5 Needham Schroeder (3-party) 4 7 Private Authentication (2-party) 4 7 E-Passport PA (2-party) 4 9 Denning-Sacco (3-party) 5 10 Wide Mouthed Frog (3-party) 6 13

Maximum number of parallel processes verifiable in 20 hours.

− → Our optimisations make Apte much more useful in practice for investigating interesting scenarios.

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 69 / 72

slide-172
SLIDE 172

Limitations of this approach

1 the algebraic properties of the primitives are abstracted away

− → no guarantee if the protocol relies on an encryption that satisfies some additional properties (e.g. RSA, ElGamal)

2 only the specification is analysed and not the implementation

− → most of the passports are actually linkable by a carefull analysis of time or message length. http://www.loria.fr/˜ glondu/epassport/attaque-tailles.html

3 not all scenario are checked

− → no guarantee if the protocol is used one more time !

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 70 / 72

slide-173
SLIDE 173

To sum up

Cryptographic protocols are: difficult to design and analyse; particularly vulnerable to logical attacks. Strong primitives are necessary . . . . . . but this is not sufficient !

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 71 / 72

slide-174
SLIDE 174

To sum up

Cryptographic protocols are: difficult to design and analyse; particularly vulnerable to logical attacks. It is important to ensure that the protocols we are using every day work properly. We now have automatic and powerful verification tools to analyse: classical security goals, e.g. secrecy and authentication; relatively small protocols; protocols that rely on standard cryptographic primitives.

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 71 / 72

slide-175
SLIDE 175

Conclusion

A need of formal methods in verification of security protocols. Regarding confidentiality (or authentication), powerful tool support that are nowdays used by industrials and security agencies. It remains a lot to do for analysing privacy-type properties: formal definitions of some sublte security properties − → receipt-freeness, coercion-resistance in e-voting algorithms (and tools!) for checking automatically trace equivalence for various cryptographic primitives; − → homomorphic encryption used in e-voting, exclusive-or used in RFID protocols more composition results − → Could we derive some security guarantees of the whole e-passport application from the analysis performed on each subprotocol?

  • S. Delaune (LSV)

Verification of security protocols 27th June 2016 72 / 72