(* Functional implementation of Salsa20 whose structure matches the one of tweetnacl.c implementation, plus proof of coorrectness wrt Salsa20.v  Lennart Beringer, June 2015*)
(*Processing time for this file: approx 13mins*)
Local Open Scope logic.
(*Require Import general_lemmas.  Require Import split_array_lemmas.*)
Opaque littleendian_invert. Opaque Snuffle.Snuffle.

Lemma HFalse_inv16_char: forall l xs ys,
HFalse_inv l 16 xs ys ->
Zlength xs = 16 -> Zlength ys=16 ->
exists sum, Some sum = sumlist xs ys /\
l = QuadChunks2ValList (map littleendian_invert sum).