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

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

event UAction(stamp,bitstring).

axiom st:stamp, x:bitstring, y:bitstring;
  event(UAction(st,x)) && event(UAction(st,y)) ==> x = y.

query attacker(s).

process
  new k:key; out(c, senc(senc(s,k),k));
  in(c, x:bitstring);
  new st[]:stamp;
  event UAction(st,x);
  out(c, sdec(x,k))
