-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
blake2b: compress and wipe keys immediately
Changes keyed hashing such that: - Keys are not copied into a temporary 128 byte stack buffer, nor the hash state buffer - Keys are compressed immediately during initialization, not during `blake2b_final` or `blake2b_update` - Internal calculation vectors `m` and `v` are wiped in the same stack frame as creation These changes should make keyed Blake2b hashing more memory secure. Also, for optimization, we use 1 `memcpy` call for regular copying into message vector `m` instead of 16 `load64` calls if we're on a little-endian system.
- Loading branch information
Showing
2 changed files
with
102 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters