mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-16 09:32:00 +00:00
refactor(crypto): optimize size of AES
This commit is contained in:
parent
f6aa7cbb08
commit
0bdbd924c1
@ -294,7 +294,7 @@ Issue Date: 20/12/2007
|
|||||||
unrolling. The following options allow partial or full loop unrolling
|
unrolling. The following options allow partial or full loop unrolling
|
||||||
to be set independently for encryption and decryption
|
to be set independently for encryption and decryption
|
||||||
*/
|
*/
|
||||||
#if 1
|
#if 0
|
||||||
# define ENC_UNROLL FULL
|
# define ENC_UNROLL FULL
|
||||||
#elif 0
|
#elif 0
|
||||||
# define ENC_UNROLL PARTIAL
|
# define ENC_UNROLL PARTIAL
|
||||||
@ -310,11 +310,11 @@ Issue Date: 20/12/2007
|
|||||||
# define DEC_UNROLL NONE
|
# define DEC_UNROLL NONE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 1
|
#if 0
|
||||||
# define ENC_KS_UNROLL
|
# define ENC_KS_UNROLL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 1
|
#if 0
|
||||||
# define DEC_KS_UNROLL
|
# define DEC_KS_UNROLL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -323,7 +323,7 @@ Issue Date: 20/12/2007
|
|||||||
If this section is included, tables are used to provide faster finite
|
If this section is included, tables are used to provide faster finite
|
||||||
field arithmetic (this has no effect if STATIC_TABLES is defined).
|
field arithmetic (this has no effect if STATIC_TABLES is defined).
|
||||||
*/
|
*/
|
||||||
#if 1
|
#if 0
|
||||||
# define FF_TABLES
|
# define FF_TABLES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -402,7 +402,7 @@ Issue Date: 20/12/2007
|
|||||||
of tables used by this implementation.
|
of tables used by this implementation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if 1 /* set tables for the normal encryption round */
|
#if 0 /* set tables for the normal encryption round */
|
||||||
# define ENC_ROUND FOUR_TABLES
|
# define ENC_ROUND FOUR_TABLES
|
||||||
#elif 0
|
#elif 0
|
||||||
# define ENC_ROUND ONE_TABLE
|
# define ENC_ROUND ONE_TABLE
|
||||||
@ -410,7 +410,7 @@ Issue Date: 20/12/2007
|
|||||||
# define ENC_ROUND NO_TABLES
|
# define ENC_ROUND NO_TABLES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 1 /* set tables for the last encryption round */
|
#if 0 /* set tables for the last encryption round */
|
||||||
# define LAST_ENC_ROUND FOUR_TABLES
|
# define LAST_ENC_ROUND FOUR_TABLES
|
||||||
#elif 0
|
#elif 0
|
||||||
# define LAST_ENC_ROUND ONE_TABLE
|
# define LAST_ENC_ROUND ONE_TABLE
|
||||||
@ -418,7 +418,7 @@ Issue Date: 20/12/2007
|
|||||||
# define LAST_ENC_ROUND NO_TABLES
|
# define LAST_ENC_ROUND NO_TABLES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 1 /* set tables for the normal decryption round */
|
#if 0 /* set tables for the normal decryption round */
|
||||||
# define DEC_ROUND FOUR_TABLES
|
# define DEC_ROUND FOUR_TABLES
|
||||||
#elif 0
|
#elif 0
|
||||||
# define DEC_ROUND ONE_TABLE
|
# define DEC_ROUND ONE_TABLE
|
||||||
@ -426,7 +426,7 @@ Issue Date: 20/12/2007
|
|||||||
# define DEC_ROUND NO_TABLES
|
# define DEC_ROUND NO_TABLES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 1 /* set tables for the last decryption round */
|
#if 0 /* set tables for the last decryption round */
|
||||||
# define LAST_DEC_ROUND FOUR_TABLES
|
# define LAST_DEC_ROUND FOUR_TABLES
|
||||||
#elif 0
|
#elif 0
|
||||||
# define LAST_DEC_ROUND ONE_TABLE
|
# define LAST_DEC_ROUND ONE_TABLE
|
||||||
@ -438,7 +438,7 @@ Issue Date: 20/12/2007
|
|||||||
way that the round functions can. Include or exclude the following
|
way that the round functions can. Include or exclude the following
|
||||||
defines to set this requirement.
|
defines to set this requirement.
|
||||||
*/
|
*/
|
||||||
#if 1
|
#if 0
|
||||||
# define KEY_SCHED FOUR_TABLES
|
# define KEY_SCHED FOUR_TABLES
|
||||||
#elif 0
|
#elif 0
|
||||||
# define KEY_SCHED ONE_TABLE
|
# define KEY_SCHED ONE_TABLE
|
||||||
|
Loading…
Reference in New Issue
Block a user