scyther/spdl/bkepk.spdl

55 lines
884 B
Plaintext
Raw Normal View History

2004-02-20 11:37:28 +00:00
/*
Bilateral Key Exchange with Public Key protocol (BKEPK)
CMV version with explicit secrecy claims.
2004-02-20 11:37:28 +00:00
*/
usertype Key;
2004-02-20 11:37:28 +00:00
const pk,hash: Function;
secret sk,unhash: Function;
inversekeys (pk,sk);
inversekeys (hash,unhash);
protocol bkepk(A,B)
2004-02-20 11:37:28 +00:00
{
role B
{
const nb: Nonce;
var na: Nonce;
var kab: Key;
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 );
2005-02-19 14:25:30 +00:00
claim_4 (B, Secret, na );
claim_5 (B, Secret, nb );
2004-02-20 11:37:28 +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 );
2005-02-19 14:25:30 +00:00
claim_6 (A, Secret, na );
claim_7 (A, Secret, nb );
2004-02-20 11:37:28 +00:00
}
}
const Alice,Bob,Eve;
compromised sk(Eve);
2004-06-12 14:10:17 +01:00
untrusted Eve;
2004-02-20 11:37:28 +00:00
run bkepk.A(Alice,Bob);
run bkepk.B(Alice,Bob);
run bkepk.A(Alice,Bob);
run bkepk.B(Alice,Bob);
2004-02-20 11:37:28 +00:00