Repository navigation
Sign ECDSA without ASN and add an external-signer-only build - #95
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the NO_ASN and external-signer-only changes.
No open issues 🎉
What changed in this PR
This PR enables ECDSA signing without ASN support and adds an opt-in external-signer-only mode to wolfCOSE, supporting lean deployments while preserving default build behavior.
Changes:
- Use wolfCrypt’s raw
r || ssignatures directly inNO_ASNbuilds. - Add
WOLFCOSE_NO_LOCAL_SIGNto compile out local signing, require signer callbacks, and remove local RNG and deterministic-signing requirements. - Add known-answer and external-signer tests, build checks, CI configurations, and documentation.
| File | Description |
|---|---|
tests/test_no_local_sign.c |
Tests callback signing, verification, and rejection of local keys. |
tests/test_eat_psa.c |
Rejects external-signer-only builds for the local-signing suite. |
tests/test_cose.c |
Adds an ES256 known-answer test and adjusts configuration guards. |
tests/test_cose_examples.c |
Uses an ECC key import compatible with NO_ASN. |
src/wolfcose_sign1.c |
Compiles out local Sign1 signing and its RNG requirement. |
src/wolfcose_sign.c |
Compiles out local multi-signature signing and its RNG requirement. |
src/wolfcose_key.c |
Requires a callback for signing capability in external-only builds. |
src/wolfcose_internal.h |
Gates the local ECDSA helper and documents raw-signature support. |
src/wolfcose_ecc.c |
Handles raw NO_ASN signatures and gates local ECDSA signing. |
src/wolfcose_countersign.c |
Compiles out local countersigning and its RNG requirement. |
Makefile |
Adds external-only tests, symbol checks, and policy/C99 checks. |
include/wolfcose/settings.h |
Allows NO_ASN signing and validates external-only configuration. |
docs/Macros.md |
Documents both build options and their behavior. |
.gitignore |
Ignores the new external-only test executable. |
.github/workflows/lean-build.yml |
Adds NO_ASN and external-signer-only CI coverage. |
Review effort: Balanced
aidangarske
force-pushed
the
ecdsa-sign-no-asn
branch
from
November 16, 2026 19:02
1226f9e to
4706c80
Compare
dgarske
approved these changes
Nov 16, 2026
dgarske
left a comment
Member
There was a problem hiding this comment.
Tested 4706c80 locally; no issues found.
- wolfSSL v5.9.4 and current master, both NO_ASN: make test (including the ES256 known-answer vector), ext-sign-test and no-local-sign-test pass, and no object references wc_ecc_sig_to_rs or wc_ecc_rs_raw_to_sig.
- ESP256, ESP384 and ESP512 with deterministic k give byte-identical COSE_Sign1 output from NO_ASN and ASN builds, cross-verify both ways, and verify independently in Python.
- wolfCose_EccSignRaw with a coordinate size that does not match the key returns WOLFCOSE_E_CRYPTO on both wolfSSL versions and leaves the output untouched (ASan/UBSan clean).
- The default build, ASan/UBSan, c99-check, ecdsa-policy-test and the new Ed25519 external-signer cases pass.
Thanks for picking up the comment, docs and Ed25519 test.
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.
needed for wolfSSL/wolfTrust#85