free c.

(* signatures *)

fun sign/2.
fun pk/1.
reduc checksign(sign(m,k),pk(k)) = m.

data cons/2.
data consnew/2.

(* Clauses *)

pred member/2 memberOptim.
pred membernew/2 memberOptim.

clauses

member:x,cons(x,l);
member:x,l -> member:x,cons(y,l);
membernew:x,consnew(x,l);
membernew:x,l -> membernew:x,consnew(y,l).


private free secretA, secretB.
query attacker:secretA;
      attacker:secretB.

let processA = 
	in(c, x);
	let y suchthat member:y,x in
	let =pkA = checksign(y, pkB) in
	out(c, sign(x,skA)).

let processB = 
	out(c, sign(pkA, skB));
	in(c,x);
	let z = checksign(x,pkA) in
	out(c, secretB).

process new skA; new skB;
	let pkA = pk(skA) in 
	let pkB = pk(skB) in
	out(c, pkA); out(c, pkB);
	((!processA) | (!processB))
