mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-19 18:15:18 -07:00
Add comments on wrong alignment
This commit is contained in:
parent
e87df50575
commit
290197ba3e
@ -148,6 +148,7 @@ crypto_secretstream_xchacha20poly1305_push
|
||||
crypto_onetimeauth_poly1305_update(&poly1305_state, c, mlen);
|
||||
crypto_onetimeauth_poly1305_update
|
||||
(&poly1305_state, _pad0, (0x10 - (sizeof block) + mlen) & 0xf);
|
||||
/* should have been (0x10 - (sizeof block + mlen)) & 0xf to keep input blocks aligned */
|
||||
|
||||
STORE64_LE(slen, (uint64_t) adlen);
|
||||
crypto_onetimeauth_poly1305_update(&poly1305_state, slen, sizeof slen);
|
||||
@ -224,6 +225,7 @@ crypto_secretstream_xchacha20poly1305_pull
|
||||
crypto_onetimeauth_poly1305_update(&poly1305_state, c, mlen);
|
||||
crypto_onetimeauth_poly1305_update
|
||||
(&poly1305_state, _pad0, (0x10 - (sizeof block) + mlen) & 0xf);
|
||||
/* should have been (0x10 - (sizeof block + mlen)) & 0xf to keep input blocks aligned */
|
||||
|
||||
STORE64_LE(slen, (uint64_t) adlen);
|
||||
crypto_onetimeauth_poly1305_update(&poly1305_state, slen, sizeof slen);
|
||||
|
Loading…
Reference in New Issue
Block a user