Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix how evercrypt hashing is called #1098

Merged
merged 4 commits into from
Apr 24, 2020

Conversation

eddyashton
Copy link
Member

@eddyashton eddyashton commented Apr 24, 2020

evercrypt_sha256 only worked for data sizes that were a multiple of 64, or less than 64. We missed this because our tests did not cover it, and our runtime hashing is all of 64-byte aligned data.

This fixes that, based on the docs and some trial and error. I've also removed the initializer_list from the constructor, since we only ever use a single CBuffer. If we need to hash non-contiguous data in future, its possible but awkward with evercrypt (all but the last block must be 64-byte aligned, or we must copy). We can re-implement this slow path on demand.

@eddyashton eddyashton requested a review from a team as a code owner April 24, 2020 09:29
@ccf-bot
Copy link
Collaborator

ccf-bot commented Apr 24, 2020

crypto_hash_fix@7603 aka 20200424.8 vs master ewma over 50 builds from 7250 to 7585
images

@eddyashton eddyashton merged commit 4afabd4 into microsoft:master Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants