Default to RFC 9864 algorithm IDs and gate deprecated RFC 9053 IDs - #85
Merged
mattia-moffa merged 8 commits intoSep 15, 2026
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved CLI dispatch issues affect deprecated EdDSA key generation and algorithm-filter self-tests.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This PR adopts RFC 9864 signature IDs by default and gates legacy RFC 9053 IDs behind an opt-in macro.
Changes:
- Adds curve-bound algorithm validation and shared countersignature dispatch.
- Updates CLI behavior, tests, examples, documentation, and interop builds.
- Expands CI coverage for default, deprecated-ID, and Ed448-only configurations.
File summaries
| File | Reviewed change |
|---|---|
tools/wolfcose_tool.c |
CLI parsing, key generation, signing, and self-tests; deprecated EdDSA dispatch issues remain. |
tests/test_psa_attestation.c |
Gates legacy PSA vectors. |
tests/test_interop.c |
Updates interop algorithms and legacy vector handling. |
tests/test_cose_examples.c |
Gates deprecated algorithm examples. |
src/wolfcose_sign1.c |
Adds Sign1 algorithm and curve validation. |
src/wolfcose_sign.c |
Applies validation to multi-signer operations. |
src/wolfcose_internal.h |
Declares shared algorithm predicates. |
src/wolfcose_countersign.c |
Updates countersignature algorithm dispatch. |
src/wolfcose_alg.c |
Centralizes algorithm and curve mappings. |
scripts/cmdline-test.sh |
Updates CLI algorithm coverage. |
scripts/check_coverage.sh |
Reuses coverage checks across configurations. |
README.md |
Documents RFC 9864 defaults. |
Makefile |
Adds deprecated-ID interop builds. |
include/wolfcose/wolfcose.h |
Adds algorithm constants; deprecation wording needs narrowing. |
include/wolfcose/settings.h |
Adds deprecated-algorithm feature gates. |
IDE/STM32Cube/wolfcose_test.c |
Updates embedded test algorithms. |
examples/sign1_verify_lean.c |
Migrates verification example algorithms. |
examples/sign1_demo.c |
Migrates Sign1 demonstration algorithms. |
examples/scenarios/sensor_attestation.c |
Updates attestation algorithm usage. |
examples/scenarios/multi_party_approval.c |
Uses fully specified algorithm IDs. |
examples/scenarios/firmware_update.c |
Updates firmware signing fallback. |
examples/lifecycle_demo.c |
Updates lifecycle algorithm names. |
examples/ext_sign_demo.c |
Updates delegated signing algorithms. |
examples/comprehensive/sign_all.c |
Migrates signing examples. |
examples/comprehensive/errors_all.c |
Updates algorithm error examples. |
docs/Testing.md |
Documents deprecated-mode testing. |
docs/STM32Cube.md |
Updates STM32 guidance. |
docs/Project-Structure.md |
Updates project algorithm references. |
docs/MISRA-Compliance.md |
Updates configuration references. |
docs/Message-Types.md |
Updates message algorithm references. |
docs/Macros.md |
Documents deprecated-algorithm gating. |
docs/Home.md |
Updates project documentation. |
docs/Getting-Started.md |
Updates build and algorithm examples. |
docs/API-Reference.md |
Updates algorithm API requirements. |
docs/Algorithms.md |
Updates supported algorithms; deprecation wording needs narrowing. |
.github/workflows/misra-2023.yml |
Adds deprecated-ID checks. |
.github/workflows/misra-2012.yml |
Adds deprecated-ID checks. |
.github/workflows/minimal-build.yml |
Adds configuration matrix coverage. |
.github/workflows/lean-build.yml |
Adds deprecated and Ed448-only builds. |
.github/workflows/coverage.yml |
Adds default and deprecated-ID coverage. |
.github/workflows/cmdline-test.yml |
Tests updated CLI algorithms. |
.github/workflows/build-test.yml |
Updates build and test workflow coverage. |
Review details
Suppressed comments (3)
docs/Algorithms.md:137
- [Low, CWE-436] The deprecation note at this point also visually scopes over the following PS256/PS384/PS512 entries, although RSA-PSS remains enabled without the deprecated-algorithm macro. Restrict the note to the four ES*/EdDSA constants so this documentation matches the implementation.
/* Deprecated by RFC 9864, opt-in with WOLFCOSE_ENABLE_DEPRECATED_ALGS */
include/wolfcose/wolfcose.h:194
- [Low, CWE-436] This deprecation comment is immediately followed by the still-supported PS256/PS384/PS512 constants, so it currently reads as if those RSA-PSS algorithms also require
WOLFCOSE_ENABLE_DEPRECATED_ALGS; the implementation does not gate them. Limit the comment explicitly to the four ES*/EdDSA IDs so the public API does not misstate which algorithms are deprecated.
tools/wolfcose_tool.c:1826 - Medium — the deprecated
EdDSAself-test is missing in Ed448-only builds. The new alias is attached only to theWOLFCOSE_HAVE_EDDSAblock. When onlyWOLFCOSE_HAVE_ED448and the deprecated-ID flag are enabled,test -a EdDSAmatches neither block, reports no matching algorithm, and never exercises the Ed448 route. Add the alias to the Ed448 block only when Ed25519 is not compiled, avoiding a duplicate test when both curves are available.
- Files reviewed: 42/43 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
aidangarske
force-pushed
the
rfc9864-fully-specified-algs
branch
from
September 15, 2026 02:38
4682e91 to
21fa8e8
Compare
aidangarske
marked this pull request as ready for review
September 15, 2026 16:05
aidangarske
force-pushed
the
rfc9864-fully-specified-algs
branch
from
September 15, 2026 20:22
8e1581c to
7e7193a
Compare
aidangarske
force-pushed
the
rfc9864-fully-specified-algs
branch
from
September 15, 2026 20:29
7e7193a to
3b13061
Compare
mattia-moffa
approved these changes
Sep 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sign, verify, countersign, examples, tools, docs, and CI.
defined; enabling it accepts them on sign and verify.
WOLFCOSE_E_COSE_BAD_ALG (covered by new sign/verify/countersign regression tests).
fixed RFC 9338/COSE-WG/RFC 9783 ES256 conformance vectors compile only under WOLFCOSE_ENABLE_DEPRECATED_ALGS.
builds), and accepts the ES256/EdDSA names only with the deprecated flag.
targets build a separate library with that flag.
lean-verify, tool-test, and the zero-allocation check.