Test Coverage Matrix

July 7, 2026 · View on GitHub

UltrafastSecp256k1 current repository state -- Comprehensive Test Map for Auditors

The owner-grade audit bundle and ci/validate_assurance.py are the authoritative source for live target counts. When a narrative summary below lags behind the generated validation surfaces, prefer the generated counts.


Summary

CategoryTestsStatus
CTest targets261 active targets[OK] Documented in current assurance validation
Audit suite checks641,194+[OK] 0 failures
Exploit PoC test files197 tests, 20+ categories[OK] 0 failures
Fuzz harnesses11[OK] Active (5 cpu/fuzz + 6 audit/; libfuzzer_unified CI-blocking)
ECIES regression85[OK] All passing
Adversarial protocol114 functions, 360+ checks[OK] Active
Side-channel (dudect)1[OK] Active
Benchmark suites4+[OK] Active
Platform-specific5+[OK] Per-platform

Test File Index

Audit Suites (tests/)

FileChecksFocus Area
audit_field.cpp264,484Field arithmetic: identity, commutativity, associativity, distributivity, inverse, boundary, Fermat, special values
audit_scalar.cpp93,847Scalar arithmetic: ring properties, overflow, negate, inverse, boundary-near-order
audit_point.cpp116,312Point operations: on-curve, group law, add, dbl, scalar_mul, compress/decompress, infinity
audit_ct.cpp120,128CT layer: FAST-vs-CT equivalence, complete formulas, no-branch verification
audit_fuzz.cpp15,423Fuzz-derived: random inputs through all operation paths
audit_perf.cpp--Performance benchmarks (throughput, latency)
audit_security.cpp17,856Security: nonce uniqueness, invalid input rejection, edge-case handling
audit_integration.cpp13,144End-to-end: sign->verify, derive->use, full protocol flows
test_ct_sidechannel.cpp--dudect timing: Welch t-test for side-channel leakage
differential_test.cpp--Cross-implementation comparison
test_ecies_regression.cpp85ECIES hardening: parity tamper, invalid prefix, truncated envelope, tamper matrix, KAT, ABI prefix rejection, pubkey parser consistency, RNG fail-closed
test_adversarial_protocol.cpp114 functions, 360+ checksAdversarial protocol: MuSig2 (nonce reuse/replay, rogue-key, transcript mutation, signer ordering, malicious aggregator), FROST (below-threshold, malformed commitment, malicious coordinator, duplicate nonce), Silent Payments, ECDSA adaptor (round-trip, transcript mismatch, extraction misuse), Schnorr adaptor, DLEQ (malformed proof, wrong generators), BIP-32, FFI hostile-caller (null args, undersized buffers, overlapping buffers, malformed counts), New ABI edge cases H.1-H.12 (ctx_size, AEAD, ECIES, EllSwift, ETH address, Pedersen switch, Schnorr adaptor extract, batch sign, BIP-143, BIP-144, SegWit, Taproot sighash), Remaining ABI surface I.1-I.5 (ctx_clone, last_error_msg, pubkey_parse, pubkey_create_uncompressed, ecdsa_sign_recoverable, ecdsa_recover, ecdsa_sign_verified, schnorr_sign_verified, batch verify deep)
test_fuzz_parsers.cpp10K/suiteParser fuzz: DER, Schnorr sig, compressed/uncompressed pubkey round-trip
test_fuzz_address_bip32_ffi.cpp10K/suiteAddress/BIP-32/FFI fuzz: P2PKH/P2WPKH/P2TR/WIF, BIP-32 paths, BIP-39, coin derivation, FFI boundaries
bench_ct_vs_libsecp.cpp--Performance comparison with libsecp256k1
bench_field_ops.cpp--Field operation microbenchmarks
test_abi_gate.cpp--ABI compatibility gate: version checks, symbol presence, struct sizes
test_batch_randomness.cpp--Batch randomness: nonce independence, distribution, uniqueness
test_carry_propagation.cpp--Carry propagation: field arithmetic edge cases across limb boundaries
test_u128_compat_parity.cpp--Portable u128_compat struct parity vs native __int128 (FE52 op patterns; 240,000 iterations)
test_cross_libsecp256k1.cpp--Cross-implementation: differential test against bitcoin-core/secp256k1
test_cross_platform_kat.cpp--Cross-platform known-answer tests: deterministic outputs across architectures
test_debug_invariants.cpp--Debug invariants: internal consistency checks under debug mode
test_fiat_crypto_linkage.cpp--Independent reference linkage: field arithmetic cross-check against schoolbook oracle
test_frost_kat.cpp--FROST t-of-n threshold signing known-answer tests
test_wycheproof_ecdsa.cpp--Wycheproof ECDSA: Google Project Wycheproof test vectors
test_wycheproof_ecdh.cpp--Wycheproof ECDH: Google Project Wycheproof test vectors
unified_audit_runner.cpp436 modules (166 non-exploit + 270 exploit PoCs)Unified audit: all current modules in single binary (includes GPU null-guard paths)

CPU Unit Tests (src/cpu/tests/)

FileFocus AreaStatus
test_comprehensive.cpp25+ categories: field, scalar, point, ECDSA, Schnorr, GLV, SHA, batch, etc.[OK]
test_arithmetic_correctness.cppArithmetic correctness: field/scalar edge cases[OK]
test_ct.cppCT layer correctness (FAST vs CT equivalence)[OK]
test_ecdsa_schnorr.cppECDSA (RFC 6979) + Schnorr (BIP-340) vectors[OK]
test_ecdh_recovery_taproot.cppECDH, key recovery, Taproot[OK]
test_bip32.cppBIP-32 HD key derivation[OK]
test_bip39.cppBIP-39 mnemonic: PBKDF2, wordlist, entropy, validation, seed derivation (57 tests)[OK]
test_coins.cpp28-coin address dispatch + P2SH/P2SH-P2WPKH/CashAddr[OK]
test_wallet.cppWallet API: key management, signing, address formats, recovery[OK]
test_ethereum.cppEthereum signing: EIP-155, EIP-191, ecrecover, personal_sign[OK]
test_musig2.cppMuSig2 protocol tests[OK]
test_batch_add_affine.cppBatch affine addition[OK]
test_cache_dir_api.cppCache directory API + no-config.ini regression (set_cache_directory / ufsecp_set_cache_dir)[OK]
test_multiscalar_batch.cppMulti-scalar multiplication[OK]
test_simd_batch.cppSIMD batch operations[OK]
test_mul.cppMultiplication correctness[OK]
test_large_scalar_multiplication.cppLarge scalar multiplication[OK]
test_field_52.cpp52-bit limb representation[OK]
test_field_26.cpp26-bit limb representation[OK]
test_zk.cppZK proofs: knowledge, DLEQ, Bulletproof, batch (24 tests)[OK]
test_hash_accel.cppSHA-256 acceleration tests[OK]
test_exhaustive.cppExhaustive tests (small curves)[OK]
test_v4_features.cppv4 feature tests[OK]
run_selftest.cppSelftest runner (smoke/ci/stress)[OK]
test_ecc_properties.cppECC algebraic properties: associativity, commutativity, distributivity[OK]
test_edge_cases.cppEdge cases: scalar zero, infinity arithmetic, BIP-32 IL>=n, cache corruption[OK]
test_point_edge_cases.cppPoint edge cases: infinity, Z=0 guards, roundtrip encoding[OK]

Fuzz Harnesses (src/cpu/fuzz/)

FileOperations FuzzedInput
fuzz_field.cppadd/sub round-trip, mul identity, square, inverse32-byte field element
fuzz_scalar.cppadd/sub, mul identity, distributive law32-byte scalar
fuzz_point.cppon-curve check, negate, compress round-trip, dbl vs add32-byte x-coordinate seed

GPU Tests

FileBackendFocus
opencl/tests/test_opencl.cppOpenCLKernel correctness
opencl/tests/opencl_extended_test.cppOpenCLExtended operations
opencl/src/opencl_audit_runner.cppOpenCLUnified GPU audit ( 436 modules, 8 sections)
metal/tests/test_metal_host.cppMetalMetal shader correctness
metal/src/metal_audit_runner.mmMetalsecp256k1_metal_audit: unified GPU audit ( 436 modules, 8 sections)
src/cuda/src/test_ct_smoke.cuCUDACT smoke tests incl. ZK knowledge + DLEQ prove/verify (9 tests)
src/cuda/src/gpu_ct_leakage_probe.cuCUDAFixed-vs-random device-cycle Welch t-test for CT generator/signing kernels with JSON evidence output
src/cuda/src/test_suite.cuCUDAcuda_selftest: kernel correctness, field + scalar + point ops
src/cuda/src/gpu_audit_runner.cuCUDAgpu_audit: unified GPU audit ( 436 modules, 8 sections)
metal/app/metal_test.mmMetalsecp256k1_metal_test: shader correctness, compute pipeline
metal/app/bench_metal.mmMetalsecp256k1_metal_bench_full: comprehensive Metal benchmark
compat/libsecp256k1_shim/tests/shim_test.cppCPUsecp256k1_shim_test: libsecp256k1 API compatibility shim
compat/libsecp256k1_shim/tests/test_shim_batch_mt.cppCPUshim_batch_mt: multi-threaded + per-row batch verify — secp256k1_ecdsa/schnorrsig_verify_batch_mt/_results MT==single across thread counts {0,1,2,8,64}, per-row results pinpoint injected-invalid rows, n==0/small-n parity, max_threads=1
compat/libsecp256k1_shim/tests/test_shim_batch_cancel.cppCPUshim_batch_cancel: external ufsecp_cancel_token on every shim batch-verify function — NULL/default-arg parity, non-tripping chunked verdict correctness, immediate + mid-batch cancel → 0 (callback polled across chunk boundary), throwing callback fail-closed, _results unreached rows pre-zeroed, n==0 vacuous with token
compat/libsecp256k1_bchn_shim/tests/test_bchn_schnorr_fail_clear.cppCPUbchn_schnorr_fail_clear: BCHN Schnorr compatibility shim regression proving invalid signing failures clear sig64
compat/libbitcoin_bridge/tests/test_lbtc_bridge.cppCPUlbtc_bridge: libbitcoin batch script-sig verify (ECDSA/Schnorr) + opaque-key correlation, CPU reference path; multi-threaded _mt twins — per-row verdict parity across thread counts {0,1,2,8}, large batch across the 4096 engine chunk, invalid_idx/count, cancellation under _mt, degenerate inputs
compat/libbitcoin_bridge/tests/test_lbtc_consensus_diff.cppGPU (local-only)lbtc_consensus_diff: GPU-vs-CPU consensus differential — every script-sig verdict must match bit-for-bit (ECDSA/Schnorr, mixed corpus). SKIP_RETURN_CODE 77 (no GPU); runs in gpu-selfhosted.yml only
compat/libbitcoin_bridge/tests/test_lbtc_collect.cppCPUlbtc_collect: in-place collect verify (verdict written into each row's key cell); + lbtc_collect_smallchunk recompiles the bridge with a tiny kChunk to straddle chunk boundaries
compat/libbitcoin_bridge/tests/test_lbtc_multisig_threshold.cppCPUlbtc_multisig_threshold: 4-table batch model (multisig/threshold m-of-n) verify+collect via the ECDSA/Schnorr cores with a 6-byte tail; tail-width independence + typed-span overloads
compat/libbitcoin_bridge/tests/test_lbtc_commitment.cppCPU (+GPU RLC)lbtc_commitment: BIP-341 Taproot commitment batch (verify_commitment per-row + commitment_batch_ok GPU RLC fast-check); cross-checked bit-for-bit vs the shim tweak_add_check
audit/test_gpu_abi_gate.cppGPU (all)gpu_abi_gate: GPU C ABI surface test -- discovery, lifecycle, NULL safety, error strings, generator_mul equivalence
audit/test_gpu_ops_equivalence.cppGPU (all)gpu_ops_equivalence: GPU vs CPU reference for all 6 first-wave ops (skips UNSUPPORTED)
audit/test_gpu_host_api_negative.cppGPU (all)gpu_host_api_negative: NULL ptrs, count=0 no-ops, invalid backend/device, error strings
audit/test_gpu_backend_matrix.cppGPU (all)gpu_backend_matrix: backend enumeration, device info sanity, per-backend op probing
audit/test_gpu_collect_verify_parity.cppGPU (all)gpu_collect_verify_parity: NULL ctx contract for ecdsa_verify_collect/schnorr_verify_collect; input validation (count=0, oversize > max, NULL buffer); ECDSA and Schnorr per-row parity vs *_verify_batch (all-valid + tampered corpus)

Additional CTest Targets

These standalone CTest entries are part of the active validation surface and are tracked explicitly here so the documented matrix matches the real runner surface.

CTest targetScopeNotes
audit_invariantsCPU auditAlgebraic and serialization invariant checks across core arithmetic and point paths
audit_secure_eraseSecurity auditVerifies zeroization / secure erase behavior remains wired and callable
bip141_143_144Bitcoin protocolSegWit serialization and BIP-141/BIP-143/BIP-144 correctness coverage
bip342Bitcoin protocolTaproot / Tapscript BIP-342 correctness coverage
c_abi_negativeC ABI hostile-callerNegative-path checks for invalid inputs, malformed pointers, and fail-closed behavior
c_abi_thread_stressC ABI concurrencyThreaded stress coverage for public ABI entry points
gpu_ct_leakage_probeGPUCUDA advisory side-channel probe using fixed-vs-random clock64() Welch t-test on CT generator and signing kernels
lbtc_direct_verifyCPU (+GPU when secp256k1_gpu_host linked)Header-only ufsecp::lbtc::* direct surface: ECDSA/Schnorr single+batch+columns fail-closed plus the seven public-data batch ops — xonly_validate_batch, pubkey_validate_batch, taproot_commitment_verify_batch, tagged_hash_batch (+ tag-string overload), tagged_hash_var_batch, hash256_batch, hash256_var_batch. Per op: all-valid success + serial/engine-parity cross-check, plus hostile-caller cases — malformed/off-curve rows, wrong tweaked-x / parity byte, unliftable internal key, null pointers, count==0 vacuous, count×elem size-overflow, RAW-tweak distinctness (not H_TapTweak), HASH rows never all-zero (not pre-zeroed), tagged-hash-var no-256-byte-cap, hash256-var row-length bounds. No new CTest target (extends the existing lbtc_direct_verify entry).
bench_lbtc_public_opsBenchmarkDirect C++ libbitcoin benchmark covering all public-data batch ops: x-only validate, compressed pubkey validate, raw Taproot commitment verify, tagged hash fixed + tag overload + var, HASH256 fixed + var. Reports forced CPU and production direct rows; no C ABI, shim, or bridge.
bench_lbtc_hash256_varBenchmarkDirect C++ libbitcoin variable-length Bitcoin HASH256 throughput harness. Reports serial reference, forced direct CPU fallback, and production direct path; JSON records whether the self-installed GPU hook was present/accepted. No C ABI, shim, or bridge.
example_lbtc_public_opsExampleMinimal runnable direct C++ example calling every public-data batch op through <ufsecp/libbitcoin.hpp>; built with SECP256K1_BUILD_LIBBITCOIN_EXAMPLES=ON, no C ABI/shim/bridge.
lbtc_gpu_columns_diffGPU (all)GPU-vs-CPU columns differential for libbitcoin column verify (ECDSA/Schnorr Structure-of-Arrays); validates ufsecp_gpu_ecdsa_verify_lbtc_columns and ufsecp_gpu_schnorr_verify_lbtc_columns against CPU per-row oracle
exploit_ecdsa_der_confusionExploit PoCEnsures DER parser behavior rejects non-canonical or ambiguous encodings
exploit_batch_verify_poisonExploit PoCRegression coverage for adversarial batch-verify poisoning and accumulator corruption attempts
exploit_der_parsing_differentialExploit PoCDifferential strictness coverage for ambiguous or non-canonical DER parser behavior
exploit_ecies_envelope_confusionExploit PoCHostile envelope parsing and domain-confusion regression coverage for ECIES inputs
exploit_ecrecover_confusionExploit PoCRecovery-path confusion and invalid-recid regression coverage for Ethereum/compact recovery flows
exploit_frost_commitment_reuseExploit PoCAdversarial FROST nonce/commitment reuse regression coverage
exploit_gpu_cpu_divergenceExploit PoCDetects backend divergence between GPU results and CPU reference behavior
exploit_gpu_host_api_shapeExploit PoCValidates hostile shape/count/path misuse against the public GPU host API
exploit_hedged_nonce_biasExploit PoCRegression coverage for biased or malformed hedged-nonce construction
exploit_invalid_curve_twistExploit PoCRejects twist/off-curve inputs that could poison public-key or shared-secret flows
exploit_pedersen_adversarialExploit PoCAdversarial Pedersen commitment misuse/regression coverage
exploit_pedersen_switch_misuseExploit PoCSwitch-commitment misuse and binding-confusion regression coverage
exploit_schnorr_xonly_parity_confusionExploit PoCX-only/parity ambiguity regression coverage for Schnorr verification flows
exploit_seckey_tweak_cancelExploit PoCRegression coverage for tweak-cancellation edge cases on secret-key arithmetic
exploit_silent_payment_confusionExploit PoCSilent payment transcript and domain-confusion regression coverage
exploit_taproot_merkle_path_aliasExploit PoCDetects aliasing and malformed-merkle-path edge cases in Taproot proof handling
ffi_coverageFFI surfaceCoverage-oriented validation for public foreign-function interface paths
kat_all_operationsKnown-answer testsBroad deterministic vectors across exposed operations
nonce_uniquenessSecurity auditNonce uniqueness and replay-resistance regression coverage
secp256k1_specSpec conformanceSpecification-oriented secp256k1 behavior checks

Supplemental Active CTest Targets

The following active CTest targets are also part of the documented validation surface and are named here explicitly so the matrix matches the generated CTest inventory exactly:

  • [=[metal_host_test]=]
  • audit_ct_namespace
  • bip324_transport
  • bip32_vectors
  • bip340_strict
  • bip340_vectors
  • ct_equivalence
  • ct_sidechannel_smoke
  • ct_verif_formal
  • diag_scalar_mul
  • exploit_bip324_counter_desync
  • exploit_bip324_transcript_splice
  • exploit_batch_verify_poison
  • exploit_der_parsing_differential
  • exploit_ecies_envelope_confusion
  • exploit_ecrecover_confusion
  • exploit_ethereum_differential
  • exploit_gpu_cpu_divergence
  • exploit_gpu_host_api_shape
  • exploit_hedged_nonce_bias
  • exploit_invalid_curve_twist
  • exploit_musig2_transcript_fork
  • exploit_pedersen_switch_misuse
  • exploit_schnorr_xonly_parity_confusion
  • exploit_seckey_tweak_cancel
  • exploit_silent_payment_confusion
  • exploit_taproot_merkle_path_alias
  • exploit_zk_adversarial
  • fault_injection
  • fiat_crypto_vectors
  • fuzz_musig2_frost
  • gpu_ct_smoke
  • musig2_bip327_vectors
  • musig2_frost
  • musig2_frost_advanced
  • mutation_artifact_scan
  • opencl_selftest
  • parse_strictness
  • regression_shim_xonly_parse
  • rfc6979_vectors
  • secp256k1_ecdh_example
  • secp256k1_ecdsa_example
  • secp256k1_ellswift_example
  • secp256k1_musig_example
  • secp256k1_schnorr_example

Generated Inventory Sync (2026-04-06)

The following active CTest targets were added to the explicit inventory during the 2026-04-06 fortress sync so TEST_MATRIX.md matches the live generated CTest surface exactly:

  • ${_harness}
  • bip352_kat
  • exploit_adaptor_extraction_soundness
  • exploit_address_prefix_collision
  • exploit_batch_sign
  • exploit_biased_nonce_chain_scan
  • exploit_binding_adversarial_api
  • exploit_binding_invalid_curve
  • exploit_bip322_type_confusion
  • exploit_bip32_child_key_attack
  • exploit_bip32_parent_fingerprint_confusion
  • exploit_bip352_parity_confusion
  • exploit_bip352_scan_dos
  • exploit_bip85_path_collision
  • exploit_buff_kr_ecdsa
  • exploit_buffer_type_confusion
  • exploit_cache_sidechannel_amplification
  • exploit_cross_scheme_pubkey
  • exploit_ct_fast_equivalence
  • exploit_ctx_clone
  • exploit_ctx_lifecycle_hostile
  • exploit_descriptor_injection
  • exploit_differential_libsecp
  • exploit_ecdh_zvp_glv_static
  • exploit_ecdsa_fault_injection
  • exploit_ecdsa_nonce_reuse
  • exploit_ecdsa_r_overflow
  • exploit_ecdsa_pmn_wraparound
  • exploit_ecdsa_sign_sentinels
  • exploit_boundary_sentinels
  • exploit_ecies_ephemeral_reuse
  • exploit_eip712_kat
  • exploit_ellswift_bad_scalar_ecdh
  • exploit_ellswift_xdh_overflow
  • exploit_fe_set_b32_limit_uninit
  • exploit_field_boundary_exhaustive
  • exploit_foreign_field_plonk
  • exploit_frost_adaptive_corruption
  • exploit_frost_binding_factor_mismatch
  • exploit_frost_ct_nonce
  • exploit_frost_identifiable_abort
  • exploit_frost_participant_set_malleability
  • exploit_gcs_false_positive
  • exploit_hash_algo_sig_isolation
  • exploit_hertzbleed_dvfs_timing
  • exploit_kr_ecdsa_buff_binding
  • exploit_ladderleak_subbit_nonce
  • exploit_metal_field_reduce
  • exploit_minerva_cve_2024_23342
  • exploit_minerva_noisy_hnp
  • exploit_mutation_residue
  • exploit_musig2_byzantine_multiparty
  • exploit_musig2_parallel_session_cross
  • exploit_network_validation_bypass
  • exploit_p2sh_address_confusion
  • exploit_psbt_input_confusion
  • exploit_pubkey_arith
  • exploit_quantum_exposure
  • exploit_rfc6979_minerva_amplified
  • exploit_rfc6979_truncation_bias
  • exploit_scalar_mul
  • exploit_schnorr_forgery_vectors
  • exploit_schnorr_msg_length_confusion
  • exploit_schnorr_nonce_reuse
  • exploit_seckey_arith
  • exploit_taproot_commitment_adversarial
  • exploit_wallet_cross_domain_replay
  • exploit_wif_security
  • exploit_zk_new_schemes
  • gpu_bip352_scan
  • gpu_ecdsa_snark_witness
  • infinity_edge_cases
  • py_bip32_cka
  • py_dev_bug_scan
  • py_differential_crossimpl
  • py_glv_exhaustive
  • py_hot_path_alloc_scan
  • py_invalid_input_grammar
  • py_nonce_bias
  • py_rfc6979_spec
  • py_semantic_props
  • py_stateful_sequences
  • wycheproof_chacha20_poly1305
  • wycheproof_ecdsa_bitcoin
  • wycheproof_ecdsa_extended
  • wycheproof_ecdsa_sha256
  • wycheproof_ecdsa_sha256_p1363
  • wycheproof_ecdsa_sha512
  • wycheproof_ecdsa_sha512_p1363
  • wycheproof_hkdf_sha256
  • wycheproof_hmac_sha256

Generated Inventory Sync (2026-04-09)

The following active CTest targets were added during the 2026-04-09 audit gate reconciliation:

  • exploit_bip324_aead_forgery
  • exploit_blind_spa_cmov_leak
  • exploit_deterministic_sig_dfa
  • exploit_ecdh_twist_injection
  • exploit_ecdsa_affine_nonce_relation
  • exploit_ecdsa_batch_verify_rand
  • exploit_ecdsa_cross_key_nonce_reuse
  • exploit_ecdsa_differential_fault
  • exploit_ecdsa_half_half_nonce
  • exploit_ecdsa_nonce_modular_bias
  • exploit_ectester_point_validation
  • exploit_eucleak_inversion_correctness
  • exploit_eucleak_inversion_timing
  • exploit_frost_rogue_key
  • exploit_frost_weak_binding
  • exploit_lattice_sieve_hnp
  • exploit_musig2_partial_forgery
  • exploit_ros_concurrent_schnorr
  • exploit_ros_dimensional_erosion
  • exploit_schnorr_batch_inflation
  • exploit_schnorr_hash_order
  • exploit_sign_type_confusion_kreuse
  • exploit_zvp_glv_dcp_multiscalar

Generated Inventory Sync (2026-05-06)

The following active CTest targets were added during the 2026-05-06 performance review so TEST_MATRIX.md matches the live generated CTest surface:

  • exploit_frost_secret_share_ct
  • regression_comb_gen_lockfree
  • regression_pippenger_stale_used
  • regression_negate_inplace_generator_flag
  • regression_recover_rplus_n_overflow
  • regression_ct_glv_make_v_branchless

Generated Inventory Sync (2026-05-03)

The following active CTest targets were added during the 2026-05-03 audit validation sync so TEST_MATRIX.md matches the live generated CTest surface:

  • exploit_batch_verify_malleability
  • exploit_blinding_recovery_hnp
  • exploit_bug004_batch_failclosed
  • exploit_cross_protocol_kreuse
  • exploit_ecdsa_fast_path_isolation
  • exploit_encoding_memory_corruption
  • exploit_gpu_memory_safety
  • exploit_hedged_return_value
  • exploit_kat_corpus
  • exploit_primitive_kat
  • exploit_rs_zero_check
  • exploit_shim_der_bip66
  • exploit_shim_musig_ka_cap
  • exploit_shim_musig_secnonce
  • exploit_shim_noncefp_bypass
  • exploit_shim_recovery_null_arg
  • exploit_tagged_hash_ext
  • exploit_thread_local_blinding
  • regression_gpu_key_erase_raii
  • regression_shim_per_context_blinding
  • regression_shim_static_ctx
  • shim_der_zero_r
  • regression_shim_pubkey_sort
  • secp256k1_noverify_tests
  • secp256k1_tests
  • zeroization

Generated Inventory Sync (2026-05-23)

The following active CTest targets were added during the 2026-05-23 security fix pass (SEC-001/CT-001/SEC-002/SEC-003/SHIM-001/CI-006):

  • regression_adaptor_ct_secret_extract — SEC-001/CT-001: adaptor extract CT scalar mul + s_inv erase (advisory=false)
  • regression_ecdh_xy64_erase — SEC-002: secp256k1_ecdh() xy64 shared-secret buffer erased after hashfp (advisory=true, shim)
  • regression_ecdh_off_curve — SEC-005: ecdh_compute/xonly/raw reject off-curve pubkeys (y²≠x³+7) and infinity before ct::scalar_mul (OCK-1..5) (advisory=false)
  • regression_musig_xonly_zero_tweak — SHIM-001: secp256k1_musig_pubkey_xonly_tweak_add accepts zero tweak (advisory=true, shim)
  • regression_shim_security_v9 — SHIM-NEW-012/015: serialize+seckey NULL arg illegal_callback (advisory=true, shim)
  • regression_musig_noncegen_extra_input — SHIM-NONCEGEN-001: musig_nonce_gen extra_input32 behavioral freeze (advisory=true, shim)
  • regression_shim_keypair_null_cb — T-09/10: per-arg illegal_callback for keypair_create/sec/pub/xonly_pub + sig parse (advisory=true, shim)
  • regression_shim_context_erase — T-11/12: secure_erase ctx->blind + is_zero_ct in ContextBlindingScope (advisory=true, shim)
  • regression_shim_null_arg_cb — SHIM-NEW-001/002/003: ec_pubkey_create/serialize, xonly_pubkey_parse/serialize, recoverable_sig_parse/serialize fire illegal_callback on NULL non-ctx args (advisory=true, shim)
  • regression_shim_tweak_recover_null_cb — TRNC-1..4: xonly_pubkey_tweak_add, tweak_add_check, keypair_xonly_tweak_add, recoverable_sig_convert fire illegal_callback on NULL non-ctx args (SHIM-NULL-CB-2026) (advisory=true, shim)
  • regression_shim_seckey_erase — CT-01/SHIM-01/02/CT-02/RT-02: shim ecdsa sign/sign_recoverable + ellswift create/xdh secure_erase parsed key on all returns; bip32 derive_child erases il_scalar; parse_der requires exact SEQUENCE consumption (source-scan + functional) (advisory=false)

Generated Inventory Sync (2026-05-12)

The following active CTest targets were added during the 2026-05-12 doc+config fix pass so TEST_MATRIX.md matches the live generated CTest surface:

  • regression_frost_threshold_zero
  • regression_hash_three_block_bounds
  • regression_shim_high_s_verify
  • regression_shim_perf_correctness

Generated Inventory Sync (2026-06-23)

The following active CTest target was added pairing the FE52-compute verify perf commit (875d5bee, SECP256K1_FE52_COMPUTE decouples 5x52 compute from storage):

  • fe52_compute_verify — FE52-compute verify differential: dual_scalar_mul_gen_point(u1,u2,Q) == u1*G + u2*Q over 200 vectors + ECDSA/Schnorr sign/verify round-trip + tamper rejection exercising the 5x52 verify dual-mul and to_jac52/from_jac52 bridge (section differential, advisory=false)

Generated Inventory Sync (2026-07-06)

The following active CTest targets were added for the new GPU hash256_var batch variable-length double-SHA256 primitive (GpuBackend::hash256_var with native CUDA/OpenCL/Metal kernels, C ABI ufsecp_gpu_hash256_var, and libbitcoin-direct hash256_var_batch):

  • regression_hash256_var_batch — KAT/boundary coverage for test_regression_hash256_var_batch.cpp: 1B/32B/64B/~1KB rows, stride==len, stride>len, n=0, n=1, n=large — differential against secp256k1::SHA256::hash256 (section differential, advisory=false)
  • regression_hash256_var_paritytest_regression_hash256_var_parity.cpp: cross-backend (CUDA/OpenCL/Metal) byte-identical output parity for the same input corpus (section differential, advisory=false)
  • exploit_hash256_var_boundstest_exploit_hash256_var_bounds.cpp: hostile-input coverage for ufsecp_gpu_hash256_var / hash256_var_batch bounds validation — null inputs/input_lens/out32, n==0, input_lens[i]==0, input_lens[i]>stride, stride==0, stride/count overflow (section exploit_poc, advisory=false)

API Function -> Test Coverage Map

Field Arithmetic (FieldElement)

Functionaudit_fieldtest_comprehensivefuzz_fieldCT check
add / operator+[OK][OK][OK][OK]
sub / operator-[OK][OK][OK][OK]
mul / operator*[OK][OK][OK][OK]
square()[OK][OK][OK][OK]
inverse()[OK][OK][OK][OK]
negate()[OK][OK]--[OK]
from_limbs()[OK][OK]----
from_bytes()[OK][OK]----
to_bytes()[OK][OK]----
from_hex() / to_hex()[OK][OK]----
normalize()[OK][OK][OK]--
field_select()------[OK]
square_inplace()[OK]------
inverse_inplace()[OK]------
fe_batch_inverse()[OK][OK]----

Scalar Arithmetic (Scalar)

Functionaudit_scalartest_comprehensivefuzz_scalarCT check
add / operator+[OK][OK][OK][OK]
sub / operator-[OK][OK][OK][OK]
mul / operator*[OK][OK][OK][OK]
inverse()[OK][OK]--[OK]
negate()[OK][OK]--[OK]
from_uint64()[OK][OK]----
from_bytes()[OK][OK]----
from_hex()[OK][OK]----
is_zero()[OK][OK]----

Point Operations (Point)

Functionaudit_pointtest_comprehensivefuzz_pointCT check
add()[OK][OK][OK][OK]
dbl() / double_point()[OK][OK][OK][OK]
scalar_mul()[OK][OK]--[OK]
is_on_curve()[OK][OK][OK]--
is_infinity()[OK][OK]----
compress() / decompress()[OK][OK][OK]--
to_affine()[OK][OK]----
generator()[OK][OK]----
negate()[OK][OK][OK]--

GLV Endomorphism

Functionaudit_pointtest_comprehensiveCT check
apply_endomorphism()[OK][OK][OK]
verify_endomorphism()--[OK]--
glv_decompose()[OK][OK][OK]
ct::point_endomorphism()----[OK]

Signatures

Functionaudit_securityaudit_integrationtest_ecdsa_schnorrdudect
ecdsa::sign()[OK][OK][OK][OK]
ecdsa::verify()[OK][OK][OK]--
schnorr::sign()[OK][OK][OK][OK]
schnorr::verify()[OK][OK][OK]--

CT Layer

CT functions are verified by a layered approach: equivalence tests (audit_ct, test_ct), statistical timing tests (dudect), and deterministic CT verification (ct-verif + valgrind-ct in CI). Machine-checked proofs (Fiat-Crypto/Vale/Jasmin) are not yet applied.

Functionaudit_cttest_ctdudectct-verifMachine-Checked Proof
ct::field_mul[OK][OK][OK][OK]--
ct::field_inv[OK][OK][OK][OK]--
ct::scalar_mul[OK][OK][OK][OK]--
ct::generator_mul[OK][OK][OK][OK]--
ct::point_add_complete[OK][OK][OK][OK]--
ct::point_dbl[OK][OK]--[OK]--

Protocols

FunctionTest FileCoverageNotes
MuSig2 key aggregationtest_musig2.cpp[OK] BasicNo extended vectors
MuSig2 2-round signtest_musig2.cpp[OK] FullRogue-key, transcript mutation, signer ordering, malicious aggregator adversarial tests added
FROST t-of-ntest_v4_features.cpp[OK] BasicKeygen, sign, aggregate, verify
Adaptor signaturestest_v4_features.cpp[OK] FullTranscript mismatch, extraction misuse, DLEQ malformed proof, wrong generators adversarial tests added
Pedersen commitmentstest_v4_features.cpp[OK] BasicLimited vectors
ZK Knowledge prooftest_zk.cpp[OK]Prove/verify, arbitrary base, serialization
ZK DLEQ prooftest_zk.cpp[OK]Prove/verify, cross-basis equality
ZK Bulletproof rangetest_zk.cpp[OK]Prove/verify, boundary values, inner product
ZK batch range verifytest_zk.cpp[OK]Multi-proof batch verification
GPU ZK Knowledge prooftest_ct_smoke.cu[OK]CT prove + fast-path verify on CUDA
GPU ZK DLEQ prooftest_ct_smoke.cu[OK]CT prove + fast-path verify on CUDA
Taproot (BIP-341)test_ecdh_recovery_taproot.cpp[OK] Basic--
BIP-32 HD derivationtest_bip32.cpp[OK]Standard vectors
28-coin dispatchtest_coins.cpp[OK]Per-coin address format (P2PKH, P2WPKH, P2TR, P2SH-P2WPKH, CashAddr, EIP-55, TRON_BASE58)
Wallet APItest_wallet.cpp[OK]Chain-agnostic key mgmt, signing, recovery
Ethereum signingtest_ethereum.cpp[OK]EIP-155/-191, ecrecover, multi-chain
ECDHtest_ecdh_recovery_taproot.cpp[OK]--
Key recoverytest_ecdh_recovery_taproot.cpp[OK]--

New ABI Surface Edge-Case Coverage (v3.22+ §N)

Gap analysis found 26 ufsecp_* functions with no dedicated edge-case tests. All gaps are closed by test_h1_*test_h12_* in audit/test_adversarial_protocol.cpp.

Test IDABI functionsNULLZero-count/lenInvalid contentSmoke
H.1ufsecp_ctx_size------[OK]
H.2ufsecp_aead_chacha20_encrypt, ufsecp_aead_chacha20_decrypt[OK][OK][OK] (bad-tag, wrong-nonce)[OK]
H.3ufsecp_ecies_encrypt, ufsecp_ecies_decrypt[OK]--[OK] (off-curve, tampered)[OK]
H.4ufsecp_ellswift_create, ufsecp_ellswift_xdh[OK]--[OK] (zero key)[OK]
H.5ufsecp_eth_address_checksummed, ufsecp_eth_personal_hash[OK][OK]--[OK]
H.6ufsecp_pedersen_switch_commit[OK]----[OK]
H.7ufsecp_schnorr_adaptor_extract[OK]--[OK] (zero inputs)--
H.8ufsecp_ecdsa_sign_batch, ufsecp_schnorr_sign_batch[OK][OK]----
H.9ufsecp_bip143_sighash, ufsecp_bip143_p2wpkh_script_code[OK]----[OK]
H.10ufsecp_bip144_txid, ufsecp_bip144_wtxid, ufsecp_bip144_witness_commitment[OK]----[OK]
H.11ufsecp_is_witness_program, ufsecp_parse_witness_program, ufsecp_p2wpkh_spk, ufsecp_p2wsh_spk, ufsecp_p2tr_spk, ufsecp_witness_script_hash[OK]--[OK] (non-witness)[OK]
H.12ufsecp_taproot_keypath_sighash, ufsecp_tapscript_sighash[OK][OK][OK] (OOB index)[OK]

Coverage Gaps (Transparency)

High Priority

GapImpactBlocked By
Machine-checked proofsCT/math properties not proven in Coq/Jasmin/Vale-style frameworksSeparate proof-bearing core or generated arithmetic path needed
Cross-ABI testsCannot verify FFI correctness across calling conventionsNeed multi-compiler test matrix

Medium Priority

GapImpactStatus
MuSig2 extended test vectorsFull adversarial coverage (A.4-A.7)Reference impl vectors available via BIP-327
Multi-uarch timing testsCT may break on specific CPUsNeed hardware test farm
GPU vs CPU differentialGPU arithmetic may divergeCovered by gpu_ops_equivalence (6 ops) + OpenCL/CUDA tests

Low Priority

GapImpactStatus
WASM-specific testsWASM arithmetic may divergeBuild-tested, limited runtime tests
ESP32/STM32 hardware testsEmbedded correctnessRequires physical devices
Adaptor signature extended vectorsFull adversarial coverage (D.1-D.6, E.1-E.5)Transcript mismatch and extraction misuse covered

Continuous Integration Test Matrix

PlatformCompilerSanitizersTests
Linux x86-64GCC 12+ASan, UBSan, TSanFull suite
Linux x86-64Clang 15+ASan, UBSanFull suite
Linux ARM64aarch64-linux-gnu + QEMU--Cross-build + run_selftest smoke + test_bip324_standalone + bench_kP + bench_bip324
Linux RISC-V 64riscv64-linux-gnu + QEMU--Cross-build + run_selftest smoke + test_bip324_standalone + bench_kP + bench_bip324
Windows x86-64MSVC 2022--Full suite
macOS ARM64AppleClang--Full suite
macOS x86-64AppleClang--Full suite
iOS ARM64Xcode toolchain--Build only
Android ARM64NDK--Build only
WASMEmscripten--Build + smoke
CUDAnvcc + host compiler--GPU-specific
ValgrindGCC/ClangMemcheckWeekly

Running Tests

# All CTest targets
ctest --test-dir build --output-on-failure

# Specific audit suite
./build/tests/audit_field
./build/tests/audit_scalar
./build/tests/audit_point
./build/tests/audit_ct

# Side-channel test
./build/tests/test_ct_sidechannel

# Fuzzing (clang required)
clang++ -fsanitize=fuzzer,address -O2 -std=c++20 \
  -I src/cpu/include src/cpu/fuzz/fuzz_field.cpp src/cpu/src/field.cpp \
  -o fuzz_field
./fuzz_field -max_len=64 -runs=10000000

# Selftest (smoke/ci/stress modes)
./build/src/cpu/tests/run_selftest

# Linux ARM64 smoke under QEMU (cross-compiled)
bash ./ci/run-qemu-smoke.sh arm64

# Or run the commands manually
qemu-aarch64 -L /usr/aarch64-linux-gnu ./build-arm64/cpu/run_selftest smoke
qemu-aarch64 -L /usr/aarch64-linux-gnu ./build-arm64/src/cpu/test_bip324_standalone
qemu-aarch64 -L /usr/aarch64-linux-gnu ./build-arm64/cpu/bench_kP
qemu-aarch64 -L /usr/aarch64-linux-gnu ./build-arm64/cpu/bench_bip324

# Linux RISC-V smoke under QEMU (cross-compiled)
bash ./ci/run-qemu-smoke.sh riscv64

# Or run the commands manually
qemu-riscv64 -L /usr/riscv64-linux-gnu ./build-riscv64/cpu/run_selftest smoke
qemu-riscv64 -L /usr/riscv64-linux-gnu ./build-riscv64/src/cpu/test_bip324_standalone
qemu-riscv64 -L /usr/riscv64-linux-gnu ./build-riscv64/cpu/bench_kP
qemu-riscv64 -L /usr/riscv64-linux-gnu ./build-riscv64/cpu/bench_bip324

Exploit PoC Test Suite (audit/test_exploit_*.cpp)

197 standalone exploit-style tests that actively try to break the library. Each test compiles as a separate binary and verifies that attacks fail, edge cases are handled, and security invariants hold under adversarial inputs.

CategoryFile(s)Attack / Property Verified
ECDSA / Signaturetest_exploit_ecdsa_malleabilityBIP-62 low-s enforcement, high-s rejection, normalize(), strict parser
ECDSA / Signaturetest_exploit_ecdsa_edge_casesZero and boundary inputs
ECDSA / Signaturetest_exploit_ecdsa_recoveryKey recovery edge cases
ECDSA / Signaturetest_exploit_ecdsa_rfc6979_katRFC 6979 deterministic nonce KAT
ECDHtest_exploit_ecdhECDH correctness
ECDHtest_exploit_ecdh_degenerateDegenerate ECDH inputs
ECDHtest_exploit_ecdh_variantsECDH variants
Schnorr / BIP-340test_exploit_schnorr_edge_casesSchnorr edge cases
Schnorr / BIP-340test_exploit_schnorr_bip340_katBIP-340 known-answer tests
Batch Schnorrtest_exploit_batch_schnorrBasic batch Schnorr verification
Batch Schnorrtest_exploit_batch_schnorr_forgeForge detection, identify_invalid accuracy
Batch Schnorrtest_exploit_batch_soundnessBatch soundness properties
GLV / Mathtest_exploit_glv_endomorphismEndomorphism properties
GLV / Mathtest_exploit_glv_katGLV ±k₁±k₂λ≡k, φ(G)=λG, φ²+φ+1=0 decomposition KAT
GLV / Mathtest_exploit_field_arithmeticField element arithmetic
GLV / Mathtest_exploit_scalar_group_orderScalar group-order properties
GLV / Mathtest_exploit_scalar_invariantsScalar invariants
GLV / Mathtest_exploit_scalar_systematicSystematic scalar coverage
GLV / Mathtest_exploit_point_group_lawPoint group law
GLV / Mathtest_exploit_point_serializationPoint serialization
GLV / Mathtest_exploit_multiscalarMulti-scalar multiplication
GLV / Mathtest_exploit_pippenger_msmPippenger MSM
Batch Verifytest_exploit_batch_verify_correctnessBatch verify math
BIP-32 / HDtest_exploit_bip32_depthDepth overflow
BIP-32 / HDtest_exploit_bip32_derivationDerivation correctness
BIP-32 / HDtest_exploit_bip32_path_overflowPath overflow attack
BIP-32 / HDtest_exploit_bip32_ckd_hardenedHardened isolation, xpub guard, fingerprint
BIP-39test_exploit_bip39_entropyEntropy edge cases
BIP-39test_exploit_bip39_mnemonicMnemonic generation and parsing
HD Derivationtest_exploit_coin_hd_derivationHD derivation paths per coin type
MuSig2test_exploit_musig2MuSig2 protocol
MuSig2test_exploit_musig2_key_aggKey aggregation
MuSig2test_exploit_musig2_nonce_reuseNonce reuse attack
MuSig2test_exploit_musig2_orderingKey ordering independence
FROSTtest_exploit_frost_byzantineByzantine participant
FROSTtest_exploit_frost_dkgDistributed key generation
FROSTtest_exploit_frost_indexParticipant index handling
FROSTtest_exploit_frost_lagrange_duplicateDuplicate Lagrange coefficients
FROSTtest_exploit_frost_participant_zeroIndex-zero participant
FROSTtest_exploit_frost_signingFROST signing protocol
FROSTtest_exploit_frost_threshold_degenerateDegenerate threshold
Adaptor / ZKtest_exploit_adaptor_extendedExtended adaptor attacks
Adaptor / ZKtest_exploit_adaptor_parityAdaptor parity handling
Adaptor / ZKtest_exploit_zk_proofsZK proof properties
Adaptor / ZKtest_exploit_pedersen_homomorphismPedersen commitment homomorphism
AEAD / ChaCha20test_exploit_aead_integrityChaCha20-Poly1305 MAC bypass, nonce reuse, zeroed output on failure
AEAD / ChaCha20test_exploit_chacha20_katChaCha20 known-answer tests
AEAD / ChaCha20test_exploit_chacha20_nonce_reuseNonce reuse hazard
AEAD / ChaCha20test_exploit_chacha20_poly1305AEAD roundtrip
HKDFtest_exploit_hkdf_katHKDF known-answer tests
Hash primitivestest_exploit_keccak256_katKeccak-256 KAT
Hash primitivestest_exploit_ripemd160_katRIPEMD-160 KAT
Hash primitivestest_exploit_sha256_katSHA-256 KAT
Hash primitivestest_exploit_sha512_katSHA-512 KAT
Hash primitivestest_exploit_sha_katSHA family KAT
ECIEStest_exploit_ecies_authECIES authentication
ECIEStest_exploit_ecies_encryptionECIES encryption
ECIEStest_exploit_ecies_roundtripECIES roundtrip
Protocol BIPstest_exploit_bip143_sighashBIP-143 sighash
Protocol BIPstest_exploit_bip144_serializationBIP-144 serialization
Protocol BIPstest_exploit_bip324_sessionBIP-324 encrypted P2P session
Protocol BIPstest_exploit_segwit_encodingSegWit address encoding
Protocol BIPstest_exploit_taproot_scriptsTaproot script path
Protocol BIPstest_exploit_taproot_tweakTaproot key tweak
Address / Wallettest_exploit_address_encodingAddress encoding
Address / Wallettest_exploit_address_generationAddress generation
Address / Wallettest_exploit_wallet_apiWallet API
Address / Wallettest_exploit_private_keyPrivate key handling
Address / Wallettest_exploit_eth_signingEthereum signing
Address / Wallettest_exploit_bitcoin_message_signingBitcoin message signing
Constant-Timetest_exploit_ct_recovCT key recovery
Constant-Timetest_exploit_ct_systematicSystematic CT verification
Constant-Timetest_exploit_backend_divergenceBackend divergence detection
ElligatorSwifttest_exploit_ellswiftElligatorSwift encoding correctness
ElligatorSwifttest_exploit_ellswift_ecdhElligatorSwift ECDH
Self-Test / APItest_exploit_selftest_apiSelf-test API
Recoverytest_exploit_recovery_extendedExtended recovery edge cases
ECDSA / Signaturetest_exploit_ecdsa_nonce_reuseECDSA nonce-reuse key extraction: verifies RFC 6979 prevents k reuse
ECDSA / Signaturetest_exploit_ecdsa_r_overflowECDSA r-overflow: r ≥ n, r = 0, DER parse edge cases, PMN constants
ECDSA / Signaturetest_exploit_ecdsa_sign_sentinelsECDSA sign sentinels: zero-sk/r/s rejection; mass sign no zero-components
ECDSA / Signaturetest_exploit_rfc6979_truncation_biasRFC 6979 truncation bias: nonce truncation correctness for message sizes
ECDSA / Signaturetest_exploit_binding_invalid_curveInvalid curve point injection into ECDH/Schnorr verify rejected
Schnorr / BIP-340test_exploit_batch_signVerifies Schnorr batch-sign cannot produce invalid/forgeable signatures
Schnorr / BIP-340test_exploit_schnorr_msg_length_confusionSchnorr message-length confusion: empty/short/prefix/large isolation
Schnorr / BIP-340test_exploit_schnorr_nonce_reuseSchnorr nonce-reuse key extraction: tagged-hash nonce prevents reuse
GLV / Mathtest_exploit_ecdh_zvp_glv_staticECDH zero-value-point w/ GLV static key: all-zero output rejection
GLV / Mathtest_exploit_fe_set_b32_limit_uninitField element set_b32 limit: uninit/poisoned-memory parsing safety
GLV / Mathtest_exploit_pubkey_arithPublic-key arithmetic: add/tweak/negate/combine edge cases
GLV / Mathtest_exploit_seckey_arithSecret-key arithmetic: add/tweak/negate/verify edge cases on scalars
BIP-32 / HDtest_exploit_bip85_path_collisionBIP-85 path collision: different paths must yield different entropy
BIP-352 / Silent Paymentstest_exploit_bip352_parity_confusionBIP-352 parity confusion: pubkey negation vs ECDH output consistency
BIP-352 / Silent Paymentstest_exploit_bip352_scan_dosBIP-352 scan DoS resistance: timing-bounded large input sets
FROSTtest_exploit_frost_adaptive_corruptionFROST adaptive corruption: corrupted partial sigs detected after DKG
FROSTtest_exploit_frost_identifiable_abortFROST identifiable abort: bad partials correctly identified in 2-of-3
FROSTtest_exploit_frost_participant_set_malleabilityFROST participant-set malleability: reordered/swapped nonces detected
Constant-Timetest_exploit_biased_nonce_chain_scanNonce bias detection via chain-scanning statistical analysis
Constant-Timetest_exploit_cache_sidechannel_amplificationCache side-channel amplification: timing noise vs ECDSA sign leakage
Constant-Timetest_exploit_hertzbleed_dvfs_timingHertzbleed/DVFS timing: ECDSA sign timing variance under freq scaling
Constant-Timetest_exploit_minerva_cve_2024_23342Minerva CVE-2024-23342 timing attack: nanosecond median/MAD analysis
Constant-Timetest_exploit_minerva_noisy_hnpMinerva noisy HNP: nonce-bias detection under realistic noise
Constant-Timetest_exploit_rfc6979_minerva_amplifiedRFC 6979 Minerva amplified: repeated ECDSA sign nanosecond timing
ECIEStest_exploit_ecies_ephemeral_reuseECIES ephemeral key reuse to different recipients must be rejected
ElligatorSwifttest_exploit_ellswift_xdh_overflowElligatorSwift XDH overflow: boundary/malformed 64-byte inputs
Protocol BIPstest_exploit_eip712_katEIP-712 structured data signing known-answer tests
Protocol BIPstest_exploit_taproot_commitment_adversarialTaproot commitment adversarial: output-key manipulation attempts
Address / Wallettest_exploit_psbt_input_confusionPSBT input confusion: segwit encoding, key isolation, taproot sighash
Recoverytest_exploit_buff_kr_ecdsaKey-recovery ECDSA to Ethereum address binding roundtrip
Recoverytest_exploit_kr_ecdsa_buff_bindingKey-recovery ECDSA buffer binding: verify-after-recover consistency
Self-Test / APItest_exploit_binding_adversarial_apiAdversarial API misuse: ctx lifecycle, double destroy, bad ctx
Self-Test / APItest_exploit_buffer_type_confusionType confusion: passing wrong-type buffers to API functions
Self-Test / APItest_exploit_cross_scheme_pubkeyCross-scheme pubkey reuse: same key in ECDH/Schnorr/ECIES isolation
Self-Test / APItest_exploit_differential_libsecpSelf-consistency invariants (RFC6979 sign determinism, sign↔verify roundtrip) — NOT an external-library differential; the real in-process libsecp256k1 differential is test_cross_libsecp256k1
Adaptor / ZKtest_exploit_quantum_exposureQuantum exposure: pubkey creation under adversarial key guessing
Boundary sentinelstest_exploit_boundary_sentinelsZero, max, order-boundary sentinel values across all API entry points
Hashtest_exploit_hash_algo_sig_isolationHash-algorithm signature isolation: SHA-256 vs alt-hash no cross-verify
Misctest_exploit_gcs_false_positiveGCS filter: false-positive rate, determinism, null handling
Metaltest_exploit_metal_field_reduceMetal field_reduce_512 truncation regression: acc[8] > 32-bit carry chains
Mutationtest_exploit_mutation_residueMutation residue exploit: inverse sweep, ECDSA roundtrip, CT scalar_inverse(0)
Mutationtest_mutation_artifact_scanSource artifact scanner: stale mutation markers, vestigial test debris
ABI / Networktest_exploit_network_validation_bypassNetwork selector validation bypass: OOB enum, INT_MAX, negative values
Scalar Multest_exploit_scalar_mulPoint::scalar_mul edge-case PoC: zero/identity/order-n/GLV/Shamir/MSM/overflow/doubling-chain
SafeGCDtest_exploit_safegcd_divstepsSafeGCD / Bernstein-Yang divsteps correctness: modular inverse boundaries, reduction verification
Noncetest_exploit_custom_nonce_injectionNonce function edge cases: custom nonce injection, zero nonce, boundary nonce handling
ZK / Adaptortest_fault_zk_adaptorZK/Pedersen/Adaptor fault-injection: bit-flip proofs, corrupted commitments, adaptor tampering
Field / Scalartest_field_scalar_edgeField & Scalar boundary conditions: carry propagation, reduction edge cases, overflow handling
Secret Lifecycletest_secret_lifecycleSecret lifecycle audit: sk creation → sign → verify → zeroize, cross-function secret flow

Build and run all exploit tests:

cmake -S . -B build-audit -G Ninja -DCMAKE_BUILD_TYPE=Release -DSECP256K1_BUILD_TESTS=ON
cmake --build build-audit -j
ctest --test-dir build-audit -R "exploit" --output-on-failure

BIP-352 Known-Answer Tests

TargetSourceDescription
bip352_kattests/test_bip352_kat.cppBIP-352 known-answer tests: output creation, roundtrip, rejection, index isolation

GPU Integration Tests

TargetSourceDescription
gpu_bip352_scantests/test_gpu_bip352_scan.cppGPU BIP-352 silent-payment scan: CPU plan + GPU batch scan round-trip
gpu_ecdsa_snark_witnesstests/test_gpu_ecdsa_snark_witness.cppGPU ECDSA SNARK witness generation: limb roundtrip, bounds, batch macro

Python Audit Harnesses (ci/)

TargetSourceDescription
py_dev_bug_scanci/dev_bug_scanner.pyStatic analysis for common API misuse patterns
py_differential_crossimplci/differential_cross_impl.pyDifferential cross-implementation testing via Python FFI
py_hot_path_alloc_scanci/hot_path_alloc_scanner.pyHot-path allocation scanner: heap allocations in critical paths
py_invalid_input_grammarci/invalid_input_grammar.pyGrammar-guided malformed input generation
py_nonce_biasci/nonce_bias_detector.pyStatistical analysis of ECDSA nonce distribution
py_rfc6979_specci/rfc6979_spec_verifier.pyRFC 6979 deterministic nonce KAT compliance
py_semantic_propsci/semantic_props.pyAlgebraic invariant property-based checking
py_stateful_sequencesci/stateful_sequences.pyMulti-call API state machine exploration

Wycheproof Test Vectors

TargetSourceDescription
wycheproof_chacha20_poly1305tests/test_wycheproof_chacha20_poly1305.cppWycheproof ChaCha20-Poly1305 AEAD test vectors
wycheproof_hkdf_sha256tests/test_wycheproof_hkdf_sha256.cppWycheproof HKDF-SHA256 KDF test vectors
wycheproof_hmac_sha256tests/test_wycheproof_hmac_sha256.cppWycheproof HMAC-SHA256 MAC test vectors

Remaining ABI Surface Edge-Case Coverage (v3.23+ §I/§O)

IDFunctionsNULL argsInvalid inputsValid round-trip
I.1ufsecp_ctx_clone, ufsecp_last_error_msg, ufsecp_last_error[OK][OK] (error state)[OK] (independent clone)
I.2ufsecp_pubkey_parse, ufsecp_pubkey_create_uncompressed[OK][OK] (bad len, bad prefix, zero key)[OK] (uncompressed→compressed normalisation)
I.3ufsecp_ecdsa_sign_recoverable, ufsecp_ecdsa_recover[OK][OK] (zero key, bad recid)[OK] (recovered pubkey matches original)
I.4ufsecp_ecdsa_sign_verified, ufsecp_schnorr_sign_verified[OK][OK] (zero key)[OK] (outputs verify via _verify counterpart)
I.5ufsecp_schnorr_batch_verify, ufsecp_ecdsa_batch_verify, ufsecp_schnorr_batch_identify_invalid, ufsecp_ecdsa_batch_identify_invalid[OK][OK] (tampered sig)[OK] (valid entry verifies; identify_invalid returns correct index)

Legend

SymbolMeaning
[OK]Tested with passing checks
[!]Partial or no coverage
[FAIL]Not implemented
--Not applicable

UltrafastSecp256k1 v4.5.0 -- Test Coverage Matrix


Additional Exploit PoC Tests (batch 2 — v3.68+)

TargetSourceDescription
exploit_batch_verify_low_saudit/test_exploit_batch_verify_low_s.cppBatch verify rejects high-S signatures (BIP-62 low-S enforcement)
exploit_bech32_underflowaudit/test_exploit_bech32_underflow.cppBech32 decoder integer-underflow PoC (CVE class)
exploit_binding_retvalaudit/test_exploit_binding_retval.cppFFI bindings must not silently ignore error return values
exploit_bip352_batch_correctnessaudit/test_exploit_bip352_batch_correctness.cppBIP-352 scan plan batch correctness vs CPU reference
exploit_bitcoin_core_rgrindingaudit/test_exploit_bitcoin_core_rgrinding.cppR-grinding loop correctness (Bitcoin Core ndata/grind interaction)
exploit_dark_skippy_exfilaudit/test_exploit_dark_skippy_exfil.cppDark Skippy nonce exfiltration — signing path must not leak key bits
exploit_differential_opensslaudit/test_exploit_differential_openssl.cppDifferential ECDSA parity vs OpenSSL reference
exploit_eth_signing_ctaudit/test_exploit_eth_signing_ct.cppEthereum signing path constant-time verification
exploit_fiat_shamir_frozen_heartaudit/test_exploit_fiat_shamir_frozen_heart.cppFrozen Heart (CVE-2023-33242): Fiat-Shamir transcript must commit to all prover messages
exploit_gpu_secret_eraseaudit/test_exploit_gpu_secret_erase.cppGPU device-side secret erase on error paths
exploit_hertzbleed_scalar_blindaudit/test_exploit_hertzbleed_scalar_blind.cppHertzbleed DVFS timing — blinded scalar must not vary with CPU frequency
exploit_jni_retval_ignoredaudit/test_exploit_jni_retval_ignored.cppJNI/Java bindings: error return value must propagate, not be silently dropped
exploit_libsecp_eckey_apiaudit/test_exploit_libsecp_eckey_api.cppLibsecp256k1 eckey API parity: all 17 ECKEY-* edge cases
exploit_monolith_splitaudit/test_exploit_monolith_split.cppMonolith split (B-04): impl domain files must match monolith behavior
exploit_pippenger_batch_regressionaudit/test_exploit_pippenger_batch_regression.cppPippenger MSM regression: batch result must match naive multi-scalar
exploit_recoverable_sign_ctaudit/test_exploit_recoverable_sign_ct.cppRecoverable ECDSA signing constant-time on secret key and nonce
exploit_thread_unsafe_lazy_initaudit/test_exploit_thread_unsafe_lazy_init.cppLazy initialisation race — table build must be thread-safe
exploit_wallet_sign_ctaudit/test_exploit_wallet_sign_ct.cppWallet ECDSA/Schnorr signing CT path on secret key
regression_bip324_sessionaudit/test_regression_bip324_session.cppBIP-324 transport session key agreement regression
regression_segwit_hash160_decoupleaudit/test_regression_segwit_hash160_decouple.cppP2WPKH validate hash160 decoupled from BIP-352 (no-LTO link regression)
regression_cuda_pool_capaudit/test_regression_cuda_pool_cap.cppCUDA memory pool capacity regression (RTX-series OOM)
regression_musig2_verifyaudit/test_regression_musig2_verify.cppMuSig2 partial signature verification regression
regression_z_fe_nonzeroaudit/test_regression_z_fe_nonzero.cppJacobian Z-coordinate non-zero invariant regression
regression_adaptor_binding_domainaudit/test_regression_adaptor_binding_domain.cppSEC-010: ecdsa_adaptor_binding BIP-340 tagged hash domain separation (ADB-1..6)
regression_adaptor_degenerate_v7audit/test_regression_adaptor_degenerate_v7.cppv7: T-09 ufsecp_ecdsa_adaptor_sign degenerate output guard + round-trip + null-arg fail-closed
regression_shim_security_v8audit/test_regression_shim_security_v8.cppv8: P1-SEC-NEW-001 ecdh strict privkey (Rule 11) + RED-TEAM-008 ecdsa_verify on-curve + P2-SEC-NEW-002 ecdh pubkey on-curve + NEW-006 schnorr ct::scalar_cneg
regression_ecdsa_batch_curve_checkaudit/test_regression_ecdsa_batch_curve_check.cppCA-001: secp256k1_ecdsa_verify_batch rejects invalid-curve pubkeys (y^2 != x^3+7) in both small-batch (n<8) and large-batch (n>=8) paths (BCK-1..6)
regression_ecdsa_batch_verify_mtaudit/test_regression_ecdsa_batch_verify_mt.cppMT-BATCH: ecdsa_batch_verify_mt boolean parity with serial ecdsa_batch_verify across thread counts {0,1,2,4,8,64} + single-sig corruption detection + multi-chunk (>4096) corruption propagation; first-class engine parallelism over public-data verify
regression_fe52_var_pathsaudit/test_regression_fe52_var_paths.cppPERF-VAR: FE52 mul_var/mul_assign_var/square_var/square_inplace_var produce correct results matching CT paths — removes TEMPORARY CT fallback (VAR-1..4)
regression_ct_secret_is_zeroaudit/test_regression_ct_secret_is_zero.cppSIZ-1..4: adaptor CT nonce (VT is_zero removed before ct::scalar_inverse) + taproot is_zero→is_zero_ct fixes; adaptor round-trip + taproot edge cases
regression_rfc6979_ct_loopaudit/test_regression_rfc6979_ct_loop.cppRFC6979-CT: rfc6979_nonce fixed 2-iteration CT loop + ct::scalar_select; 200 sign+verify round-trips, determinism, nonce uniqueness
regression_batch_csprng_seedaudit/test_regression_batch_csprng_seed.cppP2-SEC-002: schnorr_batch_verify CSPRNG-seeded weights; BWC-1..4: 128-sig large-batch correct, fail-closed, soundness agreement, ECDSA path unchanged
regression_batch_gterm_vtaudit/test_regression_batch_gterm_vt.cppPERF-008: schnorr_batch_verify g_coeff*G uses VT path (not CT); GTM-1..3: 128-sig large-batch correct, corrupted-s false, mismatched-pubkey false
regression_adaptor_ct_nonceaudit/test_regression_adaptor_ct_nonce.cppP2-CT-RT-004: adaptor_nonce/ecdsa_adaptor_binding fixed 2-iter CT select; ACN-1..5: Schnorr/ECDSA adaptor round-trips, adapt+extract, determinism, nonce uniqueness
regression_adaptor_blinded_nonceaudit/test_regression_adaptor_blinded_nonce.cppSEC-NEW-001/002 + P3-SHIM-STACK + P3-BATCH-MEM: schnorr_adaptor_sign ct::generator_mul_blinded(k) DPA defence, shim_schnorr_bch is_zero_ct on nonce, stack msg buffer 256→1024, batch vector shrink_to_fit
regression_secret_scalar_residue_eraseaudit/test_regression_secret_scalar_residue_erase.cppFROST-SIGN-RESIDUE: frost_sign secure_erase of secret-derived rho_ei/lambda_s_e (binding nonce ei + share s_i); schnorr_keypair_create erases d_prime private-key copy — source-scan (3 sites) + keypair sign/verify round-trip
regression_precompute_gcontext_raceaudit/test_regression_precompute_gcontext_race.cppPRECOMPUTE-GCONTEXT-UAF: g_context shared_ptr snapshot under g_mutex prevents use-after-free vs concurrent configure_fixed_base reset — source-scan + concurrent reconfigure/compute-vs-reference smoke
soundness_adaptor_dleq_forgeryaudit/test_soundness_adaptor_dleq_forgery.cppSOUNDNESS-PROBE (GHSA-c7q2): negative-soundness test — forge an ECDSA-adaptor pre-sig with log_G(R_hat)≠log_T(R) that still satisfies r==R.x and the ECDSA relation; the Chaum-Pedersen DLEQ binding MUST reject it. Seed of the soundness-coverage gate (ci/check_soundness_coverage.py)
metamorphic_adaptoraudit/test_metamorphic_adaptor.cppMETAMORPHIC-PROBE: positive complement to soundness_adaptor_dleq_forgery — ECDSA-adaptor adapt/extract algebraic relations (MR1 adapt-validity, MR2 extract inverts adapt to ±t, MR3 r-invariant, MR4 pre-sig≠sig boundary, MR5 adapt determinism, MR6 witness correspondence). Seed of the metamorphic-coverage gate (ci/check_metamorphic_coverage.py)
soundness_snark_witness_attestationaudit/test_soundness_snark_witness_attestation.cppSOUNDNESS-PROBE (blind-zone #1, eprint 2025/695, GHSA-c7q2 class): ecdsa/schnorr_snark_witness.valid==1 MUST IMPLY canonical ufsecp verify==OK across forged inputs (tampered/malleable s, tampered r, non-canonical r≥p, s==0, wrong msg). The struct-returning attestation that the self-deriving soundness scan now catches
regression_musig_keyagg_lifetimeaudit/test_regression_musig_keyagg_lifetime.cppUAF-REGRESSION (blind-zone #4): shim_musig.cpp g_ka now holds shared_ptr and ka_get/ka_get_by_token return a shared_ptr snapshot, not a raw it->second.get() from the mutex-guarded map (unlock-then-use UAF class, same as PRECOMPUTE-GCONTEXT-UAF). Guarded by ci/check_locked_map_handle_escape.py
regression_bip39_csprng_failclosedaudit/test_regression_bip39_csprng_failclosed.cppENTROPY-SOURCE (blind-zone #5): bip39.cpp no longer defines a local fail-open csprng_fill; routes through the canonical fail-closed detail::csprng_fill (abort on RNG failure). Source-scan + functional mnemonic generate/validate. Guarded by ci/check_entropy_source_integrity.py
regression_batch_dos_capaudit/test_regression_batch_dos_cap.cppRESOURCE-EXHAUSTION (blind-zone #15): batch sign ABI rejects count>kMaxBatchN (1<<20) and count==0 with BAD_INPUT before any count*size allocation (DoS ceiling); small valid batch still succeeds
regression_abi_invalid_rejectaudit/test_regression_abi_invalid_reject.cppVALID/INVALID coverage: live ABI reject branches the blocking suite never exercised — ufsecp_seckey_negate (>=n->BAD_KEY), ufsecp_shamir_trick + ufsecp_multi_scalar_mul (scalar>=n->BAD_INPUT, off-curve->BAD_PUBKEY). Wrong-accept trap closed
external_anchor_kataudit/test_external_anchor_kat.cppEXTERNAL-ANCHOR KAT (common-mode defence): ufsecp_sha512 vs NIST FIPS 180-4 (""/"abc"); ufsecp_taproot_output_key vs OFFICIAL BIP-341 wallet-test-vectors (scriptPubKey[0] keypath-only, pins H_TapTweak to the Bitcoin spec, not self-derivation)
regression_nonce_candidate_eraseaudit/test_regression_nonce_candidate_erase.cppP2-CT-001/002/003/007: cand1+cand2 secure_erase after ct::scalar_select in rfc6979_nonce, rfc6979_nonce_hedged, musig2_nonce_gen (k1+k2), derive_scalar_from_hash; NCER-1..5: 200 ECDSA roundtrips, determinism, uniqueness, 50 hedged roundtrips, source scan
regression_shim_null_callbackaudit/test_regression_shim_null_callback.cppSHIM-A01/A02/A03/A07/A08: secp256k1 shim fires illegal_callback on NULL args matching libsecp256k1 ARG_CHECK; SNC-1..5: normalize(NULL sigin), pubkey_sort(NULL ctx), tagged_sha256(NULL msg+len=0 OK), pubkey_negate(NULL pubkey), tagged_sha256(NULL msg+len>0)
exploit_frost_absent_signer_idaudit/test_exploit_frost_absent_signer_id.cppP1-SEC-001: frost_sign returns zero partial sig when caller ID absent from nonce_commitments signing set (FSI-1..3)
regression_schnorr_sign_e_hash_erasedaudit/test_regression_schnorr_sign_e_hash_erased.cppP1-SEC-002/SEC-009: schnorr_sign erases e_hash+e intermediates; SHE-1..4: 50 sign+verify round-trips, determinism, distinct-message distinct-sig
regression_musig2_v1_partial_sign_deprecatedaudit/test_regression_musig2_v1_partial_sign_deprecated.cppv9 RT-001 / TASK-001: ufsecp_musig2_partial_sign (v1) hard-fails with UFSECP_ERR_DEPRECATED_API; verifies v1 reject path (output zeroed, secnonce securely erased, NULL-arg precedence preserved) and v2 still produces valid partial signatures
regression_secret_stack_residue_v9audit/test_regression_secret_stack_residue_v9.cppv9 RT-006/-007/-014/-015 / TASK-022: schnorr raw-key overloads erase kp.d; bip32::derive_child uses is_zero_ct; FROST derive_scalar/derive_scalar_pair erase SHA state (h, tag_hash, hash); ecdsa_adaptor_sign degenerate-r early-return erases (k, binding, R_x_bytes) — 16 source-scan + functional checks
shim_recovery_and_noncefpcompat/libsecp256k1_shim/tests/test_shim_recovery_and_noncefp.cppPASS3-001/002: recoverable sig parse accepts r=0/s=0 (REC-1..4); ecdsa_sign/recoverable/schnorr_sign_custom fire illegal_callback for custom noncefp (NFP-1..3)
regression_ecdsa_verify_cache_consistencyaudit/test_regression_ecdsa_verify_cache_consistency.cppSHIM-013: secp256k1_ecdsa_verify 1st-encounter direct-Point path now runs parse_bytes_strict + curve-equation check matching the 2nd-encounter cache path; CVC-1..3: x>=p, y>=p, off-curve all reject deterministically across 3 repeat calls (no cache-state divergence)
regression_musig_noncegen_extra_inputaudit/test_regression_musig_noncegen_extra_input.cppSHIM-NONCEGEN-001: secp256k1_musig_nonce_gen ignores extra_input32 — behavioral freeze NCI-1..3: source-scan marker, NULL vs non-NULL pubnonce identity, two distinct non-NULL extra_input32 pubnonce identity
regression_shim_keypair_null_cbaudit/test_regression_shim_keypair_null_cb.cppT-09/10: secp256k1 shim fires illegal_callback on per-argument NULL in keypair_create/sec/pub/xonly_pub + ecdsa sig parse (NCA-1..9) — advisory=true, shim
regression_shim_context_eraseaudit/test_regression_shim_context_erase.cppT-11/12: shim_context.cpp memset→secure_erase on ctx->blind (3×), ContextBlindingScope is_zero→is_zero_ct (SCE-1..5) — advisory=true, shim
regression_shim_null_arg_cbaudit/test_regression_shim_null_arg_cb.cppSHIM-NEW-001/002/003: ec_pubkey_create/serialize, xonly_pubkey_parse/serialize, recoverable_sig_parse/serialize fire illegal_callback on NULL non-ctx args (NAC-1..8) — advisory=true, shim

Upstream Libsecp256k1 Parity Tests (batch 3 — v3.69+)

TargetSourceDescription
exploit_pubkey_cmpaudit/test_exploit_pubkey_cmp.cppPubkey comparison ordering (GAP-3) — ports upstream run_pubkey_comparison; lexicographic ordering correctness for MuSig2 key aggregation
exploit_pubkey_sortaudit/test_exploit_pubkey_sort.cppPubkey sort + MuSig2 BIP-327 ordering (GAP-4) — ports upstream run_pubkey_sort; all 120 permutations must yield same sorted order
exploit_alloc_boundsaudit/test_exploit_alloc_bounds.cppAllocation boundary batch verify (GAP-1) — ports upstream run_scratch_tests; count=0/1/64/128/192 edge cases and fail-closed on tampered sig
exploit_hsortaudit/test_exploit_hsort.cppHeap sort / batch ordering (GAP-2) — ports upstream run_hsort_tests; batch verify must be order-independent (forward/reversed/shuffled inputs)
exploit_wnafaudit/test_exploit_wnaf.cppwNAF window decomposition boundaries (GAP-5) — ports upstream run_wnaf_tests; sk=1→G, sk=n-1→-G, GLV split, alternating-bit and FF scalars
exploit_int128audit/test_exploit_int128.cpp128-bit field arithmetic boundaries (GAP-7) — ports upstream run_int128_tests; field identity, p-1 edge, 2642^{64} carry boundaries, commutativity

Upstream Libsecp256k1 Parity Tests (batch 4 — v3.70+)

TargetSourceDescription
exploit_scratchaudit/test_exploit_scratch.cppScratch allocator risk surface — upstream run_scratch_tests; scratch_space API not in shim (confirmed), tests via batch lifecycle + context stress
exploit_xoshiroaudit/test_exploit_xoshiro.cppxoshiro256** PRNG context randomization — upstream run_xoshiro256pp_tests; KAT seed from upstream, behavioral properties via context_randomize
exploit_bugbounty_20260505audit/test_exploit_bugbounty_20260505.cpp2026-05-05 bug bounty red-team round 2: BB-01 FROST n_signers<threshold, BB-02 zero signing share, BB-03 shim ctx_can_sign, BB-04 low-S≠even proof, BB-05 BIP32 depth guard, BB-06 ABI low-S invariant
exploit_redteam_round3_20260505audit/test_exploit_redteam_round3_20260505.cpp2026-05-05 red-team round 3: RR3-01/02 MuSig2 secnonce not zeroed on error paths (BUG-1), RR3-03/04 FROST nonce not zeroed on early exits (BUG-2), RR3-05 last_error_msg thread_local path (BUG-4), RR3-06 MuSig2 keyagg LE32 round-trip (BUG-6)
test_exploit_ltcsp_isolation.cppaudit/test_exploit_ltcsp_isolation.cppLTC-SP cross-chain isolation: LTCSP/ tagged hash prevents BTC↔LTC replay + create/scan roundtrip
test_exploit_sp_scanner_parity.cppaudit/test_exploit_sp_scanner_parity.cppSilentPaymentScanner + LtcSpScanner parity: scan_tx==scan_batch, BTC↔LTC cross-chain isolation, spend key correctness
regression_shim_rfc6979_compataudit/test_regression_shim_rfc6979_compat.cppSHIM-P3-006: rfc6979_nonce_libsecp_compat determinism + signing correctness — same inputs same nonce, NULL vs non-NULL ndata differ, ecdsa_sign_libsecp_compat verifies (RFC-1..9); advisory=false
regression_shim_divergence_fixesaudit/test_regression_shim_divergence_fixes.cppILLCB-001/002: pubkey_parse NULL args fire illegal_cb; DER-STRICT: r=0/s=0 accepted at parse; keypair_sec BIP-340: stored sk produces even-Y pubkey (SDF-1..6); advisory=true
regression_shim_tweak_recover_null_cbaudit/test_regression_shim_tweak_recover_null_cb.cppTRNC-1..4: xonly_pubkey_tweak_add, tweak_add_check, keypair_xonly_tweak_add, recoverable_sig_convert fire illegal_callback on NULL non-ctx args (SHIM-NULL-CB-2026); advisory=true