40 lines
665 B
Plaintext
40 lines
665 B
Plaintext
/*
|
|
* Modeled from ISO/IEC 9798
|
|
* Modeler: Cas Cremers, Dec. 2010
|
|
*
|
|
* signature
|
|
* two-pass
|
|
* unilateral
|
|
*/
|
|
const Cert: Function;
|
|
|
|
protocol isoiec-9798-3-2(A,B)
|
|
{
|
|
role A
|
|
{
|
|
var Rb: Nonce;
|
|
fresh Ra: Nonce;
|
|
var Text1: Ticket;
|
|
fresh Text2,Text3: Ticket;
|
|
|
|
recv_1(B,A, Rb,Text1 );
|
|
claim(A,Running,B,Ra,Rb,Text2);
|
|
send_2(A,B, Cert(A),Ra,Rb,B,Text3, { Ra, Rb, B, Text2 }sk(A) );
|
|
}
|
|
role B
|
|
{
|
|
fresh Rb: Nonce;
|
|
var Ra: Nonce;
|
|
fresh Text1: Ticket;
|
|
var Text2,Text3: Ticket;
|
|
|
|
send_1(B,A, Rb,Text1 );
|
|
recv_2(A,B, Cert(A),Ra,Rb,B,Text3, { Ra, Rb, B, Text2 }sk(A) );
|
|
|
|
claim(B,Commit,A,Ra,Rb,Text2);
|
|
claim(B,Alive);
|
|
claim(B,Weakagree);
|
|
}
|
|
}
|
|
|