Definition padlen' (n: Z) : list Int.int :=
let q := (n+8)/64*16 + 15 - (n+8)/4   (* number of zero-pad words *)
in zeros q ++ [Int.repr (n * 8 / Int.modulus); Int.repr (n * 8)].

Lemma length_generate_and_pad'':
forall (l: list byte) (k: Z),
k >= 0 ->
k + Zlength (generate_and_pad' l (k*4)) = roundup (((k*4+Zlength l)+12)/4) 16.