scyther/spdl/SPORE/ksl.spdl
gijs c2b3f6492f - Remove some small modelling errors
- New way to model Neumann Stub (it should be 2 distinct protocols)
2005-06-27 11:50:24 +00:00

115 lines
2.7 KiB
Plaintext

# KSL
#
# Modelled after the description in the SPORE library
# http://www.lsv.ens-cachan.fr/spore/ksl.html
#
# Note:
# This protocol uses a ticket so scyther will only be able to verify
# the protocol using the ARACHNE engine (-a)
#
usertype Server, SessionKey, GeneralizedTimestamp, TicketKey;
secret k: Function;
const Alice, Bob, Simon, Eve: Agent;
const Fresh: Function;
const Compromised: Function;
const ne: Nonce;
const kee: SessionKey;
untrusted Eve;
compromised k(Eve,Simon);
protocol kslSessionKeyCompromise(C)
{
// Read the names of 3 agents and disclose a session between them including
// corresponding session key to simulate key compromise
role C {
const Ni,Nr,Nc,Ma,Mb: Nonce;
const Kir: SessionKey;
const Kbb: TicketKey;
const Tr: GeneralizedTimestamp;
var I,R,S: Agent;
read_C1(C,C, I,R,S);
send_C2(C,C, (Ni,I),
(Ni,I,Nr,R),
{Nr,I,Kir}k(R,S),{Ni,R,Kir}k(I,S),
{Tr,I,Kir}Kbb,Nc,{Ni}Kir,
{Nc}Kir,
Ma,
Mb,{Ma}Kir,
{Mb}Kir,
Kir,
Kbb
);
claim_C3(C,Empty, (Compromised,Kir));
claim_C4(C,Empty, (Compromised,Kbb));
}
}
protocol ksl(I,R,S)
{
role I
{
const Ni, Mi: Nonce;
var Nr2, Mr: Nonce;
var T: Ticket;
var Kir: SessionKey;
send_1(I,R, Ni, I);
read_4(R,I, {Ni,R,Kir}k(I,S), T, Nr2, {Ni}Kir);
send_5(I,R, {Nr2}Kir );
send_6(I,R, Mi,T );
read_7(R,I, Mr,{Mi}Kir );
send_8(I,R, {Mr}Kir );
claim_A1(A,Secret, Kab);
claim_A2(A,Niagree);
claim_A3(A,Nisynch);
claim_A4(A,Empty, (Fresh, Kab));
}
role B
{
var Na,Ma: Nonce;
const Nr,Nr2,Mr: Nonce;
var Kir: SessionKey;
const Kbb: TicketKey;
const Tb: GeneralizedTimestamp;
var T: Ticket;
read_1(A,B, Na, A);
send_2(B,S, Na, A, Nb, B );
read_3(S,B, { Nb, A, Kab }k(B,S), T );
send_4(B,A, T, { Tb, A, Kab }Kbb, Nc, {Na}Kab );
read_5(A,B, { Nc }Kab );
read_6(A,B, Ma,{ Tb, A, Kab }Kbb );
send_7(B,A, Mb,{Ma}Kab );
read_8(A,B, {Mb}Kab );
claim_B1(B,Secret, Kab);
claim_B2(B,Niagree);
claim_B3(B,Nisynch);
claim_B4(B,Empty,(Fresh,Kab));
}
role S
{
var Na, Nb: Nonce;
const Kab: SessionKey;
read_2(B,S, Na, A, Nb, B );
send_3(S,B, { Nb, A, Kab }k(B,S), { Na,B,Kab }k(A,S) );
}
}
run ksl.A(Alice,Bob,Simon);
run ksl.B(Alice,Bob,Simon);
run ksl.S(Alice,Bob,Simon);