Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Transcript and instance binding

Akita replaces interactive verifier randomness with Fiat-Shamir challenges. Prover and verifier derive each challenge from the same public parameters and the same preceding messages. The transcript records that order.

For example, suppose two claimed values will be checked through . Both values must be fixed before the transcript produces . If a prover could choose afterward, it could cancel a chosen error in . This is why a transcript contract specifies both which bytes are absorbed and when each challenge is drawn.

The transcript layer

Production uses Spongefish v0.8.0 prover and verifier states through Jolt's jolt-transcript crate. The selected sponge is BLAKE2b or Keccak. Akita runs on a state it borrows, so it can run either on its own session or inside a caller's transcript.

A standalone proof builds its own state. The session identifier is derived with SHAKE128 from STANDALONE_SESSION_TAG, akita-pcs/standalone-session/v8 zero-padded to 32 bytes. The Spongefish instance is the caller's session bytes, as a u64 little-endian length word, the bytes, and zero padding to the next 8-byte word.

In both modes, Akita's first absorbs are its binding of the instance, made by bind_instance as one public message:

  1. Akita's protocol tag, akita-pcs/transcript/v8/sha3 zero-padded to 32 bytes (akita-pcs/transcript/v8/keccak when the application selects Keccak-256 digests). The tag names the protocol, its version and the digest hash. The version fixes the field challenge codec, the proof-of-work layout, the absorb layout and the sparse message codec, so changing any of them means a new version and changes every challenge. The tag does not name the sponge: a different sponge is a different hash, so it already changes every output.
  2. The canonical instance descriptor bytes, as a u64 little-endian length word, the bytes, and zero padding to the next word.

The tag has a fixed length and the descriptor carries its own length word, so the two cannot run into each other. Akita keeps a known-answer vector for each sponge.

Running inside a caller's transcript

A caller with its own Spongefish state, such as Jolt, passes that state to batched_prove_embedded or batched_verify_embedded. Akita's messages then go into the caller's argument string, and its challenges come from the caller's sponge. The standalone entries build a state and call the same embedded entries, so the two modes run the same code. On a fresh state with the same session, an embedded proof has the same bytes as a standalone one.

Akita absorbs its whole statement itself: the tag, the descriptor, each root commitment's digest, the opening points and the claimed values. Its soundness therefore does not depend on what the caller absorbed. The caller must:

  1. Pass a state over Akita's sponge. The entries take Akita's channel types, so a state over another sponge does not compile.
  2. On the verifier side, build its state so that the unread part of the argument string begins with Akita's proof when Akita starts.
  3. Bind each root commitment before any of its own challenges that depend on it. Absorbing the commitment's 32-byte digest is enough.
  4. Stop on any error from Akita, and after its own last message pass its state to PendingEof::check_eof.

Commitment digests

The root binds each commitment group by a 32-byte CommitmentDigest, not by its rows. The digest is the selected digest hash (SHA3-256, or Keccak-256 under keccak256-digests) of COMMITMENT_DIGEST_TAG, akita-pcs/commitment-digest/v8 zero-padded to 32 bytes, followed by the uncompressed serialization of the group: its profile, then its rows in canonical form. CommittedGroup computes the digest when it is built or decoded, and no path accepts a digest from outside. The verifier therefore hashes the same rows it later uses.

Changing a bound commitment means finding two groups with the same digest. For a 256-bit digest that costs about hash calls, which is the transcript target. The digest hash is the one that already hashes the descriptor, so the digest adds no new primitive. The digest covers the profile so that one absorb also fixes how the rows are read.

Every logical message or challenge has a fixed public diagnostic context record. Proof values use prover emission and verifier receipt, derived or public values use public messages, and verifier challenges use verifier messages. Field atoms are canonical. The one variable-size terminal payload carries a checked length atom before its body.

Positional, word-aligned absorbs

The sponge input carries no labels. The verifier knows the type and length of every message before it reads it, from the descriptor, the schedule, or the message's position, so a label would add bytes without binding anything.

Every absorb and every squeeze is also a whole number of 8-byte words. A message of odd length would leave every later message off a word boundary, and a verifier that processes the sponge in 64-bit lanes, such as one running inside another proof system, would pay for that at every step. The rules:

  • A group of proof atoms is one prover message. The proof carries the atoms with no padding, and the sponge absorbs them followed by zero bytes up to the next word. A group of 4-byte atoms of the 32-bit prime field is the case that pads.
  • A group of public values is one absorb, padded the same way.
  • A byte string whose length the verifier knows is absorbed as its bytes, then padding. The one bounded variable-length payload carries its length on the wire as a u32, and the sponge absorbs that length as one u64 word.
  • A nonce is canonical LEB128 in the proof and one u64 little-endian word in the sponge.

The padding never makes two different message sequences look the same: every pad count follows from a length the verifier already knows or has just read. The proof bytes are exactly those of an unpadded transcript; only the sponge input differs.

Field challenges

A field challenge message draws all of its elements from one squeeze. For a prime field with a -bit modulus , each candidate is little-endian bytes masked to bits. The squeeze is a whole number of words: for the 32-bit prime, whose candidates are 4 bytes, the candidate count rounds up to an even number, and the extra candidates only add spares. A candidate below is accepted; any other is skipped. An extension element takes its coordinates from consecutive accepted candidates. Accepted values are exactly uniform.

The squeeze has a fixed length that depends only on the field and the number of elements. It holds enough spare candidates that running out has probability at most . A message that runs out is an error for both parties, so the verifier rejects. The distance from uniform for the whole message is therefore at most , and the soundness argument charges at most per message. Drawing several challenges in one message shares that budget rather than paying it per element.

The codec covers the fields of every production configuration: the 128-bit prime field, the degree-2 tower over the 64-bit prime, and the degree-4 tower over the 32-bit prime. ChallengeCodec is a sealed trait, so a configuration whose field has no codec does not compile.

Rejecting a proof

A verifier failure poisons the Spongefish state. This covers malformed proof bytes, failed checks, and errors such as an oversized group record that the protocol code routes through ProofChannel::guard. Every later read and challenge draw fails, and the final end-of-proof check fails, even if a caller ignores the error that reported the first failure. Acceptance requires that end-of-proof check: the whole proof is consumed, nothing is left over, and the state is not poisoned.

The embedded verifier poisons the borrowed state on any error before it returns, and on success it returns a #[must_use] PendingEof instead of accepting. The caller finishes its own messages and then calls PendingEof::check_eof, which consumes the state and is the only way to obtain acceptance. The standalone verifier calls it right away.

Production absorbs and squeezes are positional. Context records and callsite labels are diagnostics and do not enter sponge bytes. The protocol tag, length-framed session, canonical instance descriptor, commitment digests, messages, and replay order do enter the cryptographic state. Renaming a diagnostic label therefore differs from changing any of those bound values.

Prover and verifier must execute the same sequence, including challenge lengths and canonical ordering within a batch. Equal proof objects alone do not establish that agreement.

Sparse fold challenges

A fold needs one sparse ring challenge for every (claim, live block) pair. Akita draws them in claim-major order: pair claim * num_live_blocks + block. Each commitment group gets one squeezed message, and the message decodes directly into that group's challenges.

Order within one fold

Each fold runs these steps, in order:

  1. The prover sends the fold-response nonce, and both sides absorb it as one word.
  2. The fold proof of work. When its bit count g is positive, the prover runs the sponge's grinding search and the verifier checks it. When g is zero nothing happens.
  3. For each commitment group, in canonical order, the transcript squeezes exactly the message length for that group.

No prover message lies between the proof of work and the last group message, so the work covers every group message of the fold. Nothing is absorbed between the groups either, so the group messages continue one squeeze run: each output byte is fresh and is read once.

