From 0ed830dc5f6eb37bdc2e66d0c48247bc96b9dc6b Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 7 Dec 2024 19:35:49 +0100 Subject: [PATCH] Call the correct mac init function in 128x2 Remove unused var --- src/aegis128l/aegis128l_common.h | 1 - src/aegis128x2/aegis128x2.c | 2 +- src/aegis128x2/aegis128x2_common.h | 1 - src/aegis256/aegis256_common.h | 1 - 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/aegis128l/aegis128l_common.h b/src/aegis128l/aegis128l_common.h index ef98994..3a328d8 100644 --- a/src/aegis128l/aegis128l_common.h +++ b/src/aegis128l/aegis128l_common.h @@ -585,7 +585,6 @@ state_mac_init(aegis128l_mac_state *st_, const uint8_t *npub, const uint8_t *k) _aegis128l_mac_state *const st = (_aegis128l_mac_state *) ((((uintptr_t) &st_->opaque) + (ALIGNMENT - 1)) & ~(uintptr_t) (ALIGNMENT - 1)); - size_t i; COMPILER_ASSERT((sizeof *st) + ALIGNMENT <= sizeof *st_); st->pos = 0; diff --git a/src/aegis128x2/aegis128x2.c b/src/aegis128x2/aegis128x2.c index 50c581c..9fd5e11 100644 --- a/src/aegis128x2/aegis128x2.c +++ b/src/aegis128x2/aegis128x2.c @@ -178,7 +178,7 @@ aegis128x2_decrypt_unauthenticated(uint8_t *m, const uint8_t *c, size_t clen, co void aegis128x2_mac_init(aegis128x2_mac_state *st_, const uint8_t *k, const uint8_t *npub) { - implementation->state_init(st_, NULL, 0, npub, k); + implementation->state_mac_init(st_, npub, k); } int diff --git a/src/aegis128x2/aegis128x2_common.h b/src/aegis128x2/aegis128x2_common.h index 16c2eed..bdba986 100644 --- a/src/aegis128x2/aegis128x2_common.h +++ b/src/aegis128x2/aegis128x2_common.h @@ -687,7 +687,6 @@ state_mac_init(aegis128x2_mac_state *st_, const uint8_t *npub, const uint8_t *k) _aegis128x2_mac_state *const st = (_aegis128x2_mac_state *) ((((uintptr_t) &st_->opaque) + (ALIGNMENT - 1)) & ~(uintptr_t) (ALIGNMENT - 1)); - size_t i; COMPILER_ASSERT((sizeof *st) + ALIGNMENT <= sizeof *st_); st->pos = 0; diff --git a/src/aegis256/aegis256_common.h b/src/aegis256/aegis256_common.h index 4623843..acf66e0 100644 --- a/src/aegis256/aegis256_common.h +++ b/src/aegis256/aegis256_common.h @@ -573,7 +573,6 @@ state_mac_init(aegis256_mac_state *st_, const uint8_t *npub, const uint8_t *k) _aegis256_mac_state *const st = (_aegis256_mac_state *) ((((uintptr_t) &st_->opaque) + (ALIGNMENT - 1)) & ~(uintptr_t) (ALIGNMENT - 1)); - size_t i; COMPILER_ASSERT((sizeof *st) + ALIGNMENT <= sizeof *st_); st->pos = 0;