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

table tbl(bitstring).

fun enc(bitstring,bitstring):bitstring.
reduc forall x:bitstring,y:bitstring; dec(enc(x,y),y) = x.

query attacker(bad); secret x [real_or_random].

process
  new k1:bitstring;
  new k2:bitstring;
  insert tbl(k1);
  insert tbl(k2);
  get tbl(x:bitstring) [precise] in
  out(c,x);
  out(c,enc(s,(k1,k2)));
  in(c,=s) [precise];
  out(c,bad)

(* EXPECTPV
RESULT Query secret x [real_or_random] encoded as equivalence cannot be proved.
RESULT not attacker(bad[]) is true.
0.040s (user 0.024s + system 0.016s), max rss 8864K
END *)
