2006-08-02 13:59:57 +01:00
|
|
|
/*
|
|
|
|
* Needham-Schroeder-Lowe protocol
|
|
|
|
*/
|
|
|
|
|
|
|
|
// The protocol description
|
|
|
|
|
|
|
|
protocol nsl3(I,R)
|
|
|
|
{
|
|
|
|
role I
|
|
|
|
{
|
2012-04-23 14:53:28 +01:00
|
|
|
fresh ni: Nonce;
|
2006-08-02 13:59:57 +01:00
|
|
|
var nr: Nonce;
|
|
|
|
|
2007-05-19 17:02:36 +01:00
|
|
|
send_1(I,R, {ni,I}pk(R) );
|
2012-04-25 16:03:51 +01:00
|
|
|
recv_2(R,I, {ni,nr,R}pk(I) );
|
2012-04-25 21:09:46 +01:00
|
|
|
claim(I,Running,R,ni,nr);
|
2006-08-02 13:59:57 +01:00
|
|
|
send_3(I,R, {nr}pk(R) );
|
|
|
|
|
2012-04-25 21:09:46 +01:00
|
|
|
claim(I,Secret,ni);
|
|
|
|
claim(I,Secret,nr);
|
|
|
|
claim(I,Alive);
|
|
|
|
claim(I,Commit,R,ni,nr);
|
|
|
|
claim(I,Niagree);
|
|
|
|
claim(I,Nisynch);
|
2006-08-02 13:59:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
role R
|
|
|
|
{
|
|
|
|
var ni: Nonce;
|
2012-04-23 14:53:28 +01:00
|
|
|
fresh nr: Nonce;
|
2006-08-02 13:59:57 +01:00
|
|
|
|
2012-04-25 16:03:51 +01:00
|
|
|
recv_1(I,R, {ni,I}pk(R) );
|
2012-04-25 21:09:46 +01:00
|
|
|
claim(R,Running,I,ni,nr);
|
2006-08-02 13:59:57 +01:00
|
|
|
send_2(R,I, {ni,nr,R}pk(I) );
|
2012-04-25 16:03:51 +01:00
|
|
|
recv_3(I,R, {nr}pk(R) );
|
2006-08-02 13:59:57 +01:00
|
|
|
|
2012-04-25 21:09:46 +01:00
|
|
|
claim(R,Secret,ni);
|
|
|
|
claim(R,Secret,nr);
|
|
|
|
claim(R,Alive);
|
|
|
|
claim(R,Commit,I,ni,nr);
|
|
|
|
claim(R,Niagree);
|
|
|
|
claim(R,Nisynch);
|
2006-08-02 13:59:57 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|