formal methods for security protocols

26
7 June 2002 - Lecture 7 June 2002 - Lecture 4 4 1 TU Dresden - Ws on Proof Theory and Compu TU Dresden - Ws on Proof Theory and Compu tation tation Formal Methods for Formal Methods for Security Protocols Security Protocols Catuscia Palamidessi Catuscia Palamidessi Penn State university, Penn State university, USA USA

Upload: cleary

Post on 28-Jan-2016

85 views

Category:

Documents


0 download

DESCRIPTION

Formal Methods for Security Protocols. Catuscia Palamidessi Penn State university, USA. Security Protocols. Contents of previous lectures: Brief introduction to security protocols Brief introduction to Cryptographic methods Vulnerability of Security protocols Introduction to CSP - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Formal Methods for Security Protocols

7 June 2002 - Lecture 47 June 2002 - Lecture 4 11TU Dresden - Ws on Proof Theory and ComputatiTU Dresden - Ws on Proof Theory and Computationon

Formal Methods for Formal Methods for Security ProtocolsSecurity Protocols

Catuscia PalamidessiCatuscia Palamidessi

Penn State university, USAPenn State university, USA

Page 2: Formal Methods for Security Protocols

7 June 2002 - Lecture 4 TU Dresden - Ws on Proof Theory and Computation

2

Security Protocols

Contents of previous lectures:• Brief introduction to security protocols• Brief introduction to Cryptographic methods• Vulnerability of Security protocols• Introduction to CSP

• Modeling security protocols in CSP• principals, server, intruder

• Expressing security properties in CSP• anonymity

• Verification of security protocols using FDR• example (of anonymity): Dining cryptographers

Page 3: Formal Methods for Security Protocols

7 June 2002 - Lecture 4 TU Dresden - Ws on Proof Theory and Computation

3

Expressing Security Properties in CSP

• Security properties: the goals that a protocol is meant to satisfy, relatively to specific kinds and levels of threat – the intruders and their capabilities

• We will consider the following security properties:• Secrecy

• No information leakage• Authentication

• No falsification of identity• Non-repudiation

• Evidence of the involvement of the other partyAnonymity

• Protecting the identity of agents wrt particular events

Page 4: Formal Methods for Security Protocols

7 June 2002 - Lecture 4 TU Dresden - Ws on Proof Theory and Computation

4

Secrecy and authentication • Safety properties: a certain bad thing should not happen

• Explicit annotations: In the CSP approach, these properties are defined by “enhancing” the code of the processes with explicit signal claiming the success of the protocol wrt the intended property

• Secrecy: Claim_secret. mInformation m has not become known to the intruder

• Authentication: Run with A , Commit with BThe matching of these two events guarantees identities of A and

B

Page 5: Formal Methods for Security Protocols

7 June 2002 - Lecture 4 TU Dresden - Ws on Proof Theory and Computation

5

Secrecy and authentication

A B BIntr IntrA

Protocolrun

Claim_Secret.mCommit with B

Run with A

Page 6: Formal Methods for Security Protocols

7 June 2002 - Lecture 4 TU Dresden - Ws on Proof Theory and Computation

6

Example: The Yahalom Protocol

• The protocol

Message 1 a -> b : a.na

Message 2 b -> s : b.{a.na.nb}ServerKey(b)

Message 3 s -> a : {b.kab.na.nb}ServerKey(a) {a.kab}ServerKey(b)

Message 4 a -> b : {a.kab}ServerKey(b) .{nb}kab

• Authentication of the participants

• Kab should remain secret

• We may require secrecy also on nb

Page 7: Formal Methods for Security Protocols

7 June 2002 - Lecture 4 TU Dresden - Ws on Proof Theory and Computation

7

Example: Secrecy in the Yahalom protocol

• CSP description of the two parties - Original

Initiator(a,na ) = env?b: Agent send.a.b.a.na [] (receive.J.a{b. kab.na.nb}ServerKey(a) .m

kab Key send.a.b.m.{nb}kab

nb Nonce Session(a,b,kab,na,nb) ) m T

Responder(b,nb ) = [] (receive.a.b.a.na send.b.J.b .{a.na.nb}ServerKey(b)

kab Key receive.a.b.{a. kab}ServerKey(b) .{nb}kab

nb NonceSession(b,a,kab,na,nb) ) m T

Page 8: Formal Methods for Security Protocols

7 June 2002 - Lecture 4 TU Dresden - Ws on Proof Theory and Computation

8

Example: Secrecy in the Yahalom protocol

• CSP description of the two parties - Enhanced

Initiator’(a,na ) = env?b: Agent send.a.b.a.na [] (receive.J.a{b. kab.na.nb}ServerKey(a) .m

kab Key send.a.b.m.{nb}kab

nb Nonce signal.Claim_Secret.a.b.kab

m T Session(a,b,kab,na,nb) )

Responder’(b,nb ) = [] (receive.a.b.a.na send.b.J.b .{a.na.nb}ServerKey(b)

kab Key receive.a.b.{a. kab}ServerKey(b) .{nb}kab

nb Noncesignal.Claim_Secret.a.b.kab

m T Session(b,a,kab,na,nb) )

Page 9: Formal Methods for Security Protocols

7 June 2002 - Lecture 4 TU Dresden - Ws on Proof Theory and Computation

9

Example: Secrecy in the Yahalom protocol

• CSP description of the server

Server(J,kab ) =

[] (receive.b.J.b .{a.na.nb}ServerKey(b)

A,B Agent send.J.a. {b. kab.na.nb}ServerKey(a) .{a.kab}ServerKey(b)

Nb ,nb NonceServer(J,ks ) )

Server(J) = ||| Server(J,kab )

kab KeysServer

Page 10: Formal Methods for Security Protocols

7 June 2002 - Lecture 4 TU Dresden - Ws on Proof Theory and Computation

10

Example: Secrecy in the Yahalom protocol

