lilliput-ae-reference-implementation

Implementations of Lilliput-AE submitted to the NIST LWC standardization process
git clone https://git.kevinlegouguec.net/lilliput-ae-reference-implementation
Log | Files | Refs | README

commit 59369b8bfe208ba5a353c0985ad7c8d421cc9988
parent 6e89e68db7aec144cd86f44d130e9ec73449da0f
Author: Kévin Le Gouguec <kevin.legouguec@airbus.com>
Date:   Wed, 21 Nov 2018 08:27:06 +0100

Remaniement de la boucle de test du tweakey

Diffstat:
Mcrypto_aead/lilliputaei128v1/ref/test/tweakey.c | 12++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/crypto_aead/lilliputaei128v1/ref/test/tweakey.c b/crypto_aead/lilliputaei128v1/ref/test/tweakey.c @@ -8,6 +8,9 @@ #define ARRAY_END(A) (A+ARRAY_NB(A)) +#define ROUNDS 32 + + struct vector_input { char * name; @@ -96,13 +99,14 @@ int main() fprintf(dump, "Tweakey Schedule\n"); uint8_t rtk[ROUND_TWEAKEY_BYTES]; - for (uint8_t i=0; i<32; i++) + tweakey_state_extract(&tk, rtk, 0); + + for (uint8_t i=1; i<ROUNDS; i++) { - tweakey_state_extract(&tk, rtk, i); - fprintf(dump, " Round Tweakey %"PRIu8"\n", i+1); + fprintf(dump, " Round Tweakey %"PRIu8"\n", i); tweakey_state_update(&tk); + tweakey_state_extract(&tk, rtk, i); } - tweakey_state_extract(&tk, rtk, 32); fclose(dump); }