Skip to main content

BooleanWhirPcs

Struct BooleanWhirPcs 

Source
pub struct BooleanWhirPcs<EF: Field, Dft, MT, Challenger> { /* private fields */ }
Expand description

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

The committed object is a bit witness.

An opening answers for its multilinear extension at a point of the challenge field.

Implementations§

Source§

impl<EF, Dft, MT, Challenger> BooleanWhirPcs<EF, Dft, MT, Challenger>
where EF: Field + TranscriptField + TowerLevel + Coordinates + Ord, Dft: WhirDomain<EF, EF>, MT: Mmcs<EF>,

Source

pub fn new( inner: BooleanWhirProver<EF, Dft, MT, Challenger>, num_variables: usize, ) -> Result<Self, BooleanWhirError>

Wrap a proximity argument as a commitment to a bit witness of this many variables.

§Errors

Returns an error unless one element can absorb the witness’s low coordinates.

Returns an error unless the schedule commits exactly the elements the packing holds.

Source

pub const fn num_variables(&self) -> usize

Variables the committed bit witness has, so 2^n bits in all.

Source

pub const fn committed_bytes(&self) -> usize

Bytes the commitment holds, which is one per eight bits of the witness.

Source§

impl<EF, Dft, MT, Challenger> 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

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

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

    commitment       the proximity argument's own budget, at the one surviving point
    reduction        one batched bit ring switch, batching its elements under one draw
    claim batching   the claims folded under powers of lambda

The terms are independent draws, so they compose by a union bound.

The reduction is charged over every candidate the commitment leaves open.

Its challenges are drawn before the proximity argument names one of them.

The count itself is forwarded untouched, because this is a link and not the end.

A caller stacking its own draw faces the same list the proximity argument left.

So it charges that draw over the same count.

Nothing here covers hash or transcript collisions, which the caller supplies.

§Returns

Nothing when the proximity argument declines to price the schedule.

Source

pub fn proof_shape( &self, num_claims: usize, successor_tensors: bool, ) -> ProofShape

The shape of every proof an opening of this many claims can produce.

It covers the reductions as well as the opening, so a ceiling graded against it binds both.

Source

pub fn open_readings( &self, prover_data: BooleanWhirData<EF, MT>, openings: &[BitOpening<EF>], challenger: &mut Challenger, ) -> Result<(Vec<BitReadings<EF>>, BooleanWhirProof<EF, MT>), BooleanWhirError>

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

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

§Returns

One set of readings per opening, in the order the openings were supplied.

§Errors

Before the transcript moves, an opening that names the wrong variables.

An opening asking for no reading, or stepping within more rows than the witness has.

Source

pub fn verify_readings( &self, commitment: &MT::Commitment, openings: &[BitOpening<EF>], readings: &[BitReadings<EF>], proof: &BooleanWhirProof<EF, MT>, challenger: &mut Challenger, ) -> Result<(), BooleanWhirError>

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

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

§Errors

Before the transcript moves, a refused opening or a reading count that disagrees.

After it, a false reading, a failed reduction, the commitment, or an unclosed claim.

Trait Implementations§

Source§

impl<EF, Dft, MT, Challenger> BooleanBackend<EF> for BooleanWhirPcs<EF, Dft, MT, Challenger>
where EF: Field + TranscriptField + TowerLevel + Coordinates + Ord + Send + Sync, Dft: WhirDomain<EF, EF>, MT: Mmcs<EF>,

Source§

type Commitment = <MT as Mmcs<EF>>::Commitment

Succinct binding commitment sent to the verifier.
Source§

type ProverData = WhirProverData<EF, EF, MT, SuffixProver<EF, EF>>

Prover-side data retained between committing and opening.
Source§

type Proof = BooleanWhirProof<EF, MT>

The proof one opening carries.
Source§

type Error = BooleanWhirError

Why a commitment or an opening was refused.
Source§

fn num_variables(&self) -> usize

Variables the committed bit witness has, so 2^n bits in all.
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§

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

Bind a commitment into the transcript, as committing to one does. Read more
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. Read more
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. Read more
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. Read more
Source§

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

Every labelled algebraic error one opening of this many claims charges. Read more
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. Read more
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. Read more

Auto Trait Implementations§

§

impl<EF, Dft, MT, Challenger> Freeze for BooleanWhirPcs<EF, Dft, MT, Challenger>
where WhirProver<EF, EF, Dft, MT, Challenger, SuffixProver<EF, EF>>: Freeze,

§

impl<EF, Dft, MT, Challenger> RefUnwindSafe for BooleanWhirPcs<EF, Dft, MT, Challenger>
where WhirProver<EF, EF, Dft, MT, Challenger, SuffixProver<EF, EF>>: RefUnwindSafe,

§

impl<EF, Dft, MT, Challenger> Send for BooleanWhirPcs<EF, Dft, MT, Challenger>
where WhirProver<EF, EF, Dft, MT, Challenger, SuffixProver<EF, EF>>: Send,

§

impl<EF, Dft, MT, Challenger> Sync for BooleanWhirPcs<EF, Dft, MT, Challenger>
where WhirProver<EF, EF, Dft, MT, Challenger, SuffixProver<EF, EF>>: Sync,

§

impl<EF, Dft, MT, Challenger> Unpin for BooleanWhirPcs<EF, Dft, MT, Challenger>
where WhirProver<EF, EF, Dft, MT, Challenger, SuffixProver<EF, EF>>: Unpin,

§

impl<EF, Dft, MT, Challenger> UnsafeUnpin for BooleanWhirPcs<EF, Dft, MT, Challenger>
where WhirProver<EF, EF, Dft, MT, Challenger, SuffixProver<EF, EF>>: UnsafeUnpin,

§

impl<EF, Dft, MT, Challenger> UnwindSafe for BooleanWhirPcs<EF, Dft, MT, Challenger>
where WhirProver<EF, EF, Dft, MT, Challenger, SuffixProver<EF, EF>>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more