57 lines
923 B
Plaintext
57 lines
923 B
Plaintext
|
const pk: Function;
|
||
|
secret sk: Function;
|
||
|
inversekeys (pk,sk);
|
||
|
const P1;
|
||
|
const P2;
|
||
|
|
||
|
protocol nsl3th3(I,R)
|
||
|
{
|
||
|
role I
|
||
|
{
|
||
|
const ni,ni2: Nonce;
|
||
|
var nr,nr2: Nonce;
|
||
|
|
||
|
send_1(I,R, {P1,I,ni}pk(R) );
|
||
|
read_1b(R,I, {nr}pk(I) );
|
||
|
read_2(R,I, {P1,ni,nr,R}pk(I) );
|
||
|
send_3(I,R, {P1,nr}pk(R) );
|
||
|
|
||
|
//claim_i(I,Nisynch);
|
||
|
|
||
|
send_21(I,R, {P2,I,ni2}pk(R) );
|
||
|
read_21b(R,I, {nr2}pk(I) );
|
||
|
read_22(R,I, {P2,ni2,nr2,R}pk(I) );
|
||
|
send_23(I,R, {P2,nr2}pk(R) );
|
||
|
|
||
|
claim_i2(I,Nisynch);
|
||
|
}
|
||
|
|
||
|
role R
|
||
|
{
|
||
|
var ni,ni2: Nonce;
|
||
|
const nr,nr2: Nonce;
|
||
|
|
||
|
read_1(I,R, {P1,I,ni}pk(R) );
|
||
|
send_1b(R,I, {nr}pk(I) );
|
||
|
send_2(R,I, {P1,ni,nr,R}pk(I) );
|
||
|
read_3(I,R, {P1,nr}pk(R) );
|
||
|
|
||
|
//claim_r(R,Nisynch);
|
||
|
|
||
|
read_21(I,R, {P2,I,ni2}pk(R) );
|
||
|
send_21b(R,I, {nr2}pk(I) );
|
||
|
send_22(R,I, {P2,ni2,nr2,R}pk(I) );
|
||
|
read_23(I,R, {P2,nr2}pk(R) );
|
||
|
|
||
|
claim_r2(R,Nisynch);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
const Eve: Agent;
|
||
|
|
||
|
untrusted Eve;
|
||
|
const ne: Nonce;
|
||
|
compromised sk(Eve);
|
||
|
|