Module Type AES_LL_Spec_Type.
(* arr: list of 4 bytes *)
Parameter get_uint32_le: list Z -> Z -> int.
(* outputs a list of 4 bytes *)
Parameter put_uint32_le: int -> list int.
Parameter output_four_ints_as_bytes: four_ints -> list int.
Parameter byte0: int -> Z.
Parameter byte1: int -> Z.
Parameter byte2: int -> Z.
Parameter byte3: int -> Z.
Parameter mbed_tls_fround_col: int -> int -> int -> int -> Z -> int.
Parameter mbed_tls_final_fround_col: int -> int -> int -> int -> Z -> int.
Parameter mbed_tls_initial_add_round_key_col: Z -> list Z -> list Z -> int.
Parameter mbed_tls_fround: four_ints -> list Z -> Z -> four_ints.
Parameter mbed_tls_final_fround: four_ints -> list Z -> Z -> four_ints.
Parameter mbed_tls_enc_rounds: nat -> four_ints -> list Z -> Z -> four_ints.
(* plaintext: array of bytes rks: expanded round keys, array of Int32 *)
Parameter mbed_tls_initial_add_round_key: list Z -> list Z -> four_ints.
Parameter mbed_tls_aes_enc: list Z -> list Z -> list int.

Axiom mbed_tls_aes_enc_def: mbed_tls_aes_enc = fun (plaintext : list Z) (rks : list Z) =>
let state0  := mbed_tls_initial_add_round_key plaintext rks in
let state13 := mbed_tls_enc_rounds 13 state0 rks 4 in
let state14 := mbed_tls_final_fround state13 rks 56 in
output_four_ints_as_bytes state14.