(* Copyright 2012-2015 by Adam Petcher.				* * Use of this source code is governed by the license described	* * in the LICENSE file at the root of the source tree.		*)
Set Implicit Arguments.
Section HMAC_PRF.
Variable c p : nat.
Definition b := @b c p.
Variable h : Bvector c -> Bvector b -> Bvector c.
Variable iv : Bvector c.
Variable Message : Set.
Hypothesis Message_EqDec : EqDec Message.
Variable splitAndPad : Message -> list (Bvector b).
Hypothesis splitAndPad_1_1 :
forall b1 b2,
splitAndPad b1 = splitAndPad b2 ->
b1 = b2.
Variable fpad : Bvector c -> Bvector p.
Definition h_star_pad := h_star_pad h fpad.
Variable opad ipad : Bvector b.
Hypothesis opad_ne_ipad : opad <> ipad.
Section h_star_WCR.
Definition h_star := h_star _ h.
Variable Z : OracleComp (list (Bvector (HMAC_spec.b c p))) (Bvector (HMAC_spec.b c p))
(list (Bvector (HMAC_spec.b c p)) * list (Bvector (HMAC_spec.b c p))).
Definition Y : OracleComp (list (Bvector (HMAC_spec.b c p))) (Bvector c)
(list (Bvector (HMAC_spec.b c p)) * list (Bvector (HMAC_spec.b c p))) :=
[x, _] <--$2 OC_Run _ _ _ Z (fun _ d => r <--$ OC_Query _ d; $ ret ((app_fpad fpad r), tt)) tt;
$ ret x.

(* Specifications: *)
Theorem Vector_append_inj_first :
forall (A : Set)(a : nat)(a1 a2 : Vector.t A a)(b : nat)(b1 b2 : Vector.t A b),
Vector.append a1 b1 = Vector.append a2 b2 ->
a1 = a2.