From 0bdbd924c1b414fdad897eb2833ae0daab4d67c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Vejpustek?= Date: Fri, 9 Aug 2024 16:51:03 +0200 Subject: [PATCH] refactor(crypto): optimize size of AES --- crypto/aes/aesopt.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/crypto/aes/aesopt.h b/crypto/aes/aesopt.h index 3df184c6c7..6cd80cde35 100644 --- a/crypto/aes/aesopt.h +++ b/crypto/aes/aesopt.h @@ -294,7 +294,7 @@ Issue Date: 20/12/2007 unrolling. The following options allow partial or full loop unrolling to be set independently for encryption and decryption */ -#if 1 +#if 0 # define ENC_UNROLL FULL #elif 0 # define ENC_UNROLL PARTIAL @@ -310,11 +310,11 @@ Issue Date: 20/12/2007 # define DEC_UNROLL NONE #endif -#if 1 +#if 0 # define ENC_KS_UNROLL #endif -#if 1 +#if 0 # define DEC_KS_UNROLL #endif @@ -323,7 +323,7 @@ Issue Date: 20/12/2007 If this section is included, tables are used to provide faster finite field arithmetic (this has no effect if STATIC_TABLES is defined). */ -#if 1 +#if 0 # define FF_TABLES #endif @@ -402,7 +402,7 @@ Issue Date: 20/12/2007 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 #elif 0 # define ENC_ROUND ONE_TABLE @@ -410,7 +410,7 @@ Issue Date: 20/12/2007 # define ENC_ROUND NO_TABLES #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 #elif 0 # define LAST_ENC_ROUND ONE_TABLE @@ -418,7 +418,7 @@ Issue Date: 20/12/2007 # define LAST_ENC_ROUND NO_TABLES #endif -#if 1 /* set tables for the normal decryption round */ +#if 0 /* set tables for the normal decryption round */ # define DEC_ROUND FOUR_TABLES #elif 0 # define DEC_ROUND ONE_TABLE @@ -426,7 +426,7 @@ Issue Date: 20/12/2007 # define DEC_ROUND NO_TABLES #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 #elif 0 # 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 defines to set this requirement. */ -#if 1 +#if 0 # define KEY_SCHED FOUR_TABLES #elif 0 # define KEY_SCHED ONE_TABLE