-
Notifications
You must be signed in to change notification settings - Fork 161
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
Use sha2-mb-scalar for sha2-streaming #670
Conversation
…st/hacl-star into protz_sha2mb_streaming
…st/hacl-star into protz_sha2mb_streaming
…ing' into protz_sha2mb_streaming
I pushed a temporary commit that duplicates some code. The goal before merging this PR (after discussing with Marina) is to:
|
Some performance numbers for reference:
I'm observing some pretty big variation from one run to the next (5%) so take these with a grain of salt. But overall the improvements are clear, especially on M1. |
I did the suggested changes.
so it's removing quite a bunch of C code (which is good). One important change: Hacl_SHA2_Scalar32.c is now bundled inside of Hacl_SHA2_Streaming to make sure the individual helper functions are |
New benchmars on my intel 2019 macbook pro:
At least on this machine, sha2-256-mb-streaming is now on-par with OpenSSL-noasm. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks!
This gives a significant performance improvement and paves the way for removing the older, less efficient sha2 implementation authored by yours truly.
HUGE thanks to @polubelova and @R1kM for helping out with those pesky proofs.
Next:
switch over sha2/384 and sha2/512DONE