2006-11-21 13:40:50 +00:00
|
|
|
// 12/05/06
|
|
|
|
// S. Mauw
|
|
|
|
// Using Identity Based Encryption primitive to make NSL authentication.
|
|
|
|
// The only requirement on the server communications is that the
|
|
|
|
// sending of the private key is secret.
|
|
|
|
|
|
|
|
const ibepublic: Function; //publicly known key construction from server
|
|
|
|
//parameters and recipient name
|
|
|
|
secret ibesecret: Function;//secret key determined by server for recipient
|
|
|
|
const param: Function; //public security parameter of server
|
|
|
|
inversekeys (ibepublic,ibesecret);
|
|
|
|
|
|
|
|
protocol ibe(I,R,S)
|
|
|
|
{
|
|
|
|
role I
|
|
|
|
{
|
2012-05-02 22:01:08 +01:00
|
|
|
fresh ni: Nonce;
|
2006-11-21 13:40:50 +00:00
|
|
|
var nr: Nonce;
|
|
|
|
|
|
|
|
//Note that we are not interested in the order of server messages.
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_!1(S,I, param(S) );
|
2006-11-21 13:40:50 +00:00
|
|
|
send_3(I,R, {I,ni}ibepublic(param(S),R) );
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_4(R,I, {ni,nr,R}ibepublic(param(S),I) );
|
2006-11-21 13:40:50 +00:00
|
|
|
send_5(I,R, {nr}ibepublic(param(S),R) );
|
|
|
|
|
|
|
|
|
|
|
|
claim_i1(I,Secret,ni);
|
|
|
|
claim_i2(I,Secret,nr);
|
|
|
|
claim_i3(I,Niagree);
|
|
|
|
claim_i4(I,Nisynch);
|
|
|
|
}
|
|
|
|
|
|
|
|
role R
|
|
|
|
{
|
|
|
|
var ni: Nonce;
|
2012-05-02 22:01:08 +01:00
|
|
|
fresh nr: Nonce;
|
2006-11-21 13:40:50 +00:00
|
|
|
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_!2(S,R, {ibesecret(param(S),R)}pk(R) );
|
|
|
|
recv_3(I,R, {I,ni}ibepublic(param(S),R) );
|
2006-11-21 13:40:50 +00:00
|
|
|
send_4(R,I, {ni,nr,R}ibepublic(param(S),I) );
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_5(I,R, {nr}ibepublic(param(S),R) );
|
2006-11-21 13:40:50 +00:00
|
|
|
|
|
|
|
claim_r1(R,Secret,ni);
|
|
|
|
claim_r2(R,Secret,nr);
|
|
|
|
claim_r3(R,Niagree);
|
|
|
|
claim_r4(R,Nisynch);
|
|
|
|
}
|
|
|
|
|
|
|
|
role S
|
|
|
|
{
|
2012-05-02 22:26:41 +01:00
|
|
|
recv_!0(S,S, R,S); // workaround for the fact that R & S are roles, so Scyther should not jump to conclusions (remove it and see what happens)
|
2006-11-21 13:40:50 +00:00
|
|
|
send_!1(S,I, param(S) );
|
|
|
|
send_!2(S,R, {ibesecret(param(S),R)}pk(R) );
|
|
|
|
|
|
|
|
claim_s1(S,Secret,ibesecret(param(S),R));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
compromised ibesecret(param(Eve),Alice);
|
|
|
|
compromised ibesecret(param(Eve),Bob);
|
|
|
|
compromised ibesecret(param(Eve),Carol);
|