(*Variant of Gen_loop_bvec that uses Blist instead of Bvector 256*)
Fixpoint Gen_loop_Blist (k : Blist) (v : Blist) (n : nat)
  : list Blist * Blist :=
  match n with
  | O => (nil, v)
  | S n' =>
    let v' := HMAC_Blist k v in
    let (bits, v'') := Gen_loop_Blist k v' n' in
    (List.app bits (List.cons v' List.nil), v'')     
  end.

Lemma Gen_loop_Blist_Bvec k: forall n v blocks u, Gen_loop_Blist (to_list k) (to_list v) n = (blocks, u) -> forall blocks' u', Gen_loop_Bvec k v n = (blocks', u') -> u = to_list u' /\ blocks = map (@Vector.to_list _ 256) blocks'.