Weighted signature batch verification
For the proposed query-filtered workflow and compact untrusted MSM certificates, see query-produced batch hints. Those are research experiments; they do not change the implemented acceptance or measured costs.
The batch crate integrates the reviewed BIP340 and classical explicit-R ECDSA* prototype equations with caller-owned, bounded MSM. The coefficient/API security policy remains under review. Native vector tests and source review do not establish production security or faster IC execution. Actual Wasm64 qualification, window choice, compiled stack usage and IC costs remain separate work. No HSS-rand implementation is exposed.
Public API and exact profiles
BIP340 uses its standard raw message, x-only key 32 and signature 64. Both public
x coordinates must be below p and lift to even-Y points; s must be canonical
below n, with zero permitted. Its challenge is the exact BIP0340 tagged hash.
The aggregate checks sum(a_i*(s_i*G-R_i-e_i*P_i))=identity, with a1=1 and all
other coefficients nonzero in the scalar field.
The separate ECDSA* control accepts SEC1 keys 33/65, digest 32 and the existing
experimental compressed R33 || s32 format. It validates nonidentity points,
r=x(R) mod n !=0, nonzero canonical s and explicit low-S policy; it never
normalizes a supplied signature silently. The aggregate checks
sum(a_i*(s_i*R_i-r_i*Q_i-z_i*G))=identity, drawing an independent coefficient
for every record. Full x(R) values above n remain valid and are reduced for r.
This format is not ordinary compact r||s, recoverable ECDSA, ECDSA_rec or HSS.
The existing public compact-to-explicit producer verifies an individual compact
signature; its work is fixture preparation, never an uncharged aggregate shortcut.
Every operation accepts 1..=500 records. BIP messages have local admission bounds of 1 MiB each and 16 MiB total. Malformed encoding is an error; a valid encoding with a false equation returns false. Public-only variable-time bucket MSM must never process private signing keys or other secret scalar material. The library forbids unsafe Rust and imports no allocator, ambient RNG, clock, IC API or persistence engine.
Coefficients and replicated execution
BIP340's primary batch specification fixes the first coefficient to one and prescribes CSPRNG coefficients seeded by a cryptographic hash of every input, recommending SHA256/ChaCha20 rejection sampling. The implementation defines a tagged SHA256 transcript with the record count, exact ordered key/signature bytes and length-framed messages. ChaCha20's nonce/counter start at zero; full 256-bit draws are accepted only in 1..n-1. At most sixteen candidates are tried per coefficient; exhaustion errors rather than selecting a fixed weight. Framing is this crate's seed-hash definition; coefficient bytes need not match an implementation using the BIP's illustrative unframed concatenation. Signature and challenge bytes remain standard BIP340.
The explicit-R control uses its own tagged domain, commits count and low-S policy, and length-tags every exact SEC1 key before its fixed digest/signature. It samples all N weights from the same full-field rejection sampler. This is a classical independently weighted equation with an experimental deterministic transcript policy; BIP340 does not standardize an ECDSA* coefficient derivation. No hash of only messages, fixed benchmark coefficient sequence, or sampled subset of records replaces a complete batch transcript.
For a fixed invalid prime-order batch, an independent uniform nonzero weight on a nonzero residual has at most one accepting value, giving the usual ideal per-attempt bound 1/(n-1). This argument does not make a new formal proof for a particular deterministic hash/PRG instantiation, repeated/adaptive queries or application authorization policy. Those assumptions remain explicit review items. Fixed/unit weights are unsafe: nonzero residuals can cancel. Tests construct modified-S and adversarial-public-key examples and check actual root individual verdicts before demonstrating aggregate rejection with bound coefficients.
The deterministic complete-transcript API gives replicas identical public
weights. It must not use OS entropy, replica-local time or timing. Separate
randomized APIs finish parsing and input commitment before obtaining 32 fresh
bytes from a caller CryptoRng + RngCore, then mix those bytes with the full
transcript under distinct domains. The trait cannot prove freshness. Inputs
must already be fixed when entropy is generated, and an adversary must not
adapt them after seeing weights. The benchmark calls only the deterministic
transcript APIs; deterministic synthetic key/message seeds are labeled test
fixtures and are not represented as fresh IC randomness.
Workspace, failures and benchmark boundaries
The crate provides independently authored unsigned Pippenger windows 2..8 and binary Straus with shared doublings. It reuses the existing pinned k256 public arithmetic, adding no curve arithmetic or signing scheme. For engineering comparison see libsecp256k1's primary MSM source; this is not a port of its GLV/signed-window implementation.
There are 2N+1 terms. Caller backing is
(2N+1)*(sizeof(Term)+32)+(2^w-1)*sizeof(ProjectivePoint) bytes for window w.
Native sizes are 176 bytes per term and 144 per point. N=100/window 5 uses
46,272 bytes; 100 verdict bools are additional. N=500/window 8 uses 244,928
backing bytes, or 245,428 with verdicts. Fixed stack is additional and remains
unmeasured. These numbers do not predict IC page admissions or cold-page fees.
All backing is supplied by the caller; benchmark setup allocates each Vec
directly rather than first forming a large stack array for Box::new.
The complete fallback APIs attempt one aggregate. On rejection or malformed records, they individually check every record with the selected MSM backend, fill all N verdicts and return exact completed-check counts. They do not sample or stop at the first failure. Worst case is one aggregate plus N singles, without a recursive tree or extra probabilistic subgroup tests. An accepted aggregate sets all verdicts true with its normal probabilistic soundness and performs zero singles. Count/message/workspace/randomness errors propagate; ignore outputs on Err. Public scratch after failure is overwritten on the next validated operation; nothing is cached or persisted between batches.
The adapter registers sixteen cases: per family,
one fastest-root fresh individual control; aggregate windows 4/5/6/7 and binary
Straus; complete fallback with window 5 or Straus. Root schnorr_verify and the
existing explicit-R individual verifier are the performance baselines, rather
than the slower single-record prototype MSM path. Fallback cost intentionally
includes its selected-MSM individual path and is not relabeled a fastest fallback.
Raw fixtures are staged in separate setup. Signing and verified conversion are
setup work. No validated point, signature object or public table is retained.
Every timed invocation constructs borrowed item descriptors and freshly parses
all public keys/R/signature scalars. The common descriptor Vec allocation is
inside the timer for aggregate and individual controls: native N=100 uses 4,800
payload bytes, excluding Vec/allocator metadata. Scratch/output Vecs are staged;
no hidden parsed-input or coefficient cache is used. Complete result booleans,
fallback reports and all individual verdicts are black-boxed and checked after
timing against exact root answers. operations_per_run() returns N, so one
cohort executes once per driver call rather than N times.
Fixtures match the existing secp adapter's hash-seed key/message recipe.
distinct changes signer population, while messages remain indexed by row.
Invalid/mixed rows retain valid ranges/encodings: BIP changes message bytes (or
canonical S for an empty message), and ECDSA changes the digest. They execute
the full aggregate equation. Malformed inputs remain separate vector tests.
Primary N=100 and diagnostic 1/8/32/128/500 have no extrapolated cost claims.
HSS-rand source boundary and precursor review
ePrint 2026/663 is the April 2026 preprint Batch Verification of Modified ECDSA Signatures by Paksoy, ElSheikh, Cenk and Hasan. Its landing page reports CPU experiments for ECDSA_ast/rec, including a 30.9% improvement for one secp256k1 batch 32 configuration. That is not an IC prediction. The full PDF returned a Cloudflare CAPTCHA challenge in this environment; no challenge was bypassed. The exact 2026 signature encodings, HSS-rand algorithm, failure-identification policy and author source link remain unverified. An inspected public author account exposed the 2025 EdDSA precursor code; that observation does not establish absence of 2026 code. No algorithm is inferred from the abstract, and no prototype is relabeled HSS-rand.
The accessible TCHES2025 precursor
and author implementation at f55c2569
use one full-size U and half-EEA pairs with
rho_i = tau_i*h_i/U (mod l). These dependent weights must not inherit the
ordinary independent-weight soundness argument or a guarantee from average
scalar length. Substituting a transcript hash for U does not settle that issue.
A concrete concern applies to those 2025 equations: duplicate a valid (R,A,m,s), then change s to s+delta and s-delta with both values canonical. Their common challenge h excludes s, so every common U gives the same tau to both entries. Their nonzero residuals are opposites and cancel. Two genuine records can be added to reach the author's aggregate path above size three. Complete altered-transcript binding of U does not change equal h inputs yielding equal tau. The local public-integer reproducer follows Algorithm 4 and retains 128 tested-U results, including transcript-bound choices, using RFC8032's first published signature as a public input. It is an algebraic review tool, not an Ed25519 verifier, a security proof or a test of the inaccessible 2026 construction. The finding must not be generalized to 2026/663, or patched by deduplication and then called secure without examining the exact algorithm and threat model.
Standard compact ECDSA methods
ePrint 2012/582 confirms a symbolic standard-ECDSA randomization paper; its exact PDF was inaccessible. Accessible primary follow-ups were downloaded from the authors: SPACE2014 randomization, ACNS2014 summation polynomials, and Karati's thesis. Numeric square roots, Montgomery x-only randomization and Joye seminumeric coordinates feed symbolic/elimination or summation-polynomial checks. Genuine standard-compact batching therefore exists, but these methods have exponential time/space and were useful for roughly 7–10 records in the authors' experiments. A direct N=100 port is unsuitable; bounded small sub-batches require separate implementation and measurements. ACNS2014 section 2.1 explicitly ignores rare x(R)>=n representations, which a strict secp256k1 implementation must handle. No author GP/PARI code or strict-vector-complete compact port was verified here.
Native validation and provenance
The isolated native integration harness passes seventeen tests: fourteen core vector/MSM/parsing/coefficient/cancellation tests and three tests compiling the actual new main crate and benchmark adapter. All sixteen cases pass primary N=100 valid/invalid/mixed with both signer populations. Driver and complete fallback coverage includes 1/8/32/100/128/500 and empty-message invalid fixtures. Core fixtures include all nineteen official BIP vectors, all 306 independent ECDSA producer verdicts, both S policies and four valid x>=n equations. Existing upstream k256 lint warnings were retained, not suppressed.
Package provenance records source pins, vector and paper hashes, imported prototype hashes, licenses and native evidence. Source reviews and native correctness are distinct from a canonical Wasm64 build, compiled side-channel/stack assessment, application authorization policy and actual IC measurement. None of those uncompleted qualifications is implied.