2006-11-21 13:42:06 +00:00
|
|
|
# Kao Chow Authentication v.3
|
|
|
|
#
|
|
|
|
# Modelled after the description in the SPORE library
|
|
|
|
# http://www.lsv.ens-cachan.fr/spore/kaoChow3.html
|
|
|
|
#
|
|
|
|
|
|
|
|
usertype SessionKey;
|
|
|
|
usertype ExpiredTimeStamp;
|
|
|
|
usertype TimeStamp;
|
|
|
|
const Fresh: Function;
|
|
|
|
const Compromised: Function;
|
|
|
|
|
|
|
|
protocol kaochow-3(I,R,S)
|
|
|
|
{
|
|
|
|
role I
|
|
|
|
{
|
2012-04-23 14:53:28 +01:00
|
|
|
fresh ni: Nonce;
|
2006-11-21 13:42:06 +00:00
|
|
|
var nr: Nonce;
|
|
|
|
var kir,kt: SessionKey;
|
|
|
|
var T2: Ticket;
|
|
|
|
|
|
|
|
send_1 (I,S, I,R,ni);
|
2012-04-26 15:40:01 +01:00
|
|
|
recv_3 (R,I, {I,R,ni,kir,kt}k(I,S), {ni, kir}kt, nr, T2 );
|
2006-11-21 13:42:06 +00:00
|
|
|
send_4 (I,R, {nr,kir}kt, T2 );
|
|
|
|
|
|
|
|
claim_I1 (I, Nisynch);
|
|
|
|
claim_I2 (I, Niagree);
|
|
|
|
claim_I3 (I, Secret, kir);
|
|
|
|
claim_I4 (I, Empty, (Fresh,kir));
|
|
|
|
}
|
|
|
|
|
|
|
|
role R
|
|
|
|
{
|
|
|
|
var ni: Nonce;
|
2012-04-23 14:53:28 +01:00
|
|
|
fresh nr: Nonce;
|
2006-11-21 13:42:06 +00:00
|
|
|
var kir,kt: SessionKey;
|
|
|
|
var T: Ticket;
|
2012-04-23 14:53:28 +01:00
|
|
|
fresh tr: TimeStamp;
|
2006-11-21 13:42:06 +00:00
|
|
|
|
2012-04-26 15:40:01 +01:00
|
|
|
recv_2 (S,R, T, { I,R,ni,kir,kt }k(R,S) );
|
2006-11-21 13:42:06 +00:00
|
|
|
send_3 (R,I, T, {ni, kir}kt, nr, {I,R,tr,kir}k(R,S) );
|
2012-04-26 15:40:01 +01:00
|
|
|
recv_4 (I,R, {nr,kir}kt, {I,R,tr,kir}k(R,S) );
|
2006-11-21 13:42:06 +00:00
|
|
|
|
|
|
|
claim_R1 (R, Nisynch);
|
|
|
|
claim_R2 (R, Niagree);
|
|
|
|
claim_R3 (R, Secret, kir);
|
|
|
|
claim_R4 (R, Empty, (Fresh,kir));
|
|
|
|
}
|
|
|
|
|
|
|
|
role S
|
|
|
|
{
|
|
|
|
var ni: Nonce;
|
2012-04-23 14:53:28 +01:00
|
|
|
fresh kir, kt: SessionKey;
|
2006-11-21 13:42:06 +00:00
|
|
|
|
2012-04-26 15:40:01 +01:00
|
|
|
recv_1 (I,S, I,R,ni);
|
2006-11-21 13:42:06 +00:00
|
|
|
send_2 (S,R, {I,R,ni,kir,kt}k(I,S), { I,R,ni,kir,kt }k(R,S) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|