Events in Security Protocols: Federico Crazzolara Glynn Winskel
Events in Security Protocols: Federico Crazzolara Glynn Winskel
Federico Crazzolara
Glynn Winskel
{fc232,gw104}@cl.cam.ac.uk
ABSTRACT
The events of a security protocol and their causal dependency can play an important role in the analysis of security
properties. This insight underlies both strand spaces and the
inductive method. But neither of these approaches builds
up the events of a protocol in a compositional way, so that
there is an informal spring from the protocol to its model.
By broadening the models to certain kinds of Petri nets, a
restricted form of contextual nets, a compositional eventbased semantics is given to an economical, but expressive,
language for describing security protocols; so the events and
dependency of a wide range of protocols are determined once
and for all. The net semantics is formally related to a transition semantics, strand spaces and inductive rules, as well
as trace languages and event structures, so unifying a range
of approaches, as well as providing conditions under which
particular, more limited, models are adequate for the analysis of protocols. The net semantics allows the derivation
of general properties and proof principles which are demonstrated in establishing an authentication property, following
a diagrammatic style of proof.
1. INTRODUCTION
The last few years have seen the emergence of successful
intensional, event-based, approaches to reasoning about security protocols. The methods are concerned with reasoning
about the events that a security protocol can perform, and
make use of a causal dependency that exists between events.
For example, to show secrecy in a protocol it is shown that
there can be no earliest event violating a secrecy property;
any such event is shown to depend on some earlier event
which itself violates secrecy - because the behaviour of the
protocol does not permit such an infinite regress, the secrecy property is established. In a similar way, dependency
between events is used to establish forms of authentication
by showing that a sequence of communication events of one
BRICS, Centre of the Danish National Research Foundation.
Permission to make digital or hard copies of all or part of this work for
personal or classroom use is granted without fee provided that copies are
not made or distributed for prot or commercial advantage and that copies
bear this notice and the full citation on the rst page. To copy otherwise, to
republish, to post on servers or to redistribute to lists, requires prior specic
permission and/or a fee.
CCS01, November 5-8, 2001, Philadelphia, Pennsylvania, USA.
Copyright 2001 ACM 1-58113-385-5/01/0011 ...$5.00.
2.
SECURITY PROTOCOLS
This protocol, like many others of its kind, has two roles: one
for the initiator, here played by agent A (say Alice), and one
Name expr.
Key expr.
Messages
Processes
v
k
M
p
::=
::=
::=
::=
n, A, | x, X,
P ub(v) | P riv(v) | Key(~v )
v | k | M1 , M2 | {M }k |
~
out new~
xM.p | in pat~
xM.p
| kiI pi
=
=
=
Init(A, B)
Spy1
Spy2
Spy3
Spy4
Resp(B)
Spy
ki{1,...,4} Spyi
Pinit
Presp
Pspy
kA,B ! Init(A, B)
kA ! Resp(A)
! Spy
surrounding expression. For example, we can describe a responder in NSL as the process Resp(B) in Figure 2. For
the first input, the variables x, Z in {x, Z}P ub(B) are free
in the whole expression, so by convention are pattern variables. On the other hand, in the second input the variable y
in {y}P ub(B) is bound by the outer out new y and so by
the convention is not a pattern variable, and has to be that
value sent out earlier. Replication of a process, !p, abbreviates ki p, consisting of countably infinite copies of p set in
parallel.
N SL
ki{resp,init,spy} Pi
(composing)
(decompg)
(encrypting)
(decrypting)
3.3
A transition semantics
where M is a closed message, ~n are names and i is an index drawn from Indices. We write out M for an output
action, outputting a message M , where no new names are
generated.
The way configurations evolve is expressed by transitions
out new ~
nM [~
n/~
x]
hp[~
n/~
x], s {~
n}, t {M [~
n/~
x]}i
~ t,
~ /]
(input) Provided M [~
n/~
x, N
~
hin pat~
xM.p,
s, ti
~
~ /]
in M [~
n/~
x,N
~ s, ti
~ /],
hp[~
n/~
x, N
(par)
hpj , s, ti hp0j , s0 , t0 i
j:
jI
e = {out new~xM.p}, oe = , ne = ,
@
@
R
out new ~
nM [~
n/~
x] @
C S M [~n/~x]
Ic(p[~
n/~
x])
/ p p p WC w
S
nk
nk
l
p p p
1
l
out new ~
xM.p
An occurrence of the event Out(out new ~xM.p; ~n) affects the control conditions and puts the new names
n1 , , nl into use, necessarily for the first time as according to the token game the event occurrence must
avoid contact with names already in use.
The definition includes the special case when ~x and
~n are empty lists, and we write Out(out M.p) for
the output event with no name conditions and action
out M .
~
~ where ~n is a list
Input events In(in pat~xM.p;
~n, L),
~
of names to match ~x and L is a list of closed messages
~ consist of an event e with these pre- and
to match ,
postconditions:
o
n
~
~
~ ]},
e = {in pat~xM.p},
e = {M [~n/~x, L/
e = ,
~
~ ]),
ec = Ic(p[~n/~x, L/
eo = , en = .
The action of an input event is
~
~
~ = in M [~n/~x, L/
~ ].
act(In(in pat ~xM.p;
~n, L))
~
in pat ~
xM.p
where the last case also includes the base case nil , when the
indexing set is empty.
We shortly define the set of events Events as a subset of
Pow(C)Pow(O)Pow(N)Pow(C)Pow(O)Pow(N).
e = (ce,o e,n e, ec , eo , en )
where ce is the set of C-preconditions of e, ec is the set
of C-postconditions of e, etc. Write e for ce o e n e, all
preconditions of e, and e for all postconditions ec eo en .
Earlier in the transition semantics we used actions to
specify the nature of transitions. An event e is associated
with a unique action act(e).
~
~ ]
M [~
n/~
x, L/
@
@
R
@
~
~
in M [~
n/~
x, L/]
~
~ ])
p p p
Ic(p[~
n/~
x, L/
iI
(i : e) = i :c e ,
(i : e)c = i : ec ,
(i : e) =o e , n(i : e) =n e ,
(i : e)o = eo , (i : e)n = en .
c s t c s t iff
i) e c s t & ec c = & en s = and
ii) c0 = (c \c e) ec & s0 = s en & t0 = t eo .
In particular, the occurrence of e begins the holding of its
name postconditions en - these names have to be distinct
from those already in use to avoid contact.
5. RELATING SEMANTICS
The behaviour of the SPL-net is closely related to the
transition semantics given earlier.
Theorem 5.1.
~
Ev(in pat~xM.p)
=
~
~ | ~n names, L
~ closed messages}
{In(in pat~xM.p;
~n, L)
[
~ | ~n names, L
~ ])
~ closed messages}
{Ev(p[~n/~x, L/
[
Ev(kiI pi ) =
i : Ev(pi ) .
7.
7.1
er+1
r
1
hpr , sr , tr i ,
hp0 , s0 , t0 i
iI
er+1
1
r
hp0 , s0 , t0 i
hpr , sr , tr i ,
er+1
er
hp0 , s0 , t0 i hpr , sr , tr i ,
er+1
1
r
hN SL, s0 , t0 i
hpr , sr , tr i ,
/ b2
/ b3 .
/ b2
/ b3
@@
~?
@@
~
~
@
~~
/ a03
/ a02
a01
er+1
hp0 , s0 , t0 i hpr , sr , tr i ,
/ b3
@@
~?
@@
~
@ ~~~
e
e1
/ b2
b1
/ b2
/ b3
O
a1
/ a2
/ a3
8.
8.1
Strand spaces
8.2
Inductive rules
1
l
i) A run M0
Ml of N et(p ) yields a run
r(e1 )
r(el )
e0
l
1
M0l a run of R(p ) with M00 =
ii) To M00
el
e1
Ml of N et(p ),
rM0 , there is a run M0
0
0
with r(ei ) = ei and r(Mi ) = Mi for all i, 0 < i l.
= Out
{(, e) | e In & oe t}
{(e1 , e) | e In & e1 Out &
e = eo1 }
9. CONCLUDING REMARKS
A role of the language SPL is that it can support, and so
help relate, different semantics useful in the analysis of security protocols - we have seen several examples. Future goals
are to relate to a probabilistic semantics, moving away from
10.
REFERENCES
APPENDIX
A. PETRI NETS
The explanation of general Petri nets involves a little algebra of multisets (or bags), which are like sets but where
multiplicities of elements matters. Its convenient to also
allow infinite multiplicities, so we adjoin an extra element
to the natural numbers, though care must be taken to
avoid subtracting . -Multisets support addition + and
multiset inclusion , and even multiset subtraction X Y
provided Y X and Y has no infinite multiplicities, in
which case we call Y simply a multiset.
M M0 iff t M and M0 = M t + t .
An event t is said to have concession (or be enabled) at a
marking M iff its occurrence leads to a marking, i.e. iff
t M and M t + t Cap .
e M & (M \ e) e 6= .
A.3
Sometimes we have use for conditions which once established continue to hold and can be used repeatedly. If we
are to use net events to represent rules of the kind we find
in inductive definitions, we need conditions that persist.
Persistent conditions can be understood as an abbreviation for conditions within general nets which once they hold,
do so with infinite multiplicity. Consequently any number
of events can make use of them as preconditions but without their ever ceasing to hold. Such conditions, having unbounded capacity, can be postconditions of several events
without there being conflict.
To be more precise, we modify the definition of basic
net given above by allowing certain conditions to be persistent. A net with persistent conditions will still consist
of events and conditions related by pre- and postcondition
maps which to an event will assign a set of preconditions and
a set of postconditions. But, now amongst the conditions
are the persistent conditions forming a subset P . A marking
of a net with persistent conditions will be simply a subset of
conditions, of which some may be persistent. Nets with persistent conditions have arisen independently several times
and have been studied for example in contextual nets [8].
A net with persistent conditions can be understood on
its own terms, or as standing for a general net with the
same sets of conditions and events. The general nets capacity function will be either 1 or on a condition, being
precisely on the persistent conditions. When p is persistent, p e is interpreted in the general net as arc weight
(e. )p = , and p . e as (. e)p = 1. A marking of a net with
persistent conditions will correspond to a marking in the
general Petri net in which those persistent conditions which
hold do so with infinite multiplicity. Graphically, we will
distinguish persistent conditions by drawing them as double
f
circles: h
Token game with persistent conditions: The token
game is modified to account for the subset of conditions P
being persistent. Let M and M0 be markings (i.e. subsets
of conditions), and e an event. Define
@
@
R out new n{m, n, B}P ub(A)
@
S {m, n, B}
/
w
S P ub(A)
nk
l
in{n}P ub(B)
in{n}P ub(B)
@
@
R
@
{n}P ub(B)
in{n}P ub(B)
Init(A, B)
@
@
R out new m{m, A}P ub(B)
@
S {m, A}
/
w
SP ub(B)
l
mk
in{m, y, B}P
ub(A) .out{y}P ub(B)
@
{m, n, B}P ub(A)
@
R
@
/
out{n}P ub(B)
out{n}P ub(B)
@
@
R
@
out{n}P ub(B)
S {n}
P ub(B)
w
S
l
Responder events:
@
@
R
@
Resp(B)
lM1
@
@
R
@
lM2
@
@
R
@
l
>
M1 , M 2
H
H
H
H
j
j
lM1 , M2
@
@
R
@
l
>
M1
l
>
M2
H
H
H
H
j
j
ln
@
@
R
@
lM
@
@
R
@
l
>
{M }P ub(n)
H
H
H
H
j
j
lP riv(n)
@
@
R
@
l {M }P ub(n)
@
@
R
@
H
H
H
H
j
j
l
>