2007-05-17 16:28:10 +01:00
|
|
|
const pk: Function;
|
|
|
|
secret sk: Function;
|
|
|
|
inversekeys (pk,sk);
|
|
|
|
const P1;
|
|
|
|
const P2;
|
|
|
|
|
|
|
|
protocol nsl3th3(I,R)
|
|
|
|
{
|
|
|
|
role I
|
|
|
|
{
|
2012-05-02 22:01:08 +01:00
|
|
|
fresh ni,ni2: Nonce;
|
2007-05-17 16:28:10 +01:00
|
|
|
var nr,nr2: Nonce;
|
|
|
|
|
|
|
|
send_1(I,R, {P1,I,ni}pk(R) );
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_1b(R,I, {nr}pk(I) );
|
|
|
|
recv_2(R,I, {P1,ni,nr,R}pk(I) );
|
2007-05-17 16:28:10 +01:00
|
|
|
send_3(I,R, {P1,nr}pk(R) );
|
|
|
|
|
|
|
|
//claim_i(I,Nisynch);
|
|
|
|
|
|
|
|
send_21(I,R, {P2,I,ni2}pk(R) );
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_21b(R,I, {nr2}pk(I) );
|
|
|
|
recv_22(R,I, {P2,ni2,nr2,R}pk(I) );
|
2007-05-17 16:28:10 +01:00
|
|
|
send_23(I,R, {P2,nr2}pk(R) );
|
|
|
|
|
|
|
|
claim_i2(I,Nisynch);
|
|
|
|
}
|
|
|
|
|
|
|
|
role R
|
|
|
|
{
|
|
|
|
var ni,ni2: Nonce;
|
2012-05-02 22:01:08 +01:00
|
|
|
fresh nr,nr2: Nonce;
|
2007-05-17 16:28:10 +01:00
|
|
|
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_1(I,R, {P1,I,ni}pk(R) );
|
2007-05-17 16:28:10 +01:00
|
|
|
send_1b(R,I, {nr}pk(I) );
|
|
|
|
send_2(R,I, {P1,ni,nr,R}pk(I) );
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_3(I,R, {P1,nr}pk(R) );
|
2007-05-17 16:28:10 +01:00
|
|
|
|
|
|
|
//claim_r(R,Nisynch);
|
|
|
|
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_21(I,R, {P2,I,ni2}pk(R) );
|
2007-05-17 16:28:10 +01:00
|
|
|
send_21b(R,I, {nr2}pk(I) );
|
|
|
|
send_22(R,I, {P2,ni2,nr2,R}pk(I) );
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_23(I,R, {P2,nr2}pk(R) );
|
2007-05-17 16:28:10 +01:00
|
|
|
|
|
|
|
claim_r2(R,Nisynch);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|