OpenViSTAI · Agents · Blockchain · Crypto
Menu
ZK & Privacy

Spongefish

Spongefish is an open-source Rust library that implements permutation-agnostic duplex-sponge Fiat–Shamir protocols over bytes or prime fields, with APIs for interactive arguments, transcript codecs and related proof-system components.

Independent OpenViST project profile, based on linked sources.

Spongefish — OpenViST project profile in ZK & Privacy.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Spongefish when implementing a Rust proof protocol that needs duplex-sponge Fiat–Shamir transcripts, typed prover and verifier messages, or prime-field sumcheck support.

Who it is for

  • Rust cryptography developers
  • Zero-knowledge and SNARK engineers
  • Builders of prime-field sumcheck protocols
  • Teams integrating Fiat–Shamir transcript generation

Documented uses

  • Construct Fiat–Shamir transcripts from interactive arguments
  • Build a multilinear-polynomial sumcheck flow
  • Create byte-based or prime-field duplex-sponge layers
  • Add codec support for protocol messages and instances
  • Build permutation-based hash statements with circuit helpers
Before you choose

Requirements & limits

The repository is public, open source and licensed under Apache-2.0. The documented implementation is written in Rust and includes Linux, macOS, Windows and CLI platform classifications.

  • Rust is required for the documented library workflow.
  • Protocol values need suitable Encoding, NargDeserialize and Decoding implementations.
  • The core implementation follows the draft IRTF Fiat–Shamir specification.
  • The crate set separates core sponge APIs, circuit builders, derive macros and proof-of-work helpers.
  • Codec behavior matters: the example’s derived field codec permits non-canonical encodings, while stricter codecs are possible.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Set up a multilinear sumcheck argument

Define and compile an interactive sumcheck argument with Spongefish’s documented Rust pattern.

Before you start

  • Rust development environment
  • The spongefish crate
  • A field type implementing the required arithmetic and codec traits
  • An instance and witness representing the polynomial table

Steps

  1. Define the field representation and its arithmetic operations.

  2. Implement the Argument trait with instance, witness and output types.

  3. Use transcript prover messages, verifier challenges and verification checks inside run.

  4. Create a protocol tag, then call Narg::prove and Narg::verify with the instance and witness.

Expected outcome

A NARG proof and an evaluation returned by the documented sumcheck flow, with verification comparing against that evaluation.

Guide limitations

  • The example uses a Mersenne prime field of size 2^31 - 1.
  • The derived codec accepts non-canonical field-element encodings; stricter behavior requires hand-written codecs as shown by the integration test.
  • The verifier must consume the whole NARG string.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
3 October 2026
Original website title
arkworks-rs/spongefish · Official homepage title · retained in its source language