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

KDF in Counter Mode and One-Step KDF API #482

Merged
merged 4 commits into from
Aug 16, 2024
Merged

Conversation

skmcgrail
Copy link
Member

Description of changes:

Adds support for KDF in Counter Mode and One-Step Key Derivation functions from NIST SP 800-108 and NIST SP 800-56c respectively.

Currently the APIs are under crate::unstable::kdf due to not being able to support this with the fips feature at this time.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@codecov-commenter
Copy link

codecov-commenter commented Aug 5, 2024

Codecov Report

Attention: Patch coverage is 87.98883% with 43 lines in your changes missing coverage. Please review.

Project coverage is 92.58%. Comparing base (c358484) to head (93d8411).
Report is 54 commits behind head on main.

Files Patch % Lines
aws-lc-rs/src/unstable/kdf/sskdf.rs 82.97% 24 Missing ⚠️
aws-lc-rs/src/unstable/kdf/kbkdf.rs 83.82% 11 Missing ⚠️
aws-lc-rs/src/agreement/ephemeral.rs 76.47% 5 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #482      +/-   ##
==========================================
- Coverage   95.80%   92.58%   -3.22%     
==========================================
  Files          61       66       +5     
  Lines        8143     8812     +669     
  Branches        0     8812    +8812     
==========================================
+ Hits         7801     8159     +358     
- Misses        342      396      +54     
- Partials        0      257     +257     

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

aws-lc-rs/src/unstable/kdf/sskdf.rs Outdated Show resolved Hide resolved
aws-lc-rs/src/unstable.rs Outdated Show resolved Hide resolved
aws-lc-rs/src/unstable/kdf/kbkdf.rs Outdated Show resolved Hide resolved
aws-lc-rs/src/unstable/kdf/sskdf.rs Outdated Show resolved Hide resolved
aws-lc-rs/src/unstable/kdf/sskdf.rs Outdated Show resolved Hide resolved
aws-lc-rs/src/unstable/kdf/sskdf.rs Outdated Show resolved Hide resolved
aws-lc-rs/src/unstable/kdf/sskdf.rs Outdated Show resolved Hide resolved
justsmth
justsmth previously approved these changes Aug 15, 2024
@samuel40791765 samuel40791765 self-requested a review August 15, 2024 19:57
aws-lc-rs/tests/data/kbkdf_counter.txt Show resolved Hide resolved
aws-lc-rs/src/agreement/ephemeral.rs Show resolved Hide resolved
};
}

assert_get_unsupported_algorithm!(
Copy link
Contributor

Choose a reason for hiding this comment

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

Very minor nit, is there a better way to iterate over these with something like a macro?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, it is possible to have a variadic macro, but given the subtle differences between each of the macro invocations below, a variadic mecro for this would likely be much less pleasant.

@justsmth justsmth merged commit bc9f59a into aws:main Aug 16, 2024
188 of 196 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.

4 participants