A draw absorbs nothing about its challenge family because the verifier already knows all of it. The descriptor binds the schedule, and the schedule fixes each fold's ring dimension, coefficient counts, opening method and challenge-subring dimension, and operator-norm policy. The group index and the challenge counts follow from the group's position. The same transcript state therefore cannot reinterpret a message under another family or method. A few code constants are bound only by the protocol tag: the operator-norm rejection constants, the pool rates that set a message's length, and what the coefficient-packing domain means. Changing any of them requires a new protocol version. The nonce is absorbed once, before the proof of work, so a new fold-response nonce changes every group message.

Decoding one challenge

Suppose the challenge ring has dimension and a challenge has coefficients of magnitude 1 and of magnitude 2, with . The set of all such vectors, the shell , has

elements. The message is a whole number of 8-byte words, read as a little-endian bit stream over little-endian u64 words. Every challenge of a group occupies consecutive bits of that stream, and the bits after the last candidate are ignored. The decoder splits a challenge's bits into two fields:

  • the low bits are the signs. The output lists the magnitude-1 positions in ascending order, then the magnitude-2 positions in ascending order. Bit , least significant first, is the sign of output coefficient .
  • the next bits are a rank . Write with . The value names the magnitude-1 positions as a subset of 0..d, and names the magnitude-2 positions as a subset of the remaining positions.

A rank names a subset by colexicographic order: for from the subset size down to 1, take the largest with , emit position , and subtract from . Every binomial coefficient the decoder needs fits in 128 bits, and so does every field it reads. The map from to is a bijection.

Families without a norm filter. . Every -bit value is accepted, so the challenge set is the first elements of the shell in this order. A subset of the shell keeps everything the fold argument uses: the difference of two distinct challenges is still invertible, and every challenge has the same norms. The message holds exactly one -bit slot per challenge, padded to a word.

Families with operator-norm rejection. An L2 fold may require a challenge whose negacyclic convolution operator norm is below a scheduled threshold. The certificate for that threshold counts accepted elements of the whole shell, so these families decode over the whole shell: . A candidate whose rank is at least is rejected; an in-range candidate is accepted when the certified predicate accepts it. The first accepted candidates, in message order, are the challenges.

The message holds a fixed pool of candidates, sized so that an honest message runs out with negligible probability. If a message does run out, the verifier rejects and the honest prover tries the next fold-response nonce. Running out depends only on which candidates pass, never on the values of the accepted ones, so conditioned on not running out the challenges are independent and exactly uniform on the accepted set. The pool size therefore affects only completeness. Coefficient-packing folds use the L-infinity security route and reject an operator-norm policy.

Why the fold has a proof of work

Every Akita challenge message is priced so that one hash call buys at most about chance of breaking soundness. Fold extraction fails at a fixed transcript prefix with probability at most , where is the number of pairs in the fold and is the size of the smallest challenge set among its groups. With in the thousands at the first fold, one message would miss the target by up to 15 bits in the current catalogs. The proof of work restores it: the plan chooses the least with , so a fresh fold message costs about hash calls. The prover pays this once per fold-response attempt; the verifier pays one check per fold.

Operator-norm families price as 128, the size their certificate proves.

Implementation:

  • crates/akita-challenges/src/fold_draw.rs owns the one squeeze per group.
  • crates/akita-challenges/src/sampler/stream.rs defines message lengths, pool sizes and the decoder.
  • crates/akita-challenges/src/sampler/op_norm.rs checks the certified operator-norm predicate.
  • crates/akita-params/src/transcript_grinding.rs prices the fold proof of work as its own run kind, FoldChallengeWork.

AkitaInstanceDescriptor

Before replay, both parties construct an AkitaInstanceDescriptor from the validated public configuration. The shared transcript_instance_descriptor helper builds it, and bind_instance absorbs its canonical bytes right after the protocol tag.

The descriptor records the following identities:

SectionWhat it fixes
AlgebraBase modulus and field extension degrees
SetupDecomposition, SIS modulus profile, compression policy, setup seed digest, protocol feature flags
PlanSchedule selection and the effective schedule digest
GrindingThe ordered grinding plan and its wire contract
CallCommitment-group counts, polynomial counts, variable counts, opening-layout digest, and basis

