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

add argon2id support for ossl 3.2+ #2290

Merged
merged 9 commits into from
Sep 2, 2024
Merged

add argon2id support for ossl 3.2+ #2290

merged 9 commits into from
Sep 2, 2024

Conversation

reaperhulk
Copy link
Contributor

@reaperhulk reaperhulk commented Aug 31, 2024

In argon2 there is a concept of parallelism (called lanes). Generally you'd want to have at least as many threads as you have lanes since otherwise you are trading advantage to an attacker, but OpenSSL maintains a global thread limit (as well as allowing building with no-threads). So to use threads in this you must both set the global thread limit to greater than 1 and then also pass a thread count to the underlying EVP_KDF_derive function.

For this PR we simply always set threads to 1, and follow-ups will expose the global thread limit APIs and then make use of potential parallelism.

openssl/src/argon2.rs Outdated Show resolved Hide resolved
openssl/src/argon2.rs Outdated Show resolved Hide resolved
openssl/src/argon2.rs Outdated Show resolved Hide resolved
openssl/src/argon2.rs Outdated Show resolved Hide resolved
openssl/src/argon2.rs Outdated Show resolved Hide resolved
openssl/src/argon2.rs Outdated Show resolved Hide resolved
openssl/src/lib.rs Outdated Show resolved Hide resolved
openssl/src/kdf.rs Outdated Show resolved Hide resolved
openssl/src/kdf.rs Outdated Show resolved Hide resolved
openssl/src/kdf.rs Outdated Show resolved Hide resolved
openssl/src/kdf.rs Outdated Show resolved Hide resolved
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
@alex alex merged commit 73892b5 into sfackler:master Sep 2, 2024
61 checks passed
@reaperhulk reaperhulk deleted the argon2 branch September 2, 2024 00:35
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