scyther/testing/bkepk-ce2.spdl

52 lines
826 B
Plaintext
Raw Permalink Normal View History

2006-11-21 13:40:50 +00:00
/*
Bilateral Key Exchange with Public Key protocol (bkepkCE2)
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: Function;
inversekeys (pk,sk);
protocol bkepkCE2(A,B,testnonce)
{
role B
{
fresh nb: Nonce;
2006-11-21 13:40:50 +00:00
var na: Nonce;
var kab: Key;
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) );
2006-11-21 13:40:50 +00:00
send_3 (B,A, { hash(na) }kab );
}
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 );
2006-11-21 13:40:50 +00:00
}
role testnonce
{
var n: Nonce;
2012-05-02 22:26:41 +01:00
recv_!4 (testnonce,testnonce, n);
2006-11-21 13:40:50 +00:00
}
}
const Alice,Bob,Eve;