free c:channel.
free s:bitstring [private].

type key.
fun senc(bitstring,key):bitstring.
reduc forall x:bitstring,y:key; sdec(senc(x,y),y) = x.

set preciseActions = true.

query attacker(s).

process
  new k:key; out(c, senc(senc(s,k),k));
  in(c, x:bitstring);
  out(c, sdec(x,k))
