1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-19 10:05:05 -07:00

Leverage aegis*_absorb() when no message is desired

This commit is contained in:
Frank Denis 2023-06-06 23:21:22 +02:00
parent 759089c5c7
commit 2c56be1d77
6 changed files with 6 additions and 6 deletions

View File

@ -229,7 +229,7 @@ aegis128l_decrypt_detached(unsigned char *m, unsigned char *nsec, const unsigned
}
} else {
for (i = 0ULL; i + 32ULL <= mlen; i += 32ULL) {
aegis128l_dec(dst, c + i, state);
aegis128l_absorb(c + i, state);
}
}
if (mlen & 0x1f) {

View File

@ -219,7 +219,7 @@ aegis128l_decrypt_detached(unsigned char *m, unsigned char *nsec, const unsigned
}
} else {
for (i = 0ULL; i + 32ULL <= mlen; i += 32ULL) {
aegis128l_dec(dst, c + i, state);
aegis128l_absorb(c + i, state);
}
}
if (mlen & 0x1f) {

View File

@ -222,7 +222,7 @@ aegis128l_decrypt_detached(unsigned char *m, unsigned char *nsec, const unsigned
}
} else {
for (i = 0ULL; i + 32ULL <= mlen; i += 32ULL) {
aegis128l_dec(dst, c + i, state);
aegis128l_absorb(c + i, state);
}
}
if (mlen & 0x1f) {

View File

@ -219,7 +219,7 @@ aegis256_decrypt_detached(unsigned char *m, unsigned char *nsec, const unsigned
}
} else {
for (i = 0ULL; i + 16ULL <= mlen; i += 16ULL) {
aegis256_dec(dst, c + i, state);
aegis256_absorb(c + i, state);
}
}
if (mlen & 0xf) {

View File

@ -214,7 +214,7 @@ aegis256_decrypt_detached(unsigned char *m, unsigned char *nsec, const unsigned
}
} else {
for (i = 0ULL; i + 16ULL <= mlen; i += 16ULL) {
aegis256_dec(dst, c + i, state);
aegis256_absorb(c + i, state);
}
}
if (mlen & 0xf) {

View File

@ -211,7 +211,7 @@ aegis256_decrypt_detached(unsigned char *m, unsigned char *nsec, const unsigned
}
} else {
for (i = 0ULL; i + 16ULL <= mlen; i += 16ULL) {
aegis256_dec(dst, c + i, state);
aegis256_absorb(c + i, state);
}
}
if (mlen & 0xf) {