Fresh incoming-key ECDSA benchmark
The primary ECDSA workload supplies 100 different people's public keys,
signatures and client inverse hints in one actual call. Use fresh-wire.mjs:
node benches/crypto/fresh-wire.mjs \
--artifact /absolute/fresh-wire-artifacts --out /absolute/new-fresh-results \
--pocket-ic /home/devbox/.local/bin/pocket-ic \
--batches 100 --populations many-keys-distinct \
--backends direct,native --encodings compressed,uncompressed \
--patterns valid,invalid,mixed --hints ordinary,hinted --samples 3 --profiles 0
The fresh_verify_ecdsa request contains a vector of records, each carrying its
complete SEC1 public key (33 or 65 bytes), digest, compact signature and optional
32-byte inverse. The endpoint calls a pure function with no root service,
generation, prepared-key query or stored verification state. No preparation
update is issued by this runner. Public-key parsing/validation and any native
table construction happen after its body counter starts. Temporary tables,
constant pools and call-local lookup structures are destroyed before the ending
counter; decoded request buffers and reply handling remain in the authoritative
whole-message total.
Backend direct uses the ordinary direct public GLV verification path, selecting
its checked hint API only when the actual request supplies a hint. Backend
native constructs and discards one native affine table for each record; it does
not retain 100 tables for placement. These are the primary comparisons. The
native-call-reuse diagnostic may reuse exact encoded keys only within this one
call; it reports every construction and reuse and still parses/checks every
signature and inverse. The native-jacobian, native-window8 and
native-constants diagnostics select existing checked-hint candidates, including
all fresh table/pool preparation inside the interval. The constants candidate
includes its source reads, allocation, copying and destruction; no page saving
is assumed. These three candidates require hints.
Default backends packed-gwindow8/10/12 are IDs12/13/14. Backend15 (G14) rejects unless the explicit isolated generator-window14 feature is compiled. They accept the identical
raw records and use the fresh packed Q5 factory with the interleaved
fixed public G prefixes described in GENERATOR-WIDE.md.
Every request allocates and drops a 100-row scratch workspace inside its body
timer, including N1/8/32 diagnostic companions; N>100 uses complete 100-row tiles.
batch_workspace_bytes reports that actual mutable scratch, excluding the
read-only G table. A tile admission error triggers fully timed checks of every
record with the same G width, including rows from already completed tiles.
Existing table/error/tile/fallback counters retain their meaning. Packet,
response and archived independent input corpus schemas are unchanged.
The default primary has 100 different public keys and messages/signatures. Select
--populations one-key-distinct,same-tuple for separate diagnostics. The host
generates independently signed OpenSSL inputs and verifies normalized low-S
signatures again before starting IC. It verifies that population labels match
the actual unique people/messages/signatures. --corpus PATH reuses exact
archived inputs across builds and performs the same independent checks; it
cannot silently relabel a repeated cohort as different people.
For 100 records, compressed-key ordinary/hinted Wire payloads are
13,203/16,403 bytes; uncompressed-key payloads are 16,403/19,603 bytes. All key
bytes arrive on every call, including repeated-key diagnostics. Native Serde
encoding of the maximum 500 full SEC1-65/hinted records visits 199 values per
record and four outer values. The 398,016-node allowance is exactly
4 * (500 * 199 + 4); a regression rejects one fewer node and roundtrips the
98,004-byte maximum-width packet. Allocation remains 4 MiB, bytes 128 KiB and
depth 16, with no SDK changes.
Every record receives a verdict/error; one bad key, invalid inverse or false
equation does not skip later records. Valid, expensive changed-digest invalid,
mixed and wrong-hint requests use the same supplied records. Matching controls
carry the identical full packet, with the explicit control flag changed; they
perform no cryptographic verification and remain separate diagnostic rows.
--profiles 1 captures fresh matched verify/control profiles for the first
selected row. Use separate narrow N100 and N1 runs with the same corpus for
page-origin analysis. No control or page cost is subtracted from reported totals.
This interface has native/host qualification until an exact prepared artifact
and real IC traces are recorded; staged or prior-key-cache results do not
establish its performance.
logical_operations counts visited records. A malformed key/signature, invalid
inverse or explicit control intentionally stops before that row's full point
equation; per-row verdicts/errors identify those paths. Fresh input keys also do
not guarantee cold allocator or input pages: Wire decoding and runtime metadata
can touch shared regions before the body counter. Complete endpoint profiles
establish the actual access/dirty fees.