-
Notifications
You must be signed in to change notification settings - Fork 41
/
bkepk-ce.spdl
51 lines (36 loc) · 882 Bytes
/
bkepk-ce.spdl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
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;
inversekeys (pk,sk);
inversekeys (hash,unhash);
protocol bkeCE(A,B)
{
role A
{
var nb: Nonce;
fresh na: Nonce;
fresh kab: Key;
recv_1 (B,A, B,{ nb,B }pk(A) );
send_2 (A,B, { hash(nb),na,A,kab }pk(B) );
recv_3 (B,A, { hash(na) }kab );
claim_A1 (A, Secret, na);
claim_A2 (A, Secret, nb);
}
role B
{
fresh nb: Nonce;
var na: Nonce;
var kab: Key;
send_1 (B,A, B,{ nb,B }pk(A) );
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);
}
}
const Alice,Bob,Eve;