Definition GenUpdate_original_Blist (state : Blist * Blist) (n : nat) :
  (list Blist * (Blist * Blist)) :=
  match state with (k, v) =>
    match Gen_loop_Blist k v n with (bits, v') => 
        let k' := HMAC_Blist k (v' ++ zeroes) in
        let v'' := HMAC_Blist k' v' in (bits, (k', v''))
    end
  end.

(* Specifications: *)
Lemma GenUpdate_original_Blist_Bvec k v n: match GenUpdate_original_Bvec (k,v) n with (blocks,(kk,u)) => GenUpdate_original_Blist (@Vector.to_list _ 256 k, @Vector.to_list _ 256 v) n = (map (@Vector.to_list _ 256) blocks, (@Vector.to_list _ 256 kk, @Vector.to_list _ 256 u)) end.
Lemma GenUpdate_original_Zlist_ZlengthBlocks state n blocks state': GenUpdate_original_Zlist state n = (blocks,state') -> Zlength blocks = Z.of_nat n.
Lemma GenUpdate_original_Zlist_Blist k v n: match GenUpdate_original_Zlist (k,v) n with (blocks,(k',v')) => GenUpdate_original_Blist (bytesToBits k, bytesToBits v) n = (map bytesToBits blocks,(bytesToBits k', bytesToBits v')) end.