scyther/protocols/misc/bkepk-ce.spdl

52 lines
882 B
Plaintext
Raw Normal View History

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;
secret sk,unhash: Function;
2006-11-21 13:40:50 +00:00
inversekeys (pk,sk);
inversekeys (hash,unhash);
2006-11-21 13:40:50 +00:00
protocol bkeCE(A,B)
2006-11-21 13:40:50 +00:00
{
role A
{
var nb: Nonce;
fresh na: Nonce;
fresh kab: Key;
2006-11-21 13:40:50 +00:00
2012-05-02 22:26:41 +01:00
recv_1 (B,A, B,{ nb,B }pk(A) );
2006-11-21 13:40:50 +00:00
send_2 (A,B, { hash(nb),na,A,kab }pk(B) );
2012-05-02 22:26:41 +01:00
recv_3 (B,A, { hash(na) }kab );
claim_A1 (A, Secret, na);
claim_A2 (A, Secret, nb);
2006-11-21 13:40:50 +00:00
}
role B
2006-11-21 13:40:50 +00:00
{
fresh nb: Nonce;
var na: Nonce;
var kab: Key;
2006-11-21 13:40:50 +00:00
send_1 (B,A, B,{ nb,B }pk(A) );
2012-05-02 22:26:41 +01:00
recv_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-21 13:40:50 +00:00
}
const Alice,Bob,Eve;