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>,
impl<EF, Dft, MT, Challenger> BooleanWhirPcs<EF, Dft, MT, Challenger>where
EF: Field + TranscriptField + TowerLevel + Coordinates + Ord,
Dft: WhirDomain<EF, EF>,
MT: Mmcs<EF>,
Sourcepub fn new(
inner: BooleanWhirProver<EF, Dft, MT, Challenger>,
num_variables: usize,
) -> Result<Self, BooleanWhirError>
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.
Sourcepub const fn num_variables(&self) -> usize
pub const fn num_variables(&self) -> usize
Variables the committed bit witness has, so 2^n bits in all.
Sourcepub const fn committed_bytes(&self) -> usize
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>,
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>,
Sourcepub fn readings_security(
&self,
num_claims: usize,
successor_tensors: bool,
) -> Option<PrescribedOpeningSecurity>
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 lambdaThe 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.
Sourcepub fn proof_shape(
&self,
num_claims: usize,
successor_tensors: bool,
) -> ProofShape
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.
Sourcepub fn open_readings(
&self,
prover_data: BooleanWhirData<EF, MT>,
openings: &[BitOpening<EF>],
challenger: &mut Challenger,
) -> Result<(Vec<BitReadings<EF>>, BooleanWhirProof<EF, MT>), BooleanWhirError>
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.
Sourcepub fn verify_readings(
&self,
commitment: &MT::Commitment,
openings: &[BitOpening<EF>],
readings: &[BitReadings<EF>],
proof: &BooleanWhirProof<EF, MT>,
challenger: &mut Challenger,
) -> Result<(), BooleanWhirError>
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>,
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
type Commitment = <MT as Mmcs<EF>>::Commitment
Source§type ProverData = WhirProverData<EF, EF, MT, SuffixProver<EF, EF>>
type ProverData = WhirProverData<EF, EF, MT, SuffixProver<EF, EF>>
Source§type Proof = BooleanWhirProof<EF, MT>
type Proof = BooleanWhirProof<EF, MT>
Source§type Error = BooleanWhirError
type Error = BooleanWhirError
Source§fn num_variables(&self) -> usize
fn num_variables(&self) -> usize
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>,
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,
)
fn observe_commitment( &self, commitment: &Self::Commitment, challenger: &mut Challenger, )
Source§fn commit_bits<U: Underlier>(
&self,
bits: &[PackedGf2<U>],
challenger: &mut Challenger,
) -> Result<(Self::Commitment, Self::ProverData), Self::Error>
fn commit_bits<U: Underlier>( &self, bits: &[PackedGf2<U>], challenger: &mut Challenger, ) -> Result<(Self::Commitment, Self::ProverData), Self::Error>
Source§fn open_readings(
&self,
prover_data: Self::ProverData,
openings: &[BitOpening<EF>],
challenger: &mut Challenger,
) -> Result<(Vec<BitReadings<EF>>, Self::Proof), Self::Error>
fn open_readings( &self, prover_data: Self::ProverData, openings: &[BitOpening<EF>], challenger: &mut Challenger, ) -> Result<(Vec<BitReadings<EF>>, Self::Proof), Self::Error>
Source§fn verify_readings(
&self,
commitment: &Self::Commitment,
openings: &[BitOpening<EF>],
readings: &[BitReadings<EF>],
proof: &Self::Proof,
challenger: &mut Challenger,
) -> Result<(), Self::Error>
fn verify_readings( &self, commitment: &Self::Commitment, openings: &[BitOpening<EF>], readings: &[BitReadings<EF>], proof: &Self::Proof, challenger: &mut Challenger, ) -> Result<(), Self::Error>
Source§fn readings_security(
&self,
num_claims: usize,
successor_tensors: bool,
) -> Option<PrescribedOpeningSecurity>
fn readings_security( &self, num_claims: usize, successor_tensors: bool, ) -> Option<PrescribedOpeningSecurity>
Source§fn open_at_points(
&self,
prover_data: Self::ProverData,
points: &[Point<EF>],
challenger: &mut Challenger,
) -> Result<(Vec<EF>, Self::Proof), Self::Error>
fn open_at_points( &self, prover_data: Self::ProverData, points: &[Point<EF>], challenger: &mut Challenger, ) -> Result<(Vec<EF>, Self::Proof), Self::Error>
Source§fn verify_at_points(
&self,
commitment: &Self::Commitment,
points: &[Point<EF>],
values: &[EF],
proof: &Self::Proof,
challenger: &mut Challenger,
) -> Result<(), Self::Error>
fn verify_at_points( &self, commitment: &Self::Commitment, points: &[Point<EF>], values: &[EF], proof: &Self::Proof, challenger: &mut Challenger, ) -> Result<(), Self::Error>
Auto Trait Implementations§
impl<EF, Dft, MT, Challenger> Freeze for BooleanWhirPcs<EF, Dft, MT, Challenger>
impl<EF, Dft, MT, Challenger> RefUnwindSafe for BooleanWhirPcs<EF, Dft, MT, Challenger>
impl<EF, Dft, MT, Challenger> Send for BooleanWhirPcs<EF, Dft, MT, Challenger>
impl<EF, Dft, MT, Challenger> Sync for BooleanWhirPcs<EF, Dft, MT, Challenger>
impl<EF, Dft, MT, Challenger> Unpin for BooleanWhirPcs<EF, Dft, MT, Challenger>
impl<EF, Dft, MT, Challenger> UnsafeUnpin for BooleanWhirPcs<EF, Dft, MT, Challenger>
impl<EF, Dft, MT, Challenger> UnwindSafe for BooleanWhirPcs<EF, Dft, MT, Challenger>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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