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

yescrypt: Use AVX512VL XOP-like bit rotates for faster Salsa20 #207

Merged
merged 1 commit into from
Mar 10, 2025

Conversation

solardiz
Copy link
Collaborator

@solardiz solardiz commented Mar 9, 2025

This speeds up classic scrypt by up to a third, but yescrypt only very slightly. It also reduces code size.

This would only be enabled in builds that support AVX512VL, which I guess is currently uncommon for libxcrypt (even though CPUs that support it are pretty common by now). So maybe in distros like Gentoo where packages are commonly built from source for the local machine?

It shouldn't hurt to have this in the source code anyhow, except that it'd not be part of usual coverage testing - so I suggest occasional testing of a -march=native build on a recent CPU, which would be a good idea prior to these changes as well.

I got the same changes into upstream yescrypt, its fork in JtR tree, and yespower earlier today. The AVX512VL code passed tests in all 3 of these on Intel Tiger Lake.

I did not actually test these changes in libxcrypt yet.

Copy link

codecov bot commented Mar 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.15%. Comparing base (ca15167) to head (dbcfb01).
Report is 6 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #207   +/-   ##
========================================
  Coverage    90.15%   90.15%           
========================================
  Files           32       32           
  Lines         3626     3626           
  Branches       689      689           
========================================
  Hits          3269     3269           
  Misses         226      226           
  Partials       131      131           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@besser82
Copy link
Owner

LGTM!

@besser82 besser82 merged commit dbcfb01 into besser82:develop Mar 10, 2025
85 of 86 checks passed
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.

2 participants