]> git.saurik.com Git - apple/xnu.git/blob - bsd/crypto/aes/i386/ReadMe.txt
xnu-1699.22.73.tar.gz
[apple/xnu.git] / bsd / crypto / aes / i386 / ReadMe.txt
1 This directory contains a hybrid AES implementation. The core AES routines
2 (the actual encryption, decryption, and key expansion) are in:
3
4 AES.s
5 Data.mk
6 Data.s
7 EncryptDecrypt.s
8 ExpandKeyForDecryption.s
9 ExpandKeyForEncryption.s
10 MakeData.c
11
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.)
20
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.