Skip to content

Commit

Permalink
Remove unneeded variable
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed Dec 5, 2024
1 parent 4caf77f commit 086aead
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/aegis128x2/aegis128x2_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ aegis128x2_mac_nr(uint8_t *mac, size_t maclen, uint64_t adlen, aes_block_t *stat
const aes_block_t *state0)
{
uint8_t t[2 * AES_BLOCK_LENGTH];
uint8_t u[2 * AES_BLOCK_LENGTH];
aes_block_t tmp;
int i;

Expand All @@ -194,7 +193,6 @@ aegis128x2_mac_nr(uint8_t *mac, size_t maclen, uint64_t adlen, aes_block_t *stat
}

memset(t, 0, sizeof t);
memset(u, 0, sizeof u);
if (maclen == 16) {
tmp = AES_BLOCK_XOR(state[6], AES_BLOCK_XOR(state[5], state[4]));
tmp = AES_BLOCK_XOR(tmp, AES_BLOCK_XOR(state[3], state[2]));
Expand All @@ -203,7 +201,7 @@ aegis128x2_mac_nr(uint8_t *mac, size_t maclen, uint64_t adlen, aes_block_t *stat

memcpy(state, state0, sizeof(aegis_blocks));
for (i = 0; i < AES_BLOCK_LENGTH / 32; i++) {
aegis128x2_absorb(u + i * 32, state);
aegis128x2_absorb(t + i * 32, state);
}
for (i = 0; i < 7; i++) {
aegis128x2_update(state, tmp, tmp);
Expand All @@ -224,7 +222,7 @@ aegis128x2_mac_nr(uint8_t *mac, size_t maclen, uint64_t adlen, aes_block_t *stat

memcpy(state, state0, sizeof(aegis_blocks));
for (i = 0; i < 2 * AES_BLOCK_LENGTH / 32; i++) {
aegis128x2_absorb(u + i * 32, state);
aegis128x2_absorb(t + i * 32, state);
}
for (i = 0; i < 7; i++) {
aegis128x2_update(state, tmp, tmp);
Expand Down

0 comments on commit 086aead

Please sign in to comment.