Require Recdef.
Require Coq.Strings.String.
Require Coq.Strings.Ascii.
(* LINEAR-TIME FUNCTIONAL VERSION OF SHA256 *)
Function zeros (n : Z) {measure Z.to_nat n} : list Int.int :=
if Z.gtb n 0 then Int.zero :: zeros (n-1) else nil.

Lemma rnd_64_S:
forall regs i b k w,
nth_error K256 i = Some k ->
nth_error b i = Some w ->
rnd_64 regs K256 (firstn (S i) b) =
rnd_function (rnd_64 regs K256 (firstn i b)) k w.