-
Notifications
You must be signed in to change notification settings - Fork 256
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
Add x86 intrinsics support for sha2-512 #312
Conversation
Hopefully related to #311 |
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 good to me.
@newpavlov WDYT?
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.
I haven't looked deep into implementation itself and would like to try some minor tweaks, but I think we can merge it after the target_feature(enable = "..")
nitpick will be fixed.
Thank you! I will soon release it as v0.9.7 |
This version is a port of this implementation (
src/sha512_compress_x86_64_avx2.c
) https://github.com/aws-samples/sha2-with-c-intrinsic which is based on this document https://eprint.iacr.org/2012/067.pdf. It usesavx
impl for single odd block and thenavx2
for the rest.Benchmarks:
CPU: Ryzen 9 5950X
cargo +nightly bench -p sha2 --features force-soft
cargo +nightly bench -p sha2