diff options
| author | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2018-11-21 08:27:06 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2018-11-21 08:28:57 +0100 |
| commit | 59369b8bfe208ba5a353c0985ad7c8d421cc9988 (patch) | |
| tree | f643761cb0b37b211a23ba0e6d99b2890ced1536 /crypto_aead/lilliputaei128v1/ref/test | |
| parent | 6e89e68db7aec144cd86f44d130e9ec73449da0f (diff) | |
| download | lilliput-ae-implem-59369b8bfe208ba5a353c0985ad7c8d421cc9988.tar.xz | |
Remaniement de la boucle de test du tweakey
Diffstat (limited to 'crypto_aead/lilliputaei128v1/ref/test')
| -rw-r--r-- | crypto_aead/lilliputaei128v1/ref/test/tweakey.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/crypto_aead/lilliputaei128v1/ref/test/tweakey.c b/crypto_aead/lilliputaei128v1/ref/test/tweakey.c index ddf595b..1f5aacf 100644 --- 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); } |
