unfold A_HMAC, RKA_G0, GHMAC,  HMAC_RKA_A, GNMAC, HMAC_spec.GHMAC.
comp_skip.
simpl.
repeat ( inline_first; comp_simp).
comp_skip.
eapply comp_spec_eq_impl_eq.
eapply comp_spec_consequence.
eapply (@oc_comp_spec_eq _ _ _ _ _ _ _ _ _ _ _ _ _ _ (fun a b => a = b)).
trivial.
intuition.
unfold f_oracle.
eapply comp_spec_ret; intuition.
simpl.
specialize (GHMAC_2K_GNMAC_equiv (Vector.append (x xor opad) (x xor ipad)) a0); intuition.
rewrite splitVector_append in H1.
unfold dual_f.
eapply eq_trans.
eapply H1.
unfold GNMAC.
f_equal.
f_equal.
f_equal.
eapply BVxor_comm.
f_equal.
eapply BVxor_comm.
intuition.
destruct b2; simpl in *; subst; intuition.
comp_simp.
simpl.
inline_first.
comp_simp.
intuition.
Qed.
Definition A_NMAC_G1 :=
x1 <-$ {0, 1}^c;
x2 <-$ {0, 1}^c;
[b, _] <-$2 A _ _ (f_oracle GNMAC _ (Vector.append x1 x2)) tt;
ret b.
Definition A_NMAC_G1_0 :=
[x1, x2] <-$2 (
x <-$ {0, 1}^(c + c);
ret (splitVector c c x));
[b, _] <-$2 A _ _ (f_oracle GNMAC _ (Vector.append x1 x2)) tt;
ret b.
Definition A_NMAC_G1_1 :=
[x1, x2] <-$2 (
x1 <-$ {0, 1}^c;
x2 <-$ {0, 1}^c;
ret (x1, x2));
[b, _] <-$2 A _ _ (f_oracle GNMAC _ (Vector.append x1 x2)) tt;
ret b.

Theorem A_NMAC_G1_0_equiv :
Pr[A_NMAC] == Pr[A_NMAC_G1_0].