



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




connect Receiver socket;new msg;output socket {msg}key; } server Receiver socket {
input socket ctext;decrypt ctext {msg}key; }
Sender
connect
Receiver
socket;
input
socket
nonce;
new^
msg; begin
msg; output
socket
{msg
,^ nonce
}key;
} server
Receiver
socket
new^
nonce; output
socket
nonce;
input
socket ctext; decrypt
ctext {msg
,^ nonce’
}key;
check
nonce
is^
nonce’;
end^
msg;
}
nonce
to^
nonce’
: Nonce(
effect
nonce
is
nonce’
: Nonce(
effect*
Sender
connect
Receiver
socket;
input
socket
nonce;
new^
msg; begin
msg; cast
nonce
is^
nonce’:Nonce(end msg)
output
socket
{msg,
nonce’}key;
[end^ msg
[]]
[]
Receiver
socket
new^
nonce; output
socket
nonce;
input
socket
ctext;
decrypt
ctext {msg,
nonce’}key;
check
nonce
is^
nonce’:Nonce(end msg);
end^
msg; }
[end^ msg
]^
[check
nonce
[] ]