]> git.codecow.com Git - Monocypher.git/commit
Modify Blake2b context input to byte buffer
authorLoup Vaillant <loup@loup-vaillant.fr>
Wed, 22 Mar 2023 22:49:16 +0000 (23:49 +0100)
committerLoup Vaillant <loup@loup-vaillant.fr>
Wed, 22 Mar 2023 23:11:29 +0000 (00:11 +0100)
commit310aab8ddf9b0a31ccc74c06ece8098769cf1231
tree1499dfd66b89b90b80e860772f1ff4bcd8d07ac0
parent2c6b521f7781014aa5a36c4623cd2b9dfa6384ae
Modify Blake2b context input to byte buffer

Though it requires a (safe because it's all aligned) cast at one point,
it makes the code simpler and significantly speeds up non-aligned
incremental hashes.

Surprisingly, foregoing word-by-word loading at the begining of the
update doesn't slow anything down, but forgoing it at the end *does*.
So while we align with block boundaries directly, we end up copying the
remaining words first, then the remaining bytes.
src/monocypher.c
src/monocypher.h
tests/speed/speed.c