2006-11-21 13:40:50 +00:00
|
|
|
usertype Key;
|
|
|
|
|
|
|
|
const pk: Function;
|
|
|
|
secret sk: Function;
|
|
|
|
inversekeys(pk,sk);
|
|
|
|
|
|
|
|
protocol tmn(A,B,S)
|
|
|
|
{
|
|
|
|
role A
|
|
|
|
{
|
2012-05-02 22:01:08 +01:00
|
|
|
fresh Ka: Key;
|
2006-11-21 13:40:50 +00:00
|
|
|
var Kb: Key;
|
|
|
|
|
|
|
|
send_1(A,S, B,{Ka}pk(S) );
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_4(S,A, B,{Kb}Ka );
|
2006-11-21 13:40:50 +00:00
|
|
|
|
|
|
|
claim_5(A,Secret,Ka);
|
|
|
|
claim_8(A,Secret,Kb);
|
|
|
|
}
|
|
|
|
|
|
|
|
role B
|
|
|
|
{
|
2012-05-02 22:01:08 +01:00
|
|
|
fresh Kb: Key;
|
2006-11-21 13:40:50 +00:00
|
|
|
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_2(S,B, A );
|
2006-11-21 13:40:50 +00:00
|
|
|
send_3(B,S, A, { Kb }pk(S) );
|
|
|
|
|
|
|
|
claim_6(B,Secret,Kb);
|
|
|
|
}
|
|
|
|
|
|
|
|
role S
|
|
|
|
{
|
|
|
|
var Ka,Kb: Key;
|
|
|
|
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_1(A,S, B,{Ka}pk(S) );
|
2006-11-21 13:40:50 +00:00
|
|
|
send_2(S,B, A );
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_3(B,S, A, { Kb }pk(S) );
|
2006-11-21 13:40:50 +00:00
|
|
|
send_4(S,A, B,{Kb}Ka );
|
|
|
|
|
|
|
|
claim_7(S,Secret,Ka);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const Alice,Bob,Eve,Simon: Agent;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|