• CSP description of the intruder Intruder(X) = learn ? m: messages Intruder(close(X U

{m}) [] say ! m: X /\ messages Intruder(X)

• Close(X) represents all the possible information that the attacker can infer from X. Typically we assume

• k , m |- {m}k

• {m}k , k-1 |- m• <x1,…,xn> |- xi

• x1 ,…, xn |- <x1,…,xn>

Page 11: Formal Methods for Security Protocols

7 June 2002 - Lecture 4 TU Dresden - Ws on Proof Theory and Computation

11

Example: Secrecy in the Yahalom protocol

Alice Bob

Jeeves

Yves

take.Alice.y

fake.x.Bob

send

receive

learn say

receive

receive

send

send

Initiator’(Alice,nA) S ||| Responder’(Bob,nB) S ||| Server(Jeeves) S ||| Intruder() S’

S = [fake,take/receive,send]S’ = [take.x.y/learn][fake.x.y, leak/say]

leak

Page 12: Formal Methods for Security Protocols

7 June 2002 - Lecture 4 TU Dresden - Ws on Proof Theory and Computation

12

Example: Secrecy in the Yahalom protocol

• The property to be verified:

Signal.Claim_Secret.a.b.m occurs in tr

not(leak.m occurs in tr)

for all traces tr belonging to Traces(System)

• this property can be verified automatically by checking the traces

Page 13: Formal Methods for Security Protocols

7 June 2002 - Lecture 4 TU Dresden - Ws on Proof Theory and Computation

13

Authentication• The CSP approach is based on inserting signals:

• Running.a.b (in a’s protocol)Agent a is executing a protocol run apparently with b

• Commit.b.a (in b’s protocol)• Agent b has completed a protocol run apparently with a

• Authentication is achieved if Running.a.b always precedes Commit.b.a in the traces of the system

• Weaker or stronger forms of authentication can be achieved by variations of the parameters of these signals and the constraints on them

Page 14: Formal Methods for Security Protocols

7 June 2002 - Lecture 4 TU Dresden - Ws on Proof Theory and Computation

14

Authentication in the Yahalom Protocol

• The Yahalom Protocol aims at providing authentication of both parties : authentication of the initiator to the responder, and viceversa

• We will analyze the two authentication properties separately

• This requires two separate enhancements of the protocol

Page 15: Formal Methods for Security Protocols

7 June 2002 - Lecture 4 TU Dresden - Ws on Proof Theory and Computation

15

Yahalom: authentication of initiator

• CSP description of the two parties - Enhanced

Initiator’(a,na ) = env?b: Agent send.a.b.a.na [] (receive.J.a{b. kab.na.nb}ServerKey(a) .m

kab Key signal.Running_Initiator.a.b.na.nb.kab

nb Nonce send.a.b.m.{nb}kab

m T Session(a,b,kab,na,nb) )

Responder’(b,nb ) = [] (receive.a.b.a.na send.b.J.b .{a.na.nb}ServerKey(b)

kab Key receive.a.b.{a. kab}ServerKey(b) .{nb}kab

nb Noncesignal. Commit_Responder.b.a.na.nb.kab

m T Session(b,a,kab,na,nb) )

Page 16: Formal Methods for Security Protocols

7 June 2002 - Lecture 4 TU Dresden - Ws on Proof Theory and Computation

16

Yahalom: authentication of initiator

Initiatora Responderb Server

a.na

b.{a.na.nb}ServerKey(b)

{b.kab.na.nb}ServerKey(a) {a.kab}ServerKey(b)

{a.kab}ServerKey(b) .{nb}kab

Comm.Resp.b.a.na.nb.kab

Run.Init.a.b.na.nb.kab

Page 17: Formal Methods for Security Protocols

7 June 2002 - Lecture 4 TU Dresden - Ws on Proof Theory and Computation

17

Yahalom: authentication of initiator

• The property to be verified:

signal. Running_Initiator.a.b.na.nb.kab

precedessignal.Commit_Responder.b.a.na.nb.kab

in all the traces in Traces(System)

• Again, this property can be verified automatically by checking the traces

Page 18: Formal Methods for Security Protocols

7 June 2002 - Lecture 4 TU Dresden - Ws on Proof Theory and Computation

18

Yahalom: authentication of responder

• CSP description of the two parties - Enhanced

Initiator’(a,na ) = env?b: Agent send.a.b.a.na [] (receive.J.a{b. kab.na.nb}ServerKey(a) .m

kab Key send.a.b.m.{nb}kab

nb Nonce signal.Commit_Initiator.a.b.na.nb.kab

m T Session(a,b,kab,na,nb) )

Responder’(b,nb ) = [] (receive.a.b.a.na send.b.J.b .{a.na.nb}ServerKey(b)

kab Key signal.Running_Responder.b.a.na.nb

nb Noncereceive.a.b.{a. kab}ServerKey(b) .{nb}kab

m T Session(b,a,kab,na,nb) )

Page 19: Formal Methods for Security Protocols

7 June 2002 - Lecture 4 TU Dresden - Ws on Proof Theory and Computation

19

Yahalom: authentication of responder

Initiatora ResponderbServer

a.na

b.{a.na.nb}ServerKey(b)

{b.kab.na.nb}ServerKey(a) {a.kab}ServerKey(b)

{a.kab}ServerKey(b) .{nb}kab

Run_Resp.b.a.na.nb.

Comm.Init.a.b.na.nb.kab

Page 20: Formal Methods for Security Protocols

7 June 2002 - Lecture 4 TU Dresden - Ws on Proof Theory and Computation

20

Yahalom: authentication of responder

• The property to be verified:

signal. Running_Responder.b.a.na.nb

precedessignal.Commit_Initiator.a.b.na.nb.kab

in all the traces in Traces(System)

• Again, this property can be verified automatically by checking the traces

Page 21: Formal Methods for Security Protocols

7 June 2002 - Lecture 4 TU Dresden - Ws on Proof Theory and Computation

21

Authentication

• A similar analysis was done by Gavin Lowe for the Needham-Schoeder Public Key protocol

• Authentication of responder: Yes• Authentication of initiator: No

• There is a trace which contains signal.Commit_Responder.b.a.preceded only bysignal.Running_Initiator.a.i

Page 22: Formal Methods for Security Protocols

7 June 2002 - Lecture 4 TU Dresden - Ws on Proof Theory and Computation

22

Non-repudiation• Goal: to provide the parties of an interaction with evidence so that

later they cannot deny having participated

• Example: The Zhou-Gollmann protocol

Message 1 a -> b : {fNRO .b.n.c}Ska

Message 2 b -> a : {fNRR .a.n.c}Skb

Message 3 a -> j : {fSUB .b.n.k}Ska

Message 4 b <-> j : {fCON .a.b.n.k}Skj

Message 5 a <-> j : {fCON .a.b.n.k}Skj

• c = {m}k where m is the message to be transmitted• a and b are the parties, j is the trusted server• fNRO , fNRR, etc. are flags identifying the steps. n is a nonce• Ska, Skb, etc. are signature keys known only to their owners

• a can prove that b has got the message by presenting {fNRR .a.n.c}Skb and {fCON .a.b.n.k}Skj

Page 23: Formal Methods for Security Protocols

7 June 2002 - Lecture 4 TU Dresden - Ws on Proof Theory and Computation

23

The Zhou-Gollmann protocol

• Non-Repudiation of Recipient: a can prove that b has got the message by presenting

{fNRR.a.n.c}Skb and {fCON .a.b.n.k}Skj

• Non-Repudiation of Origin: b can prove that a has sent the message by presenting

{fNRO.b.n.c}Ska and {fCON .a.b.n.k}Skj

Page 24: Formal Methods for Security Protocols

7 June 2002 - Lecture 4 TU Dresden - Ws on Proof Theory and Computation

24

CSP analysis of Non-Repudiation

Specification of the Zhou-Gollmann protocol in CSP

Agenta(S) = [] b Agent, m S send.a.b.m -> Agenti(S) [] receive.a.b?m -> Agenta(close(S U {m})) [] ftp.a.Jeeves?m -> Agenta(close(S U {m})) [] m S evidence.a.m -> Agenti(S)

Close(S) represent the capability of inferring new information

Server(S) =

receive.a.Jeeves?. {fSUB .b.n.k}Ska

-> Server(S U {fCON .a.b.n.k}Skj)

[] b Agent, m S ftp.a.Jeeves.m -> Server(S)

Page 25: Formal Methods for Security Protocols

7 June 2002 - Lecture 4 TU Dresden - Ws on Proof Theory and Computation

25

J

a b

medium

receive.*.b

receive.*.Jreceive.*.a

send.*.J

send.*.bsend.*.aftp.a ftp.b

evidence.a evidence.b

The Zhou-Gollmann protocol in CSP

Page 26: Formal Methods for Security Protocols

7 June 2002 - Lecture 4 TU Dresden - Ws on Proof Theory and Computation

26

Analysis of the Zhou-Gollmann protocol

• Non-Repudiation of Recipient:

evidence.a.{fNRR.a.n.c}Skb in tr b sent (fNRR.a.n.c) for every trace tr

evidence.a.{fCON.a.b.n.k}Skj in tr receive.a.j.{fCON.a.b.n.k}Skj

in tr for every trace tr

• Non-Repudiation of Origin:

evidence.b.{fNRO.b.n.c}Ska in tr a sent (fNRO.b.n.c) for every trace tr

evidence.b.{fCON.a.b.n.k}Skj in tr a sent (fSUB.b.n.k) for every trace tr

• Again, these properties on traces can be proven automatically