1 This directory contains a hybrid AES implementation. The core AES routines
2 (the actual encryption, decryption, and key expansion) are in:
8 ExpandKeyForDecryption.s
9 ExpandKeyForEncryption.s
12 Although the above files do not explicitly include aes.h, they confirm to
13 certain things defined in it, notably the aes_rval type and the layout of the
14 aes_encrypt_ctx and aes_decrypt_ctx structures. These must be kept
15 compatibility; the definitions of ContextKey and ContextKeyLength in AES.s must
16 match the offsets of the key ("ks") and key_length ("inf") members of
17 aes_encrypt_ctx and aes_decrypt_ctx. (For some reason, aes_inf is a union that
18 is written as a 32-bit integer and read as an 8-bit integer. I do not know
19 why but have reproduced that behavior in the new implementation.)
21 aes_modes.c extends the API, most notably by implementing CBC mode using the
22 basic AES block encryption. It uses aesopt.h and edefs.h.