Skip to content

Feature Request: XMSS and LMS (Stateful HBS) Support #8

@aidangarske

Description

@aidangarske

Goal
Implement XMSS and HSS/LMS as defined in RFC 8778 to provide wolfCOSE with a competitive advantage. These stateful hash-based signatures are the only PQC schemes currently approved for use in CNSA 2.0 (Commercial National Security Algorithm) for firmware and software signing.

Proposed Implementation

  • Define HSS/LMS (-46) and XMSS algorithm identifiers in wolfcose/cose_types.h.
  • Integrate with wolfCrypt’s HSS/LMS and XMSS modules (requires WOLFSSL_HSS_LMS / WOLFSSL_XMSS).
  • Implement state management callbacks to ensure the private key "index" is safely updated and persisted.
  • Expose public API: wc_CoseKey_SetLMS() and wc_CoseKey_SetXMSS().
  • Add unit tests using RFC 8778 test vectors.
  • Update tools/wolfcose_tool.c to support stateful signing operations.

Optimization Target

  • Use pre-hash mode where possible to minimize data passed through the COSE layer.
  • Ensure the state-tracking logic is decoupled so users can implement their own non-volatile memory (NVM) storage.

References

Link to RFC: RFC 8778 - HSS/LMS in COSE

Competitor status: Not supported by t_cose or libcose.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureFeature additionwant to addFeature that you want to add or want added

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions