Definition GenUpdate_original_Zlist (state : list byte * list byte) (n : nat) :
(list (list byte) * (list byte * list byte)) :=
match state with (k, v) =>
match Gen_loop_Zlist k v n with (blocks, v') =>
let k' := HMAC256 (v' ++ [Byte.zero]) k in
let v'' := HMAC256 v' k' in (blocks, (k', v''))
end
end.

(* Specifications: *)
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.