Skip to content

wolfCOSE 2.0.0

Latest

Choose a tag to compare

@aidangarske aidangarske released this 17 Sep 22:54
f907071

Summary

wolfCOSE 2.0.0 is a feature and maintenance release centered on standardized COSE capabilities, external signing, embedded integration, and security hardening. Highlights include RFC 8778 HSS/LMS signatures, RFC 9338 countersignatures, RFC 9783 PSA/EAT attestation, RFC 9864 fully-specified signature algorithms, experimental COSE-HPKE, delegated HSM signing, expanded COSE_Key and CBOR APIs, STM32Cube integration, broader interoperability testing, and reproducible release qualification.

No CVEs were assigned for this release.

Detail

  • Standardized signing and COSE message support
    • Added RFC 8778 HSS/LMS signing, verification, COSE_Key support, delegated signing, and lean sign/verify profiles for COSE_Sign1 and multi-signer COSE_Sign. Signing state remains owned and persisted by the caller. (PR #72)
    • Added RFC 9338 full and abbreviated countersignatures across all six tagged COSE message types, with in-place creation, independent verification, CLI support, and RFC interoperability vectors. (PR #74)
    • Added RFC 9864 ESP256, ESP384, ESP512, Ed25519, and Ed448 fully-specified signature identifiers as the defaults. Deprecated RFC 9053 identifiers remain available through WOLFCOSE_ENABLE_DEPRECATED_ALGS. (PR #85)
  • PSA/EAT attestation and external signing
    • Added RFC 9783 PSA/EAT token issuance and verification with Sign1 and Mac0 envelopes, UEID-selected key resolution, software-component iteration, delegated signing, and current and legacy profile handling. PSA/EAT is disabled by default and selected through explicit profile and envelope compile-time gates. (PR #75)
    • Added delegated signing for COSE_Sign1 and multi-signer COSE_Sign. WOLFCOSE_ENABLE_EXT_SIGN lets an HSM, secure element, PSA Crypto service, or remote KMS sign without exposing the private key to wolfCOSE. (PR #59)
  • Public API additions
    • Added wc_CoseSign1_Sign_ex() for tagged or untagged output and wc_CoseSign1_SignSize_ex() for exact sizing without signing, consuming an RNG, or advancing an external signer. (PR #65)
    • Expanded COSE_Key with public-only encoding, exact encoded-size queries, raw ECC coordinate encoding, and metadata inspection before key import. Added CBOR context initializers, int-or-text label decoding, and zero-copy skipped-item capture. (PR #66)
  • Experimental COSE-HPKE
    • Added a two-step compile-time gate requiring both the feature's operation gate and WOLFCOSE_EXPERIMENTAL before draft protocol behavior can be enabled. (PR #68)
    • Added experimental draft-ietf-cose-hpke-26 support for HPKE-0 with COSE_Encrypt0 and HPKE-0-KE with multi-recipient COSE_Encrypt, including CLI commands and automated tests. It remains disabled by default. (PR #70)
  • Embedded integration
    • Added the I-CUBE-wolfCOSE STM32Cube pack, STM32CubeMX and STM32CubeIDE integration documentation, and an on-device test. (PR #61)
  • Security and correctness hardening
    • Rejected COSE_Key decoding into an attached wolfCrypt key object of a different type before import. Thanks to Omoikane Labs for the report. (PR #64)
    • Hardened CBOR and COSE parsing, cryptographic dispatch, length handling, strict serialization, key encoding and decoding, and cleanup paths. Added optional RFC 6979 deterministic ECDSA through WOLFCOSE_ENABLE_DETERMINISTIC_ECDSA. (PR #67)
    • Rejected invalid protected and skipped recipient structures, including nested Direct recipients and conflicting recipient metadata. (PR #77)
    • Tightened COSE_Key metadata validation, public/private material checks, constant-time ML-DSA public-key comparison, and attached-key type and curve validation across signing, verification, and ECDH operations. (PR #78, PR #80)
    • Hardened detached-input checks, critical-header handling, ECDSA signing prerequisites, protected-header pointers, AES cleanup, CBOR state tracking, public API contracts, and recipient depth accounting. (PR #81, PR #82)
    • Hardened RSA COSE_Key import and export by validating component presence and widths, bounding output by RSA capacity, fully initializing modulus buffers, and requiring hardened private-key import behavior. (PR #83)
    • Guarded COSE header-label conversion against values outside the supported signed range. (PR #86)
  • Build, portability, and internal organization
    • Tightened internal integer and size types for MISRA C analysis and stabilized the test suite under static analysis. (PR #62, PR #79)
    • Added pkg-config discovery while retaining explicit wolfSSL include and library overrides. (PR #69)
    • Split the former monolithic implementation into per-area source modules for smaller selective builds and easier analysis. (PR #73)
  • Interoperability, performance, and documentation
    • Expanded interoperability coverage against OpenSSL-backed t_cose/QCBOR, go-cose, python-cwt, Rust coset, COSE Working Group examples, and RFC vectors. (PR #71)
    • Refreshed the README and documentation, including migration, build, performance, and footprint guidance. (PR #87, PR #88)
  • Release qualification and metadata
    • Added release-only qualification for advanced feature scenarios, C++ compilation, Valgrind, merged coverage profiles, metadata validation, required-CI aggregation, and reproducible smoke-tested source archives. (PR #89)
    • Bumped the public version macros to 2.0.0 and published the complete release notes. (PR #76)

Compatibility

  • WOLFCOSE_KEY gained delegated-signing and internal key-type tracking fields. Applications must be recompiled against the 2.0.0 headers. Applications that initialize keys with wc_CoseKey_Init() and attach them through the wc_CoseKey_Set*() APIs do not need source changes.
  • Default builds use the RFC 9864 fully-specified signature IDs. Existing messages using ES256, ES384, ES512, or EdDSA require WOLFCOSE_ENABLE_DEPRECATED_ALGS. RFC 9783 PSA/EAT Sign1 profiles also require that compatibility gate because the standard specifies the legacy ECDSA identifiers. The protected algorithm identifier is covered by the signature, so changing it requires re-signing the message. See Migrating from RFC 9053 Signature IDs.
  • COSE-HPKE remains experimental. Its API and wire format may change until the IETF specification is finalized.

Validation and requirements

The merged release commit passed the complete CI matrix and release qualification, including advanced scenarios, C and C++ compilation, Valgrind, merged coverage, reproducible archive checks, archive smoke tests, static analysis, MISRA C:2012/C:2023 checks, ASan/UBSan, compiler and configuration matrices, and interoperability suites.

wolfCOSE requires wolfSSL 5.8.0 or later as its crypto backend. AES Key Wrap and private RSA COSE_Key decoding require wolfSSL 5.9.0 or later. ML-DSA, HSS/LMS, and private RSA COSE_Key serialization require wolfSSL 5.9.2 or later.

Source: https://github.com/wolfSSL/wolfCOSE

Documentation: https://github.com/wolfSSL/wolfCOSE#readme and https://github.com/wolfSSL/wolfCOSE/wiki

Full change log: https://github.com/wolfSSL/wolfCOSE/blob/v2.0.0/ChangeLog.md

Official wolfCOSE downloads are distributed through the wolfSSL download page.