Skip to main content

Crate p3_challenger

Crate p3_challenger 

Source
Expand description

§p3-challenger

A Fiat–Shamir transcript and challenger framework, used to derive random challenges from an IOP’s transcript.

Key items:

  • CanObserve, CanSample, CanSampleBits, FieldChallenger — the observe/sample trait family
  • DuplexChallenger — sponge-based challenger over a cryptographic permutation
  • HashChallenger — challenger built from a generic hash function
  • MultiField32Challenger, SerializingChallenger32/64 — challengers bridging fields of different sizes
  • GrindingChallenger — proof-of-work witness generation and verification

Prover and verifier must observe and sample in the exact same order; every proof object is bound to the transcript before any challenge it influences is sampled.

Part of Plonky3, dual-licensed under MIT and Apache 2.0.

Structs§

DuplexChallenger
A generic duplex sponge challenger over a finite field, used for generating deterministic challenges from absorbed inputs.
HashChallenger
A generic challenger that uses a cryptographic hash function to generate challenges.
MultiField32Challenger
A challenger that samples in F: PrimeField32 while the transcript sponge lives in PF.
ResamplingError
Custom error raised when resampling is required for uniform bits but disabled via ErrorOnRejection strategy.
SerializingChallenger32
Given a challenger that can observe and sample bytes, produces a challenger that is able to sample and observe field elements of a PrimeField32.
SerializingChallenger64
Given a challenger that can observe and sample bytes, produces a challenger that is able to sample and observe field elements of a PrimeField64 field.

Traits§

CanFinalizeDigest
Extract a binding commitment to the full transcript state.
CanObserve
A generic trait for absorbing elements into the transcript.
CanSample
A trait for sampling challenge elements from the Fiat-Shamir transcript.
CanSampleBits
A trait for sampling random bitstrings from the Fiat-Shamir transcript.
CanSampleUniformBits
Uniform bit sampling interface.
FieldChallenger
A high-level trait combining observation and sampling over a finite field.
GrindingChallenger
Trait for challengers that support proof-of-work (PoW) grinding.
UniformGrindingChallenger
Trait for challengers that support proof-of-work (PoW) grinding with guaranteed uniformly sampled bits.
UniformSamplingField
Trait for fields that support uniform bit sampling optimizations