Skip to content

Feature request: HMAC-based KBKDF counter mode (NIST SP 800-108r1 §4.1) #10588

Description

@MarkAtwood

wolfSSL provides wc_KDA_KDF_PRF_cmac for CMAC-based KBKDF (NIST SP 800-108) but has no HMAC variant. The HMAC counter-mode variant (SP 800-108r1 §4.1) is required for interoperability with TLS, SSH, and JOSE, which specify KBKDF-CTR-HMAC rather than KBKDF-CTR-CMAC.

Workaround in use: SP 800-108r1 §4.1 counter-mode KDF implemented directly using wolfSSL's WOLFSSL_HMAC_CTX primitives: per-iteration counter as a 32-bit big-endian prefix concatenated with the caller-supplied FixedInfo, hashed with HMAC-SHA2.

Requested fix: Add wc_KBKDF_ctr_hmac (or extend wc_KDA_KDF_PRF to accept a MAC type selector) matching the existing CMAC variant. The HMAC and CMAC variants share the same counter-mode loop structure; the only difference is the PRF.

Migrated from internal tracking (ZD-21737).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions