Definition CoreInSEP (data : SixteenByte * SixteenByte * (SixteenByte * SixteenByte))
                     (v: val * val * val) : mpred :=
  match data with (Nonce, C, K) =>
  match v with (n, c, k) =>
   (SByte Nonce n) * (SByte C c) * (ThirtyTwoByte K k)
  end end.Definition prepare_data
           (data : SixteenByte * SixteenByte * (SixteenByte * SixteenByte)) :=
match data with ((Nonce, C), K) =>
  match Nonce with (N1, N2, N3, N4) =>
  match C with (C1, C2, C3, C4) =>
  match K with ((K1, K2, K3, K4), (L1, L2, L3, L4)) =>
      map littleendian [C1; K1; K2; K3; K4; C2; N1; N2; N3; N4; C3; L1; L2; L3; L4; C4]
  end end end
end.

Lemma prepare_data_length x: length (prepare_data x) = 16%nat.