scyther/testing/protocols/misc/soph-keyexch.spdl

33 lines
430 B
Plaintext

usertype Sessionkey;
const pk: Function;
secret sk: Function;
inversekeys (pk,sk);
protocol sophkx(I,R)
{
role I
{
fresh ni: Nonce;
fresh kir: Sessionkey;
var nr: Nonce;
send_1(I,R, ni, {I,kir}pk(R) );
recv_2(R,I, {ni}kir );
claim_4(I,Secret,kir);
}
role R
{
var ni: Nonce;
var kir: Sessionkey;
fresh nr: Nonce;
recv_1(I,R, ni, {I,kir}pk(R) );
send_2(R,I, {ni}kir );
}
}
const ke: Sessionkey;