param traceDisplay = long.
param attacker = passive.

(* sym-key Crypto *)
fun senc/3.
reduc sdec(senc(x, y, z), y) = x.

free net.
private free s.

query attacker: s.

process
    (new key; new r;
    out(net, key);
    out(net, senc(s, key, r));
    0)
    |(in(net, x); in(net, y); 0)
   
