Definition FT0b0(i: Z): int := GF_ops_LL.times2 (Znth i FSb).
Definition FT0b1(i: Z): int := Znth i FSb.
Definition FT0b2(i: Z): int := Znth i FSb.
Definition FT0b3(i: Z): int := GF_ops_LL.times3 (Znth i FSb).
(* Note: according to calc_FT0, it should FT0b3 is (Int.and (Int.xor (GF_ops_LL.times2 (Znth i FSb)) (Znth i FSb)) (Int.repr 255)) but we prefer to use an equivalent "medium-level" formulation *)
Ltac eta5 HH :=
let Hnew := fresh in match type of HH with
| ?f = (fun a1 a2 a3 a4 a5 => ?e) =>
assert (forall a1 a2 a3 a4 a5, f a1 a2 a3 a4 a5 = e) as Hnew by (intro; rewrite HH; reflexivity)
end;
clear HH; rename Hnew into HH.

Lemma HL_equiv_LL_encryption: forall exp_key plaintext,
Zlength exp_key = 15 ->
(mbed_tls_aes_enc
(map Int.unsigned (state_to_list plaintext))
((blocks_to_Zwords exp_key) ++ (list_repeat (8%nat) 0))
) = output_four_ints_as_bytes (state_to_four_ints (Cipher exp_key plaintext)).