AES (huaes.h)

The AES functions.

The AES cipher allows 128-bit, 192-bit and 256-bit keys. The AES functions are defined in huaes.h. An AES parameters object, key object and operating context are required to perform the AES algorithm. An RNG context is required if key generation will be performed. The various modes of operation are indicated by: For AES Counter (CTR) mode, you may use the macro SB_AES_CTR(ctrBits) to define the mode of operation, where ctrBits is the size (in bits) of the counter, and ctrBits is a multiple of 8 and is no greater than 128. The SB_AES_CTR modes above are provided for convenience for using counter mode with a counter size of 8, 16, 32, 64 or 128. For AES XTS mode, you may use the macro SB_AES_XTS(unitBytes) to define the mode of operation, where unitBytes is the number of bytes in a data unit. The number of bytes in a data unit must be a multiple of 16, with a maximum of 224 ( = 0x1000000 ). The increment function implemented for the CTR mode is "Standard Incrementing Function" described in Appendix B.1 of NIST SP 800-38A 2001 (http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf).
The block size constants are: The supported key size constants are: