Rename and document new configuration option for packing AES tables

This commit renames the new AES table packing option introduced in the
previous MBEDTLS_AES_PACK_TABLES and documents its use and memory vs.
speed tradeoff. It also enhances the documentation of the other
AES-related option MBEDTLS_AES_ROM_TABLES.
This commit is contained in:
Hanno Becker 2017-06-07 15:52:48 +01:00
parent 2fd1bb8f02
commit 177d3cf7bb
3 changed files with 45 additions and 24 deletions

View file

@ -381,20 +381,41 @@
/**
* \def MBEDTLS_AES_ROM_TABLES
*
* Store the AES tables in ROM.
* Use precomputed AES tables stored in ROM.
*
* Uncomment this macro to use precomputed AES tables stored in ROM.
* Comment this macro to generate AES tables in RAM at runtime.
*
* Tradeoff: Using precomputed ROM tables reduces the time to setup
* an AES context but comes at the cost of additional 8192b ROM use
* (resp. 2048b if \c MBEDTLS_AES_FEWER_TABLES below is used).
*
* This option is independent of \c MBEDTLS_AES_FEWER_TABLES.
*
* Uncomment this macro to store the AES tables in ROM.
*/
//#define MBEDTLS_AES_ROM_TABLES
/**
* \def MBEDTLS_AES_SMALL_TABLES
* \def MBEDTLS_AES_FEWER_TABLES
*
* Use less ROM/RAM for the AES implementation (saves about 6144 bytes).
* Use less ROM/RAM for AES tables.
*
* Uncommenting this macro omits 75% of the AES tables from
* ROM / RAM (depending on the value of \c MBEDTLS_AES_ROM_TABLES)
* by computing their values on the fly during operations
* (the tables are entry-wise rotations of one another).
*
* Tradeoff: Uncommenting this reduces the RAM / ROM footprint
* by 6144b but at the cost of more arithmetic operations during
* runtime. Specifically, one has to compare 4 accesses within
* different tables to 4 accesses with additional arithmetic
* operations within the same table. The performance gain/loss
* depends on the system and memory details.
*
* This option is independent of \c MBEDTLS_AES_ROM_TABLES.
*
* Uncomment this macro to use less memory for AES.
*/
//#define MBEDTLS_AES_SMALL_TABLES
//#define MBEDTLS_AES_FEWER_TABLES
/**
* \def MBEDTLS_CAMELLIA_SMALL_MEMORY