binius_core::poly_commit::tensor_pcs

Struct TensorPCS

source
pub struct TensorPCS<U, F, FA, FI, FE, LC, H, VCS>
where U: PackScalar<F> + PackScalar<FA> + PackScalar<FI> + PackScalar<FE>, F: Field, FA: Field, FI: Field, FE: Field, LC: LinearCode<P = PackedType<U, FA>>, H: HashDigest<PackedType<U, FI>>, VCS: VectorCommitScheme<H::Digest>,
{ /* private fields */ }
Expand description

The multilinear polynomial commitment scheme specified in DP23.

§Type Parameters

  • P: The base field type of committed elements.
  • PA: The field type of the encoding alphabet.
  • PI: The intermediate field type that base field elements are packed into.
  • PE: The extension field type used for cryptographic challenges.

Implementations§

source§

impl<U, F, FA, FI, FE, LC> TensorPCS<U, F, FA, FI, FE, LC, HasherDigest<PackedType<U, FI>, GroestlHasher<PackedType<U, FI>>>, MerkleTreeVCS<GroestlDigest<BinaryField8b>, GroestlDigest<BinaryField8b>, GroestlHasher<GroestlDigest<BinaryField8b>>, GroestlDigestCompression<BinaryField8b>>>

source

pub fn new_using_groestl_merkle_tree( log_rows: usize, code: LC, n_test_queries: usize, ) -> Result<Self, Error>

source§

impl<U, F, FA, FI, FE, LC, H, VCS> TensorPCS<U, F, FA, FI, FE, LC, H, VCS>
where U: PackScalar<F> + PackScalar<FA> + PackScalar<FI> + PackScalar<FE>, F: Field, FA: Field, FI: ExtensionField<F>, FE: ExtensionField<F>, LC: LinearCode<P = PackedType<U, FA>>, H: HashDigest<PackedType<U, FI>>, VCS: VectorCommitScheme<H::Digest>,

source

pub fn log_rows(&self) -> usize

The base-2 logarithm of the number of rows in the committed matrix.

source

pub fn log_cols(&self) -> usize

The base-2 logarithm of the number of columns in the pre-encoded matrix.

source§

impl<U, F, FA, FI, FE, LC, H, VCS> TensorPCS<U, F, FA, FI, FE, LC, H, VCS>
where U: PackScalar<F> + PackScalar<FA> + PackScalar<FI> + PackScalar<FE>, F: Field, FA: Field, FI: ExtensionField<F>, FE: ExtensionField<F> + BinaryField, LC: LinearCode<P = PackedType<U, FA>>, H: HashDigest<PackedType<U, FI>>, VCS: VectorCommitScheme<H::Digest>,

source

pub fn new( log_rows: usize, code: LC, n_test_queries: usize, vcs: VCS, ) -> Result<Self, Error>

Construct a TensorPCS.

The constructor checks the validity of the type arguments and constructor arguments.

Throws if the linear code block length is not a power of 2. Throws if the packing width does not divide the code dimension.

Trait Implementations§

source§

impl<U, F, FA, FI, FE, LC, H, VCS> Clone for TensorPCS<U, F, FA, FI, FE, LC, H, VCS>
where U: PackScalar<F> + PackScalar<FA> + PackScalar<FI> + PackScalar<FE> + Clone, F: Field + Clone, FA: Field + Clone, FI: Field + Clone, FE: Field + Clone, LC: LinearCode<P = PackedType<U, FA>> + Clone, H: HashDigest<PackedType<U, FI>> + Clone, VCS: VectorCommitScheme<H::Digest> + Clone,

source§

fn clone(&self) -> TensorPCS<U, F, FA, FI, FE, LC, H, VCS>

Returns a copy of the value. Read more
1.6.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<U, F, FA, FI, FE, LC, H, VCS> Debug for TensorPCS<U, F, FA, FI, FE, LC, H, VCS>
where U: PackScalar<F> + PackScalar<FA> + PackScalar<FI> + PackScalar<FE> + Debug, F: Field + Debug, FA: Field + Debug, FI: Field + Debug, FE: Field + Debug, LC: LinearCode<P = PackedType<U, FA>> + Debug, H: HashDigest<PackedType<U, FI>> + Debug, VCS: VectorCommitScheme<H::Digest> + Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<U, F, FA, FI, FE, LC, H, VCS> PolyCommitScheme<<U as PackScalar<F>>::Packed, FE> for TensorPCS<U, F, FA, FI, FE, LC, H, VCS>
where U: PackScalar<F> + PackScalar<FA> + PackScalar<FI, Packed: PackedFieldIndexable> + PackScalar<FE, Packed: PackedFieldIndexable>, F: Field, FA: Field, FI: ExtensionField<F> + ExtensionField<FA>, FE: ExtensionField<F> + ExtensionField<FI>, LC: LinearCode<P = PackedType<U, FA>> + Sync, H: HashDigest<PackedType<U, FI>> + Sync, H::Digest: Copy + Default + Send, VCS: VectorCommitScheme<H::Digest> + Sync,

