#define INITIATOR_TEST 1
#define CUSTOM_MAIN 1

#include "rosenpass/03_identity_hiding.mpv"

let Oinitiator_bad_actor_inner(sk_tmp:kem_sk_prec) =

  in(C, Cinitiator(sidi, Ssskm, Spsk, Sspkt, Seski, Ssptr));

  #if RANDOMIZED_CALL_IDS
    new call:Atom;
  #else
    call <- Cinitiator(sidi, Ssskm, Spsk, Sspkt, Seski, Ssptr);
  #endif

  in(C, last_cookie:key);
  tmpl <- make_trusted_kem_sk(sk_tmp);
  out(C, setup_kem_sk(tmpl));
  Oinitiator_inner(sidi, Ssskm, Spsk, tmpl, Seski, Ssptr, last_cookie, C, call).

let Oinitiator_bad_actor() =
  Oinitiator_bad_actor_inner(responder1) | Oinitiator_bad_actor_inner(responder2) | Oinitiator_bad_actor_inner(initiator1) | Oinitiator_bad_actor_inner(initiator2).


let identity_hiding_main2() = 
  0 | Oinitiator_bad_actor() | rosenpass_main2() | participants_communication() | phase 1; secretCommunication().


let main = identity_hiding_main2.
