Cleanup and restructuring of testing directory setup.

This commit is contained in:
Cas Cremers
2012-11-15 16:47:08 +01:00
parent 1860527960
commit 51495be80d
105 changed files with 1 additions and 1 deletions

View File

@@ -0,0 +1,52 @@
/*
* Breaker for localclaims protocol
*
* Starts out as NSL3; last message (label3) has added name to avoid
* confusion with the later messages.
*
* Added messages labeled with x1 and x2 to allow for breaking the other
* protocol.
*/
const pk: Function;
secret sk: Function;
inversekeys (pk,sk);
protocol lcbreaker(I,R)
{
role I
{
fresh ni: Nonce;
var nr: Nonce;
var x: Nonce;
send_1(I,R, {I,ni}pk(R) );
recv_2(R,I, {ni,nr,R}pk(I) );
send_3(I,R, {nr,I}pk(R) );
recv_x1(R,I, { x }pk(I) );
send_x2(I,R, { x }ni );
claim_i1(I,Secret,ni);
claim_i2(I,Secret,nr);
}
role R
{
var ni: Nonce;
fresh nr: Nonce;
fresh x: Nonce;
recv_1(I,R, {I,ni}pk(R) );
send_2(R,I, {ni,nr,R}pk(I) );
recv_3(I,R, {nr,I}pk(R) );
send_x1(R,I, { x }pk(I) );
recv_x2(I,R, { x }ni );
claim_r1(R,Secret,ni);
claim_r2(R,Secret,nr);
}
}