source§

fn prove_evaluation<Data, CH, Backend>( &self, challenger: &mut CH, committed: &Self::Committed, polys: &[MultilinearExtension<PackedType<U, F>, Data>], query: &[FE], backend: Backend, ) -> Result<Self::Proof, Error>
where Data: Deref<Target = [PackedType<U, F>]> + Send + Sync, CH: CanObserve<FE> + CanSample<FE> + CanSampleBits<usize>, Backend: ComputationBackend,

Generate an evaluation proof at a random challenge point.

Follows the notation from Construction 4.6 in DP23.

Precondition: The queried point must already be observed by the challenger.

source§

fn verify_evaluation<CH, Backend>( &self, challenger: &mut CH, commitment: &Self::Commitment, query: &[FE], proof: Self::Proof, values: &[FE], backend: Backend, ) -> Result<(), Error>
where CH: CanObserve<FE> + CanSample<FE> + CanSampleBits<usize>, Backend: ComputationBackend,

Verify an evaluation proof at a random challenge point.

Follows the notation from Construction 4.6 in DP23.

Precondition: The queried point must already be observed by the challenger.

source§

type Commitment = <VCS as VectorCommitScheme<<H as HashDigest<<U as PackScalar<FI>>::Packed>>::Digest>>::Commitment

source§

type Committed = (Vec<DenseMatrix<<U as PackScalar<FI>>::Packed>>, <VCS as VectorCommitScheme<<H as HashDigest<<U as PackScalar<FI>>::Packed>>::Digest>>::Committed)

source§

type Proof = Proof<U, FI, FE, <VCS as VectorCommitScheme<<H as HashDigest<<U as PackScalar<FI>>::Packed>>::Digest>>::Proof>

source§

type Error = Error

source§

fn n_vars(&self) -> usize

source§

fn commit<Data>( &self, polys: &[MultilinearExtension<PackedType<U, F>, Data>], ) -> Result<(Self::Commitment, Self::Committed), Error>
where Data: Deref<Target = [PackedType<U, F>]> + Send + Sync,

Commit to a batch of polynomials
source§

fn proof_size(&self, n_polys: usize) -> usize

Return the byte-size of a proof.
source§

impl<U, F, FA, FI, FE, LC, H, VCS> Copy for TensorPCS<U, F, FA, FI, FE, LC, H, VCS>
where U: PackScalar<F> + PackScalar<FA> + PackScalar<FI> + PackScalar<FE> + Copy, F: Field + Copy, FA: Field + Copy, FI: Field + Copy, FE: Field + Copy, LC: LinearCode<P = PackedType<U, FA>> + Copy, H: HashDigest<PackedType<U, FI>> + Copy, VCS: VectorCommitScheme<H::Digest> + Copy,

Auto Trait Implementations§

§

impl<U, F, FA, FI, FE, LC, H, VCS> Freeze for TensorPCS<U, F, FA, FI, FE, LC, H, VCS>

§

impl<U, F, FA, FI, FE, LC, H, VCS> RefUnwindSafe for TensorPCS<U, F, FA, FI, FE, LC, H, VCS>

§

impl<U, F, FA, FI, FE, LC, H, VCS> Send for TensorPCS<U, F, FA, FI, FE, LC, H, VCS>

§

impl<U, F, FA, FI, FE, LC, H, VCS> Sync for TensorPCS<U, F, FA, FI, FE, LC, H, VCS>

§

impl<U, F, FA, FI, FE, LC, H, VCS> Unpin for TensorPCS<U, F, FA, FI, FE, LC, H, VCS>
where <FE as WithUnderlier>::Underlier: Sized, <FI as WithUnderlier>::Underlier: Sized, <FA as WithUnderlier>::Underlier: Sized, <F as WithUnderlier>::Underlier: Sized, LC: Unpin, VCS: Unpin, U: Unpin, F: Unpin, FA: Unpin, FI: Unpin, H: Unpin, FE: Unpin,

§

impl<U, F, FA, FI, FE, LC, H, VCS> UnwindSafe for TensorPCS<U, F, FA, FI, FE, LC, H, VCS>

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> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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