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

Argon2i #113

Merged
merged 57 commits into from
Feb 6, 2020
Merged

Argon2i #113

merged 57 commits into from
Feb 6, 2020

Conversation

brycx
Copy link
Member

@brycx brycx commented Jan 4, 2020

Closes #109.

TODO:

  • Argon2i single-threaded in hazardous. How should the allocations for the memory blocks be handled?
  • Switch to Argon2i in high-level orion::pwhash and orion::kdf. What parameters should be used as default for each of those high-level APIs?
  • Fuzzers in orion-fuzz.
  • Generated test vectors.

Edit: I haven't been able to get a solution working, that doesn't require heap allocation. Thus, the Argon2i implementation will not be available with no_std.

@brycx brycx added new feature New feature or request breaking change A breaking change labels Jan 4, 2020
@codecov
Copy link

codecov bot commented Jan 24, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@8396b16). Click here to learn what that means.
The diff coverage is 99.08%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #113   +/-   ##
=========================================
  Coverage          ?   97.66%           
=========================================
  Files             ?       55           
  Lines             ?     7715           
  Branches          ?        0           
=========================================
  Hits              ?     7535           
  Misses            ?      180           
  Partials          ?        0
Impacted Files Coverage Δ
tests/kdf/other_argon2i.rs 100% <ø> (ø)
src/errors.rs 94.23% <ø> (ø)
tests/aead/wycheproof_aead.rs 95.83% <100%> (ø)
tests/kdf/ref_argon2i.rs 100% <100%> (ø)
src/hazardous/kdf/argon2i.rs 99.19% <100%> (ø)
src/typedefs.rs 96.18% <100%> (ø)
tests/mac/mod.rs 100% <100%> (ø)
tests/kdf/custom_hkdf.rs 100% <100%> (ø)
src/kdf.rs 100% <100%> (ø)
src/pwhash.rs 96.08% <100%> (ø)
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8396b16...1b4fab0. Read the comment docs.

…est vectors to hit these branches: n. 13 where we don't enter while loop and n. 14 where we do (with out lengths of 94 and 97, respectively)
@brycx brycx changed the title WIP: Argon2i Argon2i Feb 1, 2020
@@ -750,7 +750,7 @@ macro_rules! construct_secret_key_variable_size {
/// # }
/// ```
pub struct $name {
value: Vec<u8>,
pub(crate) value: Vec<u8>,
Copy link
Member Author

Choose a reason for hiding this comment

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

This is set to pub(crate) so we avoid allocation two different Vec<u8>s in orion::kdf which hold sensitive data.

@brycx brycx merged commit a2c20b4 into master Feb 6, 2020
@brycx brycx deleted the argon branch February 6, 2020 14:33
@cbeck88 cbeck88 mentioned this pull request Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change A breaking change new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for new password hashing algorithm
1 participant