scyther/testing/kerberos-rddm.spdl

155 lines
2.6 KiB
Plaintext
Raw Normal View History

2007-05-11 21:51:59 +01:00
/*
* Scyther description of Kerberos as in RDDM'07
*
*/
usertype Sessionkey;
usertype Text;
secret ktk: Function;
secret kck: Function;
secret kst: Function;
2007-05-12 10:29:47 +01:00
protocol @swapkey-ktk(I,R)
{
# Protocol added to work around the symmetry problems where k(I,R) != k(R,I)
role I
{
var T:Ticket;
2012-05-02 22:26:41 +01:00
recv_!X1(R,I,{T}ktk(I,R));
2007-05-12 10:29:47 +01:00
send_!X2(I,R,{T}ktk(R,I));
}
role R
{
}
}
protocol @swapkey-kck(I,R)
{
# Protocol added to work around the symmetry problems where k(I,R) != k(R,I)
role I
{
var T:Ticket;
2012-05-02 22:26:41 +01:00
recv_!X1(R,I,{T}kck(I,R));
2007-05-12 10:29:47 +01:00
send_!X2(I,R,{T}kck(R,I));
}
role R
{
}
}
protocol @swapkey-kst(I,R)
{
# Protocol added to work around the symmetry problems where k(I,R) != k(R,I)
role I
{
var T:Ticket;
2012-05-02 22:26:41 +01:00
recv_!X1(R,I,{T}kst(I,R));
2007-05-12 10:29:47 +01:00
send_!X2(I,R,{T}kst(R,I));
}
role R
{
}
}
2007-05-11 21:51:59 +01:00
protocol kerberos(C,K,T,S) {
role C {
fresh n1: Nonce;
fresh n2: Nonce;
2007-05-11 21:51:59 +01:00
var tgt: Ticket;
var st: Ticket;
var AKey: Sessionkey;
var SKey: Sessionkey;
fresh t: Text;
2007-05-11 21:51:59 +01:00
send_1(C,K, C,T,n1);
2012-05-02 22:26:41 +01:00
recv_2(K,C, tgt, { AKey,n1,T }kck(C,K) );
2007-05-11 21:51:59 +01:00
// Stage boundary
send_3(C,T, tgt, { C }AKey,C,S,n2 );
2012-05-02 22:26:41 +01:00
recv_4(T,C, C, st, { SKey, n2, S }AKey );
2007-05-11 21:51:59 +01:00
// Stage boundary
send_5(C,S, st, { C,t }SKey );
2012-05-02 22:26:41 +01:00
recv_6(S,C, { t }SKey );
2007-05-11 21:51:59 +01:00
2007-05-11 22:18:02 +01:00
// Theorem 5 (a)
// If C,K are honest
claim(C,Reachable);
// Theorem 6 (a)
// If C,K,T are all honest
claim(C,Secret,AKey);
// Theorem 7 (a)
// If C,K,S are all honest
claim(C, Reachable);
// Theorem 8
// If C,K,S are all honest
claim(C, Secret, SKey);
2007-05-11 21:51:59 +01:00
}
role K {
var n1: Nonce;
fresh AKey: Sessionkey;
2007-05-11 21:51:59 +01:00
2012-05-02 22:26:41 +01:00
recv_1(C,K, C,T,n1);
2007-05-11 21:51:59 +01:00
send_2(K,C, { AKey, C }ktk(T,K), { AKey,n1,T }kck(C,K) );
2007-05-11 22:18:02 +01:00
// Theorem 6 (a)
// If C,K,T are all honest
claim_K1(K,Secret,AKey);
2007-05-11 21:51:59 +01:00
}
role T {
var AKey: Sessionkey;
var n2: Nonce;
fresh SKey: Sessionkey;
2007-05-11 21:51:59 +01:00
2012-05-02 22:26:41 +01:00
recv_3(C,T, { AKey, C }ktk(T,K), { C }AKey,C,S,n2 );
2007-05-11 21:51:59 +01:00
send_4(T,C, C,{ SKey, C }kst(S,T), { SKey, n2, S }AKey );
2007-05-11 22:18:02 +01:00
// Theorem 5 (a)
// If C,K are honest
claim(T,Reachable);
// Theorem 6 (a)
// If C,K,T are all honest
claim(T,Secret,AKey);
// My own
claim(T,Secret,SKey);
2007-05-11 21:51:59 +01:00
}
role S {
var t: Text;
var SKey: Sessionkey;
2012-05-02 22:26:41 +01:00
recv_5(C,S, { SKey, C }kst(S,T), { C,t }SKey );
2007-05-11 21:51:59 +01:00
send_6(S,C, { t }SKey );
2007-05-11 22:18:02 +01:00
// Theorem 7 (b)
// If C,K,S,T are honest
claim(S, Reachable);
// My own
claim(S, Secret, t);
claim(S, Secret, SKey);
2007-05-11 21:51:59 +01:00
}
}
const Alice,Bob,Charlie,Eve: Agent;
2007-05-11 22:44:36 +01:00
// C untrusted
// K untrusted
// T untrusted
2007-05-11 21:51:59 +01:00
2007-05-11 22:44:36 +01:00
// S untrusted
2007-05-11 21:51:59 +01:00