Replies: 1 comment
-
Yes, the output of the sha512 function is 64 bytes, so a 64 byte buffer is needed. This issue tracker is for tracking bugs. For general questions, please use the discussions section. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to understand this line:
libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305.c
Line 16 in 4cdcefa
The rest of that function only uses 32 bytes, so I'm wondering what's the significance/reason for declaring the
hash
to be 64 bytes wide instead of 32 bytes?Is it because the [
sha512(..)
function}(https://github.com/jedisct1/libsodium/blob/4cdcefaff250af42663eb202c1daf49ea4d7ad7e/src/libsodium/crypto_hash/sha512/cp/hash_sha512_cp.c#L274) actually needs/uses all 64 bytes for is operation, even though we only end up using the first 32 bytes from it?Beta Was this translation helpful? Give feedback.
All reactions