Skip to content

Add support for argon2d and argon2i variants #2416

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

Merged
merged 6 commits into from
Aug 12, 2025

Conversation

greateggsgreg
Copy link
Contributor

Expose functionality of supplementary variants, Argon2d and Argon2i, as described in RFC 9106

@greateggsgreg
Copy link
Contributor Author

I am unsure what's causing the failures in the CI tests. They all appear to be a failing test_mod_sqrt tests, but only on boringssl; however, my deltas did not touch anything used within these tests. Any advice?

@alex
Copy link
Collaborator

alex commented May 29, 2025

most likely they're flakes

@greateggsgreg
Copy link
Contributor Author

Any thoughts on these additions? This PR is a dependency to add argon2d/2i support to the Python cryptography project

#[allow(clippy::too_many_arguments)]
pub fn argon2id(
fn argon2_helper(
kdf_identifier: &'static [u8],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for soundness this needs to be a &CStr or something, otherwise you get buffer overread if you pass something without a trailing nul

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done @alex appreciate the review!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The c"" syntax is not compatible with our MSRV

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, apologies - updated to use (the ugly) CStr::from_bytes_with_nul

@alex alex merged commit 2bcf319 into sfackler:master Aug 12, 2025
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