Schnorr certificate round 4: less recoding, copying and hashing
The selected changes reduce complete 100-signature certificate updates by 3.4–3.9% against the R3 artifact. They preserve the original statement, proof bytes and challenge entropy. Queries still independently verify 105 signatures, reject five false equations and produce the accepted 100-record packet. Updates freshly check every input and the untrusted witness; no prior-call key, proof or verdict cache contributes. The protocol remains experimental, with independent cryptographic review still required.
All costs are whole-call instructions, including Wire, fresh preparation, cleanup, replies and page fees. Body, phase and page counters overlap and are not subtracted. Primary results have three identical samples per fixed statement. Each record retains its own 32B message, 64B signature, public-X32 and checked P/R-Y hints. Messages and nonces remain distinct when keys repeat. Parameters remain b16/t128, query W6 and a 1,924B complete proof.
| Public-key population | R3 update | Selected update | Reduction | Selected query | Update W |
|---|---|---|---|---|---|
| 100 distinct keys | 41,122,086 | 39,643,555 | 3.60% | 164,395,069 | 6 |
| Ten share one key + 90 other keys | 40,901,160 | 39,509,449 | 3.40% | 163,329,275 | 7 |
| Ten keys, ten signatures each | 31,803,607 | 30,578,851 | 3.85% | 140,246,064 | 6 |
| Ten shared-key signatures interleaved | 40,724,750 | 39,334,014 | 3.41% | 163,797,475 | 7 |
Query preparation falls by 0.87–1.01%. Every primary population also passed a byte-identical, independently host-produced packet on a second fresh canister with zero prior queries and exactly the table's update cost. Seven altered proof/statement cases reject for every population. Host elapsed times are local PocketIC diagnostics.
Thirteen additional fresh-canister replay checks use the four retained statements and nine independent seeded statements. An unmeasured noop precedes each update; no query or key preparation precedes it. Replaying the R3 artifact reproduces every archived instruction total exactly. The selected artifact reduces every replay by 1,219,646–1,478,531 instructions.
| Three additional seeds per population | R3 mean update | Selected mean update | Reduction |
|---|---|---|---|
| Distinct | 41,014,990.00 | 39,538,066.00 | 3.60% |
| Ten share one key | 40,597,052.00 | 39,210,120.33 | 3.42% |
| Ten groups of ten | 31,800,617.67 | 30,576,635.00 | 3.85% |
The 1,026B base proof remains available. Its selected distinct/lightly repeated/ ten-group updates cost 39,916,161 / 39,942,055 / 31,011,457. Checkpoints therefore save 272,606 / 432,606 / 432,606 update instructions, while adding 3,112,614 query instructions on each population. Their larger packet trades producer work for less replicated work.
Retained changes
- Exact coefficient arithmetic. For b≤28, a proved digit-sum bound allows u64 limb sums to defer carries until all columns have contributed. The wider b29–32 parameters retain checked carry propagation. The isolated complete-call comparison saves exactly 185,525 instructions in all thirteen replays.
- Byte recoding. Fitting bounded schedules store centered signed digits in the existing 33B encoding slots. Bucket loops read a digit directly. All coefficients, leading carry guards, terms and original scratch capacities remain intact; non-fitting schedules use the packed representation.
- In-place public XYZZ chains. Ordinary finite additions update their accumulator instead of returning a complete four-point value. Inactive masks, identity/equal/opposite cases and field bounds remain checked. Exceptional fallbacks can do extra arithmetic, so valid-workload gains are not a universal adversarial-input speed guarantee.
- Four-way standard challenge hashing. Complete groups of four message32 rows use the existing SHA-256 SIMD compressor from the exact BIP340 tag midstate. Padding, row order, scalar reduction and error precedence are fixed. Ragged groups and tails retain the scalar helper. No new hash or signature format is introduced.
- Producer reuse.
checkpoints::prove_groupedemits the complete witness while retaining its freshly computed columns within the call. It avoids decoding those same columns again. Checkpoint production keeps its dependent chain resident in SIMD storage; verification prepares each saved affine once. Publicextendandverifystill fully validate external encodings.
Compiled findings and rejected work
A correct field prescale rewrite passed independent integer and magnitude proofs
but lost after compilation. LLVM retained all 22 expensive i64x2.mul operations
per field multiply/square and added conversions. Each function gained 90 charged
instructions. The combined prototype cost 41,347,795; restoring the original
field source reduced it to 39,643,555. The measured 1,704,240 difference is
exactly 90 × (14,372 multiplies + 4,564 squares). The losing runtime code was
removed; its source experiment
is retained.
Matched distinct-key profiles show bulk-operation dynamic charges falling from 1,220,093 to 802,957. The repeated 951×656B chain-return copy site disappears; other copy sites remain. Field multiply/square bodies, invocation counts and self charges match R3 exactly after the rejection. Named scalar/SIMD SHA compressor self charges total 1,708,810 versus 2,246,885 before; these physical functions do not represent all hashing work.
The selected distinct checkpoint update pays 1,360,000 page instructions, 160,000 more than R3. Other primary checkpoint updates retain 1,200,000; all queries retain 1,280,000. The extra distinct-case access/dirty region is included in the results. Explicit vector backing remains 80,797B at W6 / 86,045B at W7; compiler frames, input/output buffers and allocator state are excluded, so these are not peak-memory figures.
Profiles reconcile complete charge/page ledgers with zero unexplained work and zero observer delta. Names come from each exact canonical Wasm name section. There is no DWARF/source-line attribution, and bounded stack details remain partial.
Qualification and source identities
Both coordinate feature gates pass 192 native package tests each (92 batch, 36 canister, 64 secp). Five explicit vendor XYZZ tests and 37 host tests pass. Independent source reviews cover carries, signed digits, masks, point formulas, scratch bounds, challenge vectors and checkpoint recurrences. The preserved failed attempts include a test-only ambiguous integer type and the initially unresolved new workspace dependency.
Matched N100 ordinary Schnorr controls preserve all independent verdicts and malformed-input handling. Independent calls are unchanged; aggregate valid/mixed calls increase by 800 instructions each, about 0.00082% / 0.00041%. Matched N100 direct and dense-SIMD ECDSA valid/mixed controls are unchanged. These are controls under the same XYZZ-enabled artifact, not replacements for the separately qualified ordinary Jacobian best-pick costs.
Selected runtime source is 0b3a569461a835d1f4d28416aa6ae12b8e5aa29a;
Wasm SHA256 is
a89924270e454e0ce252ef5a7361610b3f9d444ac4d859b647cffc937128b698.
PocketIC 16.1.0 remains pinned to
6a9a75ad9b4551d2b0f4a0d954ffb8bd5bbd0ebc44ac00290679b06ad0b2f8e6;
the SDK remains 33f54b62b46a6693ff6e193a752e052eaa124884.
No SDK, RRT or RRts runtime changed, and Heavy16 was not rerun.
The qualification packet retains matched results, exact packets, traces, profiles, source identities, rejected work and gate logs. Closed R3 source worktrees were retired after preserving their notes and Git refs; raw evidence and canonical artifacts remain.