Per-call repeated-public-key folding
radix_certificate::prove_grouped and verify_grouped are explicit
experimental execution choices. Existing prove, verify, the exact independent
filter acceptance policy, proof format and transcript domains remain unchanged.
No previous-call state or trusted query result is consumed. The
qualification report
records complete-call costs and the optional checkpoint reconstruction.
Every original row is freshly validated before looking for equal keys. Grouping compares complete canonical public-X bytes after a bounded public hash probe; an inconsistent Y hint still fails its own row. The temporary hash table uses the caller's existing encoding scratch, and a fixed 500-entry u16 representative array survives subsequent MSM scratch writes. There is no library allocation. All-distinct batches execute the original MSM terms and schedules after that indexing pass. Repeated nonce and generator terms are not grouped.
For verification, the unchanged final ordered statement determines full-field batch weights and every original scalar k. The unchanged Fiat--Shamir seed and column-indexed hashes determine every r. Only after computing every original c_i=sum_j(r_jd_ij) are equal public bases folded. With original c_i<2^S and a group of q entries, its exact positive sum is less than q2^S, hence less than 2^(S+ceil(log2(q))). Current bounds S<=195 and q<=496 give at most 204 bits, strictly below the curve order. Eight-u32 integer addition checks carry, width and canonical conversion without modular reduction. The MSM width is at least the original S and expands to the largest actual group sum's bit length. This can preserve the original window count even for ten shared signatures: at b16,t128,W7, S=148 and the conservative group bound is152, while both plus the two guard bits occupy22 windows.
For production, the original k scalars must not be combined before digit decomposition: carries would change the W_j certificate. The candidate first extracts four original b-bit digits, then packs them into disjoint B-bit fields, where B=b+ceil(log2(q_max)). Equal-P fields are added exactly. Every field sum is below q_max2^b<=2^B, so no carry enters the next column. Four fields use at most441=164 bits, below the curve order. The existing generic four-column SIMD kernel reads these fields as four B-bit digits and returns the original four W_j sums. No SIMD kernel change is needed. R and G retain their original digit values in padded fields. Normalization and canonical proof encoding are shared with the existing producer.
The larger B may add a top group. Most ordinary terms have zero high digits in
that group, but extra scans, bucket reductions and point doublings still count.
The public producer policy folds only when (N+unique_keys+1)*ceil((B+2)/W) is
strictly smaller than (2*N+1)*ceil((b+2)/W). In particular, at b16,W6 the
91-unique-key workload retains the original producer schedule, while ten groups
of ten use folding. This is a conservative work estimate, not measured cost.
The qualification measures query and update separately with the same proof
schema and per-call validation coverage, including indexing and stack/page
overhead on the all-distinct control.
Native tests cover ten same-key signatures, ten plus ninety distinct signatures, ten groups of ten, all-distinct control, noncontiguous/reordered groups, all six protocol settings, exact 204-bit sums, maximal packed digits, hash collisions, zero/opposite/identity arithmetic and inconsistent duplicate hints. The original Fiat--Shamir and outer batch security assumptions remain separate and unaudited.