feat: replace rolling-hash transcript with Spongefish Fiat-Shamir#15
Open
shreyas-londhe wants to merge 3 commits intoa16z:mainfrom
Open
feat: replace rolling-hash transcript with Spongefish Fiat-Shamir#15shreyas-londhe wants to merge 3 commits intoa16z:mainfrom
shreyas-londhe wants to merge 3 commits intoa16z:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates Dory's Fiat-Shamir transcript from a custom Blake2b rolling-hash implementation to Spongefish 0.2.0-alpha's NARG transcript model.
Why: The old transcript required maintaining a separate
DoryProofstruct for serialization alongside the hash-based Fiat-Shamir state. Spongefish unifies these — the proof is the transcript. This eliminates an entire class of bugs where proof data could be absorbed into the hash in a different order than it appears in the serialized proof, and gives us domain separation for free via Spongefish'sDomainSeparator.What changed:
Vec<u8>) instead of a typedDoryProofstruct. Prover writes toProverState, verifier reads fromVerifierState.dory_domain_separator(sigma)dynamically builds the protocol's domain separator, declaring every absorb/squeeze operation upfront.expected_proof_size(sigma)enables anti-malleability — callers can reject proofs with unexpected length since Spongefish silently ignores trailing bytes.verify()now borrows&VerifierSetupinstead of taking ownership, avoiding expensive GT-element clones in batched verification.reduce_and_foldreturnResultinstead of panicking.blake2,digest,bincode,serdedependencies.Test plan