Skip to content

Commit

Permalink
Call the correct mac init function in 128x2
Browse files Browse the repository at this point in the history
Remove unused var
  • Loading branch information
jedisct1 committed Dec 7, 2024
1 parent f5a77d4 commit 0ed830d
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion src/aegis128l/aegis128l_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/aegis128x2/aegis128x2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/aegis128x2/aegis128x2_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/aegis256/aegis256_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0ed830d

Please sign in to comment.