Wycheproof wave 6: ECDSA secp256k1, Ed448, AES-CMAC - #1925
Merged
Conversation
Base automatically changed from
compiler/warn-malloc-literal-struct-cast
to
main
September 6, 2026 12:22
Stacks on the malloc-lint branch. Extends the adversarial-vector program to three implemented primitives that had no Wycheproof coverage. All pass with no accepted forgeries. ECDSA secp256k1 (the Bitcoin/Ethereum curve), DER and P1363: - DER runs through the real parse path (tls13_cert.split_ecdsa_sig, coord 32) then secp256k1.ecdsa_verify — the same DER-malleability surface wave 3 hardened for P-256. - P1363 feeds raw r||s to the verifier for the r/s-range and modular edge cases. Ed448 signature verify: the decode/verify surface the ed25519 driver's tc151 forgery lived in (non-canonical point encodings, small-order/identity points, s out of range, wrong-length inputs), now covered for the larger curve. ed448.verify hashes internally, so the message is passed raw; wrong-length sigs are rejected without calling verify (which expects a 114-byte buffer). AES-CMAC (RFC 4493) tag verification: recompute over (key, msg), truncate to the group tagSize, compare. Forged/truncated tags reject; illegal key lengths (the 0/8/64/160/320-bit groups) are rejected without invoking cmac on an unsupported key. Full sweep — all 311 cases (63 valid tags matched, 248 rejected). Harness budgets: AES-CMAC is symmetric-fast (full sweep by default). ECDSA secp256k1 verify is bignum-heavy (~2s each) so its runner strides at 10 (~46s for both forms); Ed448 verify is ~4s each so it strides at 4, sharing a slot with CMAC (~49s together). WYCHEPROOF_FULL=1 sweeps all. New wp_*.ae are covered by the existing tests/integration/wycheproof/ prune-prefix. Vectors vendored byte-identical from C2SP/wycheproof at the pin already recorded for wave 5 (3fa63dd). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
paul-hammant
force-pushed
the
crypto/wycheproof-wave6
branch
from
September 6, 2026 12:25
ac6e911 to
6cc43d5
Compare
Collaborator
Author
|
Rebased onto current Re-verified on the rebased base: drivers build and pass ( |
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.
Stacked on #1924 (
compiler/warn-malloc-literal-struct-cast) — review/mergethat first; this branch's diff is only the wave-6 files.
Extends the Wycheproof adversarial-vector program to three implemented
primitives that had no coverage. All pass with no accepted forgeries.
ECDSA secp256k1 (DER + P1363)
The Bitcoin/Ethereum curve. DER runs through the real parse path
(
tls13_cert.split_ecdsa_sig, coord 32) thensecp256k1.ecdsa_verify— thesame DER-malleability surface wave 3 hardened for P-256; P1363 feeds raw r‖s to
the verifier for r/s-range and modular edge cases.
Ed448 signature verify
The decode/verify surface the ed25519 driver's tc151 forgery lived in
(non-canonical point encodings, small-order/identity points, s out of range,
wrong-length inputs), now covered for the larger curve.
ed448.verifyhashesinternally, so the message is passed raw.
AES-CMAC (RFC 4493)
Tag verification: recompute over (key, msg), truncate to the group tagSize,
compare. Forged/truncated tags reject; illegal key lengths (the 0/8/64/160/320-bit
groups) are rejected without invoking cmac on an unsupported key. Full sweep —
all 311 cases (63 valid matched, 248 rejected).
Harness budgets
test_wycheproof_ecdsa_secp256k1.sh): bignum-heavy (~2s/verify),stride 10, ~46s for both forms.
test_wycheproof_ed448_cmac.sh),stride 4, ~49s together.
WYCHEPROOF_FULL=1sweeps all. Newwp_*.aeare covered by the existingtests/integration/wycheproof/prune-prefix.Vectors vendored byte-identical from C2SP/wycheproof at the pin already recorded
for wave 5 (
3fa63dd).🤖 Generated with Claude Code