Skip to content

one-step-kdf: add support for HMAC auxiliary functions - #211

Open
GianIac wants to merge 5 commits into
RustCrypto:masterfrom
GianIac:master
Open

one-step-kdf: add support for HMAC auxiliary functions#211
GianIac wants to merge 5 commits into
RustCrypto:masterfrom
GianIac:master

Conversation

@GianIac

@GianIac GianIac commented Jul 21, 2026

Copy link
Copy Markdown

Hi! I added a generic initialized auxiliary-function API to one-step-kdf.

This enables the HMAC-based One-Step KDF defined by NIST SP 800-56C Rev. 2 while preserving the existing digest-based API.

I made these changes for personal use, but they might come in handy.

Also included:

  • correct handling of the maximum 32-bit counter value;
  • hash- and HMAC-based usage examples;
  • multi-block HMAC coverage;
  • NIST ACVP SP 800-56C Rev. 2 test group 16, test case 76.

I tried to keep it as clean as possible.
Thanks !!

GianIac added 5 commits July 21, 2026 15:01
refactor: simplify key derivation logic and improve error handling
test: enhance HMAC tests for better coverage and readability
Add a generic initialized auxiliary-function API while preserving the existing digest wrapper. Cover HMAC with a NIST ACVP SP 800-56C Rev. 2 vector and document hash- and HMAC-based usage.
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.

1 participant