2006-11-21 13:40:50 +00:00
|
|
|
/*
|
|
|
|
Bilateral Key Exchange with Public Key protocol (bkeCE)
|
|
|
|
|
|
|
|
Version from Corin/Etalle: An Improved Constraint-Based System for the Verification of Security Protocols.
|
|
|
|
Tried to stay as close as possible to compare timing results.
|
|
|
|
*/
|
|
|
|
|
|
|
|
usertype Key;
|
|
|
|
|
|
|
|
const pk,hash: Function;
|
2006-11-23 18:51:28 +00:00
|
|
|
secret sk,unhash: Function;
|
2006-11-21 13:40:50 +00:00
|
|
|
|
|
|
|
inversekeys (pk,sk);
|
2006-11-23 18:51:28 +00:00
|
|
|
inversekeys (hash,unhash);
|
2006-11-21 13:40:50 +00:00
|
|
|
|
2006-11-23 18:51:28 +00:00
|
|
|
protocol bkeCE(A,B)
|
2006-11-21 13:40:50 +00:00
|
|
|
{
|
|
|
|
role A
|
|
|
|
{
|
|
|
|
var nb: Nonce;
|
|
|
|
const na: Nonce;
|
|
|
|
const kab: Key;
|
|
|
|
|
|
|
|
read_1 (B,A, B,{ nb,B }pk(A) );
|
|
|
|
send_2 (A,B, { hash(nb),na,A,kab }pk(B) );
|
|
|
|
read_3 (B,A, { hash(na) }kab );
|
2006-11-23 18:51:28 +00:00
|
|
|
|
|
|
|
claim_A1 (A, Secret, na);
|
|
|
|
claim_A2 (A, Secret, nb);
|
2006-11-21 13:40:50 +00:00
|
|
|
}
|
|
|
|
|
2006-11-23 18:51:28 +00:00
|
|
|
role B
|
2006-11-21 13:40:50 +00:00
|
|
|
{
|
2006-11-23 18:51:28 +00:00
|
|
|
const nb: Nonce;
|
|
|
|
var na: Nonce;
|
|
|
|
var kab: Key;
|
2006-11-21 13:40:50 +00:00
|
|
|
|
2006-11-23 18:51:28 +00:00
|
|
|
send_1 (B,A, B,{ nb,B }pk(A) );
|
|
|
|
read_2 (A,B, { hash(nb),na,A,kab }pk(B) );
|
|
|
|
send_3 (B,A, { hash(na) }kab );
|
|
|
|
|
|
|
|
claim_B1 (B, Secret, na);
|
|
|
|
claim_B2 (B, Secret, nb);
|
2006-11-21 13:40:50 +00:00
|
|
|
}
|
2006-11-23 18:51:28 +00:00
|
|
|
|
2006-11-21 13:40:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const Alice,Bob,Eve;
|
|
|
|
|
|
|
|
compromised sk(Eve);
|
|
|
|
untrusted Eve;
|
|
|
|
|
|
|
|
|