Definition b := (c+p)%nat.(* The iteration of the compression function gives a keyed hash function on lists of words. *)
  Definition h_star k (m : list (Blist)) :=
    fold_left h m k.(* The composition of the keyed hash function with the IV. *)
  Definition hash_words := h_star iv.Definition app_fpad (x : Blist) : Blist :=
    x ++ fpad x.Definition h_star_pad k x :=
    app_fpad (h_star k x).(* The "two-key" version of GHMAC and HMAC. *)
  Definition GHMAC_2K (k : Blist) m :=
    let (k_Out, k_In) := splitList b k in
      let h_in := (hash_words (k_In :: m)) in
        hash_words (k_Out :: (app_fpad h_in) :: nil).Definition HMAC_2K (k : Blist) (m : Blist) :=
    GHMAC_2K k (splitAndPad m).Definition HMAC (k : Blist) :=
    HMAC_2K (BLxor k opad ++ BLxor k ipad).

Lemma fpad_list_concat_eq : HMAC_List.app_fpad = HMAC_Concat.app_fpad.