Cost accounting for Fiat-Shamir with aborts #
Exact per-query-class cost accounting for fsAbortSignLoop and
FiatShamirWithAbort.sign/verify. Each lemma characterises the weighted
query cost or the number of hash queries made by one signing/verification
invocation; the expected-value versions live in
FiatShamir.WithAbort.ExpectedCost.
A single signing attempt has query cost determined by its output: the returned commitment
w' is exactly the random-oracle query point.
The expected weighted query cost of one signing attempt is the expectation of the queried commitment cost over the attempt output distribution.
The retry loop makes weighted query cost at most n • w when each query costs at most w.
Signing makes weighted query cost at most maxAttempts • w when each query costs at most
w.
Unit-cost specialization: signing makes at most maxAttempts random-oracle queries.
Tail-sum formula for the expected number of signing queries in Fiat-Shamir with aborts.
The random variable on the right is the unit-cost query count of the signer. The event i < q
means that the signer performed at least i + 1 random-oracle queries, equivalently that the
(i + 1)-st signing attempt was reached. Since the signer performs at most maxAttempts
iterations, the infinite tail sum truncates to Finset.range maxAttempts.
Expected weighted query cost of signing is bounded by the worst-case maxAttempts • w
budget whenever every query costs at most w.
Unit-cost specialization: the expected number of signing queries is at most maxAttempts.