Version 6 of the descriptor is word aligned. Every scalar field, including flags and small tags, is one u64 little-endian word; each 32-byte digest or modulus is its bare bytes; and each vector is a length word followed by one word per element. A word that its field cannot hold, or a flag word other than 0 or 1, is rejected.

Every digest inside the descriptor, such as the schedule, setup seed, grinding plan and opening-layout digests, is Jolt's digest hash: SHA3-256 by default. An application whose recursion guest checks the descriptor with Jolt's jolt-inlines-keccak256 inline selects Keccak-256 (the 0x01 pad byte) with the keccak256-digests feature, and the protocol tag names the selection, so a proof made under one never verifies under the other. The transcript sponge feature does not change the digest hash.

With the default features Akita uses FIPS 202 primitives only: SHA3-256 for digests, SHAKE128 for the session identifier and Keccak-f[1600] for the duplex sponge. Two swaps leave that set: transcript-blake2b runs the duplex over BLAKE2b, and keccak256-digests selects Keccak-256 digests. The Fiat-Shamir duplex itself is not a FIPS-approved mode.

The effective schedule includes the level geometry, payload modes, and each nonterminal RingRelationMode. Switching between quotient lifting and reduced evaluation changes the preamble before the ring-switch challenge . The verifier uses the selected mode and rejects a mismatch.

The descriptor fixes the interpretation of the call. Commitment digests, opening-point coordinates, and claimed values are absorbed during the protocol. Binding only the call's shape would not bind those values.

For example, two calls with identical shapes but different opening values have the same shape metadata. Their transcripts diverge when the claimed values are absorbed. Two calls that interpret identical commitment bytes under different schedules diverge at the descriptor.

Root and fold replay

At the root, the descriptor fixes the batch shape. Replay binds each group's commitment digest in canonical group order, each group's complete opening point, and the per-polynomial claimed values as public messages. The verifier checks each group's geometry when it builds the group, before its digest is absorbed.

A nonterminal fold then follows these dependencies:

  1. Prepare the opening claim. If evaluation trace over a proper extension requires extension-opening reduction, replay that reduction first.
  2. Absorb the complete opening payload, either compressed or raw , then draw the application claim-batching coefficients.
  3. Consume the fold-response nonce and draw the sparse fold challenges for each group.
  4. Absorb the next-witness binding as the prover sends it. It is a recursive commitment payload or, on the last edge, the terminal inner-image state. It is absorbed only there; the next level and the terminal use the received value without absorbing it again.
  5. Draw the ring-switch challenge , followed by the range and row points .
  6. Replay Stage 1 and Stage 2. Absorb each sumcheck round message before drawing its round challenge. Carry the resulting witness-opening claim to the successor.
  7. If the schedule offloads setup, replay Stage 3 and carry its separate setup-prefix opening alongside the witness opening.

This order makes the next witness binding independent of the random points that check its relations. The witness itself can remain prover-only until the terminal. Recursion explains what each binding commits to, and the sumcheck stages derive the carried claims.

A recursive successor uses the commitment and opening claim supplied by the previous fold. If a setup prefix is present, its group precedes the witness group. Neither party may reorder groups based on their payload contents.

Extension-opening reduction and terminal replay

Extension-opening reduction has an earlier batching step of its own. The prover first binds the incoming claimed values and reduction partials. The transcript then produces the tensor-mixing challenge and the early coefficients that batch the reduction claims. Every reduction sumcheck message precedes its round challenge.

The reduction's final claims are absorbed before the fold's complete opening payload. Only after that payload is bound does the application batching in step 2 occur. These two batching steps have different inputs and different challenge positions; they cannot reuse a challenge merely because both form linear combinations. The reduction chapter gives the full sequence.

At the terminal, the verifier checks that the response's inner images match the predecessor's binding. After any required extension-opening reduction, it absorbs the ring opening partials, consumes the fold-response nonce, and draws the sparse challenges. It then absorbs the remaining response and performs the direct checks. There is no outgoing commitment or replay of Stages 1 through 3.

The last block of the inner images and of the opening partials travels as a 32-byte digest instead of field atoms. Each digest is one 32-byte prover message directly after the fields it completes, so it is bound before the same challenges. The digest is the protocol tag's digest hash of a field-digest tag followed by the block's canonical field bytes, the hash that commitment digests use. The verifier recomputes the block and checks the digest, as terminal verification describes.

Grinding plan and inline nonces

Each proof has one public GrindingPlan, derived from the selected schedule, normalized opening layout, field tower, and policy. The plan fixes the order and bit width of every proof-of-work query and bounded fold-response search. Its digest is part of the descriptor.

Nonzero proof-of-work sites and every fold-response site carry an inline canonical unsigned LEB128 nonce at the exact protocol position where it is used. A decoder does not obtain a nonce count or policy from proof bytes. The plan cursor checks sites in order. VerifierGrinding::finish rejects a cursor that is not exhausted, before it returns the PendingEof that the end-of-proof check spends.

The planner accepts only complete schedules whose expanded grinding query count is less than u32::MAX. If the objective-best candidate exceeds that capacity, planning treats it as an infeasible path and continues among schedules admitted by the planner's existing bounded candidate-generation policies. UnsupportedSchedule means that no feasible schedule was found within this domain; it does not prove that no mathematically valid schedule exists among layouts discarded by those policies.

Proof-of-work and fold-response nonces use distinct message kinds and serve different purposes.

Protected challenge queries

Each field challenge site has a loss . The security argument allows at most of the possible challenge values to be bad for the verifier, so one attempt at the challenge lands on a bad value with probability at most . The next subsection shows where a loss comes from for one family of sites.

Grinding makes each attempt cost hash queries on average. The plan chooses the least nonnegative integer with , which keeps the chance per query at most . The calculation uses integers and the actual prime power, including the deficit below a power of two.

At a protected query with grinding target , the prover searches for the least nonce below that passes. Each attempt absorbs the nonce value as one u64 little-endian word, then squeezes 8 check bytes. The attempt passes when the low bits of those bytes, read little endian, are zero. The proof carries the nonce as canonical LEB128. Diagnostic metadata records the grinding site without changing the sponge. The search and check are Jolt's grind and check_grind; the largest target either accepts is 57 bits, so every nonce below fits a u64.

The verifier repeats the check. Only after it passes does replay draw the protocol challenge, in one message, from the advanced transcript. The check bytes are not reused as the challenge. Each protected site grinds once, even when its message holds several challenges. A zero-bit target consumes no proof bits and leaves the transcript unchanged at that site.

The additional seven nonce bits provide room for honest search beyond the expected attempts. Storage is self-delimiting and canonical; the semantic width is still checked from the public plan. Schedule selection adds the per-message maxima, ceil(semantic_nonce_width / 7). This deterministic cost is not the realized LEB128 wire size. The verifier safety bound is derived separately from the complete grammar.

The loss of a claim-batching challenge

The problem. A fold often opens several polynomials at once. The prover states claimed values , one per polynomial, and the verifier checks them together instead of one at a time. It draws coefficients from , one fresh value per claim, and the rest of the fold proves the single combined claim . The question is how many bad values this draw has, that is, what loss to price it at.

The tempting answer, . Write for the true value of the th polynomial and for the error in its claim. The combined claim is correct exactly when . If some is nonzero and the errors are fixed before the coefficients are drawn, this is one nonzero linear equation in the , and a random draw satisfies it with probability at most . That suggests .

Why the security argument cannot use it. Knowledge soundness is proved with an extractor: a procedure that reruns a prover that makes the verifier accept and recovers the committed polynomials from its answers. The true values are evaluations of those recovered polynomials, and the extractor only obtains them from the part of the proof that comes after this challenge. Commitment binding does not help. It says an efficient prover cannot produce two different openings of one commitment; it does not hand the argument a single opening, and hence fixed errors , before the coefficients are drawn. So the argument must work from accepting runs alone.

What the extractor does. It reruns the prover from this challenge with coefficient vectors: a base vector , and for each a vector that differs from only in coordinate . The claims were sent before the challenge, so they are the same in every run. Every run also opens the same committed polynomials, or the extractor has found a commitment collision, so every run has the same errors . The base run gives , and run gives the same sum with replaced by . Subtracting the two leaves , so .

For example, with the extractor uses three runs, with coefficient vectors , and where and . The first two runs give , and the first and third give . Both claims are therefore correct.

The resulting loss. The extractor fails only if, for some coordinate , the prover succeeds with one value of and with no other value, the other coordinates held fixed. That costs at most one bad value per coordinate, in all, so the site has loss . Other sites in Akita batch claims with powers of one scalar. That check is a nonzero polynomial of degree at most in , so those sites have loss .

In the production field, is slightly below . One polynomial draws no coefficients and has no site. Nine polynomials give , and lies between 8 and 16, so the site needs , where would give .

Two sites have this form: the evaluation batch of each fold, and the batch of reduction claims in extension-opening reduction. independent_batch_loss_factor in akita-types prices both. The grinding nonce specification records the contract.

A fold-response entry carries a canonical unsigned LEB128 nonce whose value must fit the 12-bit search domain, shared by all commitment groups in that fold. The prover previews candidates until the resulting response satisfies the scheduled representation and norm bounds. It commits the winning nonce to replay, or returns an error if the bounded search is exhausted.

The verifier reconstructs the challenges for that nonce and enforces the response bounds. This is separate from the proof-of-work check. The PCS binding chapter explains why adversarial nonce trials must be included in random-oracle query accounting.

Integration and regression checks

AKITA_INSTANCE_DESCRIPTOR_VERSION is currently 6. Validation rejects other versions. Pin an exact Akita revision and rerun prove and verify integration tests when upgrading; the repository does not promise compatibility across revisions.

Binding an instance absorbs the protocol tag and the descriptor where Akita starts; it does not reset the state. On a standalone session it is the first absorb. Inside a caller's transcript, everything the caller absorbed before stays bound, and Akita's challenges depend on it. Application code should let the scheme's shared binding path construct the descriptor rather than absorb its own copy, and should not absorb Akita's statement again.

The current descriptor's SetupSection.protocol_features.zk is false. Transcript binding does not add hiding or zero knowledge.

The protocol uses a descriptor-bound positional grammar. Context records capture semantic sites and widths for logging diagnostics without adding production hashing work. Tests cover prover/verifier vectors, tampering, truncation, statement/session binding, and EOF; they do not freeze one proof-byte digest for all future schedules. The grinding grammar and nonce encoding are documented in specs/transcript-grinding.md and specs/grinding-nonce-encoding.md.

Code map

  • crates/akita-config/src/transcript_binding.rs constructs and binds the shared descriptor and grinding plan.
  • crates/akita-types/src/instance_descriptor/mod.rs owns descriptor fields, canonical serialization, and version validation.
  • crates/akita-transcript/src/proof_stream.rs owns state construction, context framing, canonical atom codecs, bounded bytes, and EOF-compatible proof transport. Field challenges and proof of work come from jolt-transcript; crates/akita-transcript/src/grinding.rs records the parts of that proof-of-work format the grinding plan binds.
  • crates/akita-params/src/transcript_grinding/plan.rs defines the ordered plan; crates/akita-types/src/transcript_grinding/replay.rs couples nonce transport, proof-of-work checks, challenges, and plan progress.
  • crates/akita-challenges/src/sampler/stream.rs decodes each group's sparse challenge message.
  • crates/akita-verifier/src/fold/mod.rs and crates/akita-verifier/src/fold/terminal.rs enforce fold and terminal replay order.
  • crates/akita-pcs/tests/transcript_hardening.rs tests ordering and prover/verifier agreement; crates/akita-pcs/tests/fold_linf.rs covers fold-response nonce behavior and proof roundtrips.

The detailed grinding contract is recorded in the transcript grinding specification.