47 lines
943 B
Plaintext
47 lines
943 B
Plaintext
|
/*
|
||
|
* Modeled from ISO/IEC 9798
|
||
|
* Modeler: Cas Cremers, Dec. 2010
|
||
|
*
|
||
|
* signature
|
||
|
* three-pass
|
||
|
* mutual
|
||
|
*/
|
||
|
const Cert: Function;
|
||
|
|
||
|
protocol isoiec-9798-3-4(A,B)
|
||
|
{
|
||
|
role A
|
||
|
{
|
||
|
var RB: Nonce;
|
||
|
fresh RA: Nonce;
|
||
|
var Text1,Text4,Text5: Ticket;
|
||
|
fresh Text2,Text3: Ticket;
|
||
|
|
||
|
recv_1(B,A, RB,Text1 );
|
||
|
claim(A,Running,B,RA,RB,Text2);
|
||
|
send_2(A,B, Cert(B), RA,RB,B,Text3, { RA, RB, B, Text2 }sk(A) );
|
||
|
recv_3(B,A, Cert(A), RB,RA,A,Text5, { RB, RA, A, Text4 }sk(B) );
|
||
|
|
||
|
claim(A,Commit,B,RA,RB,Text2,Text4);
|
||
|
claim(A,Alive);
|
||
|
claim(A,Weakagree);
|
||
|
}
|
||
|
role B
|
||
|
{
|
||
|
fresh RB: Nonce;
|
||
|
var RA: Nonce;
|
||
|
fresh Text1,Text4,Text5: Ticket;
|
||
|
var Text2,Text3: Ticket;
|
||
|
|
||
|
send_1(B,A, RB,Text1 );
|
||
|
recv_2(A,B, Cert(B), RA,RB,B,Text3, { RA, RB, B, Text2 }sk(A) );
|
||
|
claim(B,Running,A,RA,RB,Text2,Text4);
|
||
|
send_3(B,A, Cert(A), RB,RA,A,Text5, { RB, RA, A, Text4 }sk(B) );
|
||
|
|
||
|
claim(B,Commit,A,RA,RB,Text2);
|
||
|
claim(B,Alive);
|
||
|
claim(B,Weakagree);
|
||
|
}
|
||
|
}
|
||
|
|