pub struct MultilinearBrakedown<F: PrimeField, C: Config, P: MultilinearExtension<F>, H: CRHScheme> { /* private fields */ }
Expand description
The multilinear Brakedown polynomial commitment scheme based on [Brakedown]. The scheme defaults to the naive batching strategy.
Note: The scheme currently does not support hiding.
Trait Implementations§
Source§impl<F, C, P, H> LinearEncode<F, C, P, H> for MultilinearBrakedown<F, C, P, H>where
F: PrimeField,
C: Config,
P: MultilinearExtension<F>,
<P as Polynomial<F>>::Point: Into<Vec<F>>,
H: CRHScheme,
impl<F, C, P, H> LinearEncode<F, C, P, H> for MultilinearBrakedown<F, C, P, H>where
F: PrimeField,
C: Config,
P: MultilinearExtension<F>,
<P as Polynomial<F>>::Point: Into<Vec<F>>,
H: CRHScheme,
Source§fn tensor(
point: &<P as Polynomial<F>>::Point,
left_len: usize,
_right_len: usize,
) -> (Vec<F>, Vec<F>)
fn tensor( point: &<P as Polynomial<F>>::Point, left_len: usize, _right_len: usize, ) -> (Vec<F>, Vec<F>)
For a multilinear polynomial in n+m variables it returns a tuple for k={n,m}: ((1-z_1)(1-z_2)…(1_z_k), z_1(1-z_2)…(1-z_k), …, z_1z_2…*z_k)
Source§type LinCodePCParams = BrakedownPCParams<F, C, H>
type LinCodePCParams = BrakedownPCParams<F, C, H>
For schemes like Brakedown and Ligero, PCCommiiterKey and
PCVerifierKey and PCUniversalParams are all the same.
Source§fn setup<R: RngCore>(
_max_degree: usize,
num_vars: Option<usize>,
rng: &mut R,
leaf_hash_param: <<C as Config>::LeafHash as CRHScheme>::Parameters,
two_to_one_hash_param: <<C as Config>::TwoToOneHash as TwoToOneCRHScheme>::Parameters,
col_hash_params: H::Parameters,
) -> Self::LinCodePCParams
fn setup<R: RngCore>( _max_degree: usize, num_vars: Option<usize>, rng: &mut R, leaf_hash_param: <<C as Config>::LeafHash as CRHScheme>::Parameters, two_to_one_hash_param: <<C as Config>::TwoToOneHash as TwoToOneCRHScheme>::Parameters, col_hash_params: H::Parameters, ) -> Self::LinCodePCParams
Does a default setup for the PCS.
Source§fn encode(msg: &[F], pp: &Self::LinCodePCParams) -> Result<Vec<F>, Error>
fn encode(msg: &[F], pp: &Self::LinCodePCParams) -> Result<Vec<F>, Error>
Encode a message, which is interpreted as a vector of coefficients
of a polynomial of degree m - 1.
Source§fn poly_to_vec(polynomial: &P) -> Vec<F>
fn poly_to_vec(polynomial: &P) -> Vec<F>
Represent the polynomial as either coefficients,
in the univariate case, or evaluations over
the Boolean hypercube, in the multilinear case.
Source§fn point_to_vec(point: <P as Polynomial<F>>::Point) -> Vec<F>
fn point_to_vec(point: <P as Polynomial<F>>::Point) -> Vec<F>
Represent the query point as a vector of Field elements.
Source§fn compute_matrices(
polynomial: &P,
param: &Self::LinCodePCParams,
) -> (Matrix<F>, Matrix<F>)
fn compute_matrices( polynomial: &P, param: &Self::LinCodePCParams, ) -> (Matrix<F>, Matrix<F>)
Arrange the coefficients of the polynomial into a matrix,
and apply encoding to each row.
Returns the tuple (original_matrix, encoded_matrix).
Auto Trait Implementations§
impl<F, C, P, H> Freeze for MultilinearBrakedown<F, C, P, H>
impl<F, C, P, H> RefUnwindSafe for MultilinearBrakedown<F, C, P, H>
impl<F, C, P, H> Send for MultilinearBrakedown<F, C, P, H>
impl<F, C, P, H> Sync for MultilinearBrakedown<F, C, P, H>
impl<F, C, P, H> Unpin for MultilinearBrakedown<F, C, P, H>
impl<F, C, P, H> UnwindSafe for MultilinearBrakedown<F, C, P, H>
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
Mutably borrows from an owned value. Read more
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>
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 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>
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