Skip to main content

BooleanMultilinearPcs

Trait BooleanMultilinearPcs 

Source
pub trait BooleanMultilinearPcs<EF, Challenger>: BooleanBackend<EF> {
    // Required methods
    fn observe_commitment(
        &self,
        commitment: &Self::Commitment,
        challenger: &mut Challenger,
    );
    fn commit_bits<U: Underlier>(
        &self,
        bits: &[PackedGf2<U>],
        challenger: &mut Challenger,
    ) -> Result<(Self::Commitment, Self::ProverData), Self::Error>;
    fn open_readings(
        &self,
        prover_data: Self::ProverData,
        openings: &[BitOpening<EF>],
        challenger: &mut Challenger,
    ) -> Result<(Vec<BitReadings<EF>>, Self::Proof), Self::Error>;
    fn verify_readings(
        &self,
        commitment: &Self::Commitment,
        openings: &[BitOpening<EF>],
        readings: &[BitReadings<EF>],
        proof: &Self::Proof,
        challenger: &mut Challenger,
    ) -> Result<(), Self::Error>;
    fn readings_security(
        &self,
        num_claims: usize,
        successor_tensors: bool,
    ) -> Option<PrescribedOpeningSecurity>;
    fn open_at_points(
        &self,
        prover_data: Self::ProverData,
        points: &[Point<EF>],
        challenger: &mut Challenger,
    ) -> Result<(Vec<EF>, Self::Proof), Self::Error>;
    fn verify_at_points(
        &self,
        commitment: &Self::Commitment,
        points: &[Point<EF>],
        values: &[EF],
        proof: &Self::Proof,
        challenger: &mut Challenger,
    ) -> Result<(), Self::Error>;
}
Expand description

A commitment to a function from the hypercube to {0, 1}.

The committed object is a bit witness. An opening answers for its multilinear extension at a point of the challenge field.

§What a proving system pays on top

A batched prover lends its trace back as a borrowed table of base-field cells.

A bit witness has none to lend, so an integration holds the table and packs at commit time.

The base field then has to be one the challenge field extends.

The narrowest such level of the tower is GF(2^8).

This scheme also draws its challenges from the field its own elements live in.

So one cell per bit at the full challenge width is what the borrow costs today.

Constraints would also run wider if the base field packed bit-sliced.

The packing trait forbids it, casting a packed value to an array of scalars unchanged.

Bit-slicing is a compression, not a reinterpretation.

Required Methods§

Source

fn observe_commitment( &self, commitment: &Self::Commitment, challenger: &mut Challenger, )

Bind a commitment into the transcript, as committing to one does.

A prover binds while producing its commitment, and a verifier never produces one.

Routing both sides through this call is what keeps the two sponges in step.

Source

fn commit_bits<U: Underlier>( &self, bits: &[PackedGf2<U>], challenger: &mut Challenger, ) -> Result<(Self::Commitment, Self::ProverData), Self::Error>

Commit to a bit witness supplied bit-sliced, lane j of block b being bit d*b + j.

§Errors

Returns an error unless the witness covers exactly the committed hypercube.

Source

fn open_readings( &self, prover_data: Self::ProverData, openings: &[BitOpening<EF>], challenger: &mut Challenger, ) -> Result<(Vec<BitReadings<EF>>, Self::Proof), Self::Error>

Open the bit witness with the readings every opening asks for, in one proof.

A reading is the witness at the point, or the witness one row further on.

§Errors

Returns an error on an opening this commitment refuses.

Source

fn verify_readings( &self, commitment: &Self::Commitment, openings: &[BitOpening<EF>], readings: &[BitReadings<EF>], proof: &Self::Proof, challenger: &mut Challenger, ) -> Result<(), Self::Error>

Check one proof against the readings it claims at every opening.

§Errors

Returns an error on a false reading, a failed reduction, or an unclosed claim.

Source

fn readings_security( &self, num_claims: usize, successor_tensors: bool, ) -> Option<PrescribedOpeningSecurity>

Every labelled algebraic error one opening of this many claims charges.

§Returns

Nothing when the commitment declines to price the schedule.

Source

fn open_at_points( &self, prover_data: Self::ProverData, points: &[Point<EF>], challenger: &mut Challenger, ) -> Result<(Vec<EF>, Self::Proof), Self::Error>

Open the multilinear extension at every point, in one proof.

No point needs prior transcript binding: each reduction binds its own.

§Returns

One value per point, in the order the points were supplied.

§Errors

Returns an error unless every point names the committed function’s variables.

Source

fn verify_at_points( &self, commitment: &Self::Commitment, points: &[Point<EF>], values: &[EF], proof: &Self::Proof, challenger: &mut Challenger, ) -> Result<(), Self::Error>

Check one proof against the values it claims at every point.

The commitment’s binding is the caller’s, replayed before this is reached.

§Errors

Returns an error if a claim, a reduction, the commitment or the fold fails.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<EF, Dft, MT, Challenger> BooleanMultilinearPcs<EF, Challenger> for BooleanWhirPcs<EF, Dft, MT, Challenger>
where EF: Field + TranscriptField + TowerLevel + Coordinates + Ord + Send + Sync + ChallengeField<EF>, Dft: WhirDomain<EF, EF>, MT: Mmcs<EF>, Challenger: FieldChallenger<EF> + GrindingChallenger<Witness = EF> + CanSampleUniformBits<EF> + CanObserve<MT::Commitment>,

Source§

impl<EF, MT, MX, Challenger> BooleanMultilinearPcs<EF, Challenger> for BooleanPcs<EF, MT, MX>
where EF: ChallengeField<EF> + EncodableLevel + TranscriptField + TowerLevel + FoldAlphabet<EF> + Coordinates, MT: Mmcs<EF>, MX: Mmcs<EF, Error = MT::Error>, Challenger: FieldChallenger<EF> + GrindingChallenger<Witness = EF> + CanSampleUniformBits<EF> + CanObserve<MT::Commitment> + CanObserve<MX::Commitment>,