|
|
|
|
|
Inaction: Stop |
|
Termination, deadlock, incapability of
performing any action, either internal or external |
|
Input: in ? x : A g P(x) |
|
Execute an input action on channel in,
get message x of type A, then continue as P(x) |
|
Output: out ! m g P(x) |
|
Execute an output action on channel out,
send message m, then continue as P(x) |
|
Recursion: P(y1,…,yn)
= Body(y1,…,yn) |
|
Process definition. P is a process
name, y1,…,yn are the parameters, Body(y1,…,yn)
is a process expression |
|
|
|
Example: Copy = in ? x g out ! m g Copy |
|
|
|
|
|
Parallel operator w/synchronization: P
|| Q |
|
P and Q proceed in parallel and are
obliged to synchronize on all the common actions |
|
Example: (c ? x g P(x)) || (c ! m g Q) |
|
Synchronization: the two processes can
proceed only if their actions correspond |
|
Handshaking: sending and receiving is
symultaneous (clearly an abstraction. Buffered communication can anyway be
modeled by implementing a buffer process) |
|
Communication: m is transmitted to the
first process, which continues as P(m). |
|
Broadcasting: c ! m is available for
other parallel procs |
|
Question: what happens with the process |
|
((c?xgP(x)) [] (d?y gQ(y))) ||
(c!m gR) |
|
|
|
|
|
|
|
Parallel operator w/synchronization and
interleaving: P ||A Q |
|
P and Q are obliged to synchronize only
on the common actions in A |
|
They interleave on all the actions not
in A |
|
Example: |
|
(c ? x gP(x)) ||{c}
((c ! m gQ) [] (d ! n g R)) |
|
the two processes can either
synchronize on the action on channel c, or the second process can perform an
action on d. In this second case the first process will remain blocked,
though, until the second will decide to perform (if ever) an output action on
c. |
|
Question: in what part of the second
process could this action on c be performed ? |
|
Abbreviation: P ||| Q stands for P ||f Q |
|
|
|
|
|
|
|
|
|
|
|
Security protocols work through the
interaction of a number of processes in parallel that send messages to each
other. CSP is therefore an obvious notation for describing the participants
and their role in the protocol |
|
|
|
Example: The Yahalom protocol |
|
|
|
Message 1 a g b : a.na |
|
Message 2 b g s : b.{a.na.nb}ServerKey(b) |
|
Message 3 s g a : {b. kab.na.nb}ServerKey(a)
.{a.kab}ServerKey(b) |
|
Message 4 a g b : {a. kab}ServerKey(b)
.{nb}kab |
|
|
|
Questions: |
|
Is the it based on symmetric or
asymmetric cryptography? |
|
what are na and nb,
and what is their purpose? |
|
|
|
|
|
|
|
|
|
B’s view (responder): |
|
Message 1 b getss from ‘a’: a.na |
|
Message 2 b sends to j: b.{a.na.nb}ServerKey(b) |
|
Message 4 b gets from ‘a’: {a. kab}ServerKey(b)
.{nb}kab |
|
|
|
In CSP this behavior can be modeled as
follows: |
|
|
|
Responder(b,nb ) = |
|
[] (receive.a.b.a.na
g send.b.J.b .{a.na.nb}ServerKey(b) |
|
kab e Key g receive.a.b.{a. kab}ServerKey(b)
.{nb}kab |
|
nb e
Nonce g Session(b,a,kab,na,nb)
) |
|
m e T |
|
|
|
|
|
|
|
|
|
|
|
J’s view (server): |
|
Message 2 j gets from ‘b’: b.{a.na.nb}ServerKey(b) |
|
Message 3 j sends to a : {b. kab.na.nb}ServerKey(a)
.{a.kab}ServerKey(b) |
|
|
|
In CSP this behavior can be modeled as
follows: |
|
|
|
Server(J,kab ) = |
|
[] (receive.b.J.b
.{a.na.nb}ServerKey(b) |
|
A,B e Agent g send.J.a. {b. kab.na.nb}ServerKey(a)
.{a.kab}ServerKey(b) |
|
Nb ,nb
e Nonce g
Server(J,ks ) ) |
|
|
|
|
|
Server(J) = ||| Server(J,kab ) |
|
kab e KeysServer |
|
|
|
Question: why several server processes in parallel? |