proof-cat-core 0.1.0

Field-agnostic proof-system primitives (sumcheck, multilinear, Fiat-Shamir, Merkle) shared by proof-cat and stark-cat
Documentation
  • Coverage
  • 100%
    66 out of 66 items documented7 out of 41 items with examples
  • Size
  • Source code size: 70.54 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.13 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 6s Average build duration of successful builds.
  • all releases: 6s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • MavenRain

proof-cat-core

Field-agnostic proof-system primitives, factored out of proof-cat so that both PLONKish and STARK-flavored downstreams can share them without inheriting either constraint vocabulary.

What's in here

Module Purpose
[transcript] Functional Fiat-Shamir transcript over SHA-256
[commit::merkle] Hash-based vector commitment with leaf-index domain separation
[poly] MultilinearPoly<F> evaluation tables on {0,1}^n with partial evaluation
[sumcheck] Sumcheck prover and verifier for multilinear polynomial sums
[error] The shared [Error] enum

What's NOT in here

  • The Field and FieldBytes traits or any concrete prime field. Those live in field-cat.
  • The PLONKish constraint system (ConstraintSet, Expression, Wire). Those live in plonkish-cat.
  • The bridge from PLONKish constraints to sumcheck. That stays in proof-cat as its sole remaining responsibility.

Why a separate crate

Each of transcript, commit::merkle, poly, and sumcheck is independent of any particular constraint system. Lifting them out lets a STARK frontend (AIR + FRI + sumcheck, in a future stark-cat) consume them directly, without taking a transitive dependency on plonkish-cat's ConstraintSet / Expression / Wire vocabulary.

Quick start

use field_cat::F101;
use proof_cat_core::{MultilinearPoly, SumcheckClaim, Transcript, sumcheck_prove};

let poly = MultilinearPoly::from_evals(vec![
    F101::new(1), F101::new(2), F101::new(3), F101::new(4),
])?;
let claim = SumcheckClaim::new(poly, F101::new(10));

let (_proof, _challenges, _transcript) =
    sumcheck_prove(&claim, Transcript::new(b"example"))?;
# Ok::<(), proof_cat_core::Error>(())

Building

cargo build
cargo test
RUSTFLAGS="-D warnings" cargo clippy
cargo doc --no-deps --open

Conventions

See CLAUDE.md: functional, type-driven, hand-rolled Error enum, no unwrap, no as casts, no mut, no dyn, no loop/for, no path dependencies.

License

Licensed under either of:

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.