From 76e29be1a91e08b5819c813f7addaeb3f1f797d6 Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Wed, 29 Jan 2025 11:33:11 +0100 Subject: [PATCH] ascon: remove 6 round perm as its not used --- wolfcrypt/src/ascon.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/wolfcrypt/src/ascon.c b/wolfcrypt/src/ascon.c index 3580dc59d..4da892c53 100644 --- a/wolfcrypt/src/ascon.c +++ b/wolfcrypt/src/ascon.c @@ -70,8 +70,6 @@ static const byte round_constants[MAX_ROUNDS] = { static byte start_index(byte rounds) { switch (rounds) { - case 6: - return 6; case 8: return 4; case 12: @@ -154,7 +152,9 @@ static void permutation(AsconState* a, byte rounds) tmp.s64[2] ^ rotrFixed64(tmp.s64[2], 1) ^ rotrFixed64(tmp.s64[2], 6); \ } while (0) -#define p6(a) \ +#define p8(a) \ + p(a, 0xb4); \ + p(a, 0xa5); \ p(a, 0x96); \ p(a, 0x87); \ p(a, 0x78); \ @@ -162,11 +162,6 @@ static void permutation(AsconState* a, byte rounds) p(a, 0x5a); \ p(a, 0x4b) -#define p8(a) \ - p(a, 0xb4); \ - p(a, 0xa5); \ - p6(a) - #define p12(a) \ p(a, 0xf0); \ p(a, 0xe1); \