(* Causes an internal error *)

(* Handshake protocol. Based on the example of ProVerif *)

(* shared-key encryption as equation *)
fun encrypt/2.

(* shared-keys *)
private fun k/2.

(* channel *)
free c.

(* agents' names *)
free A,B.

free w0.
private free w.
noninterf w among (k(A,B), w0).

let processA =
    	in(c, a); in (c, b);
	new x;
	out(c, encrypt(x, k(a,b))).

process	((!processA) | (phase 1; out(c, w)))

(* EXPECTPV
RESULT Non-interference w among (k(A[],B[]), w0[]) cannot be proved.
0.020s (user 0.004s + system 0.016s), max rss 8576K
END *)
