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>>>where
U: PackScalar<F> + PackScalar<FA> + PackScalar<FI> + PackScalar<FE> + PackScalar<BinaryField8b> + Divisible<u8>,
F: Field,
FA: Field,
FI: Field + ExtensionField<BinaryField8b> + ExtensionField<F> + Sync,
FE: BinaryField + ExtensionField<F>,
LC: LinearCode<P = PackedType<U, FA>>,
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>>>where
U: PackScalar<F> + PackScalar<FA> + PackScalar<FI> + PackScalar<FE> + PackScalar<BinaryField8b> + Divisible<u8>,
F: Field,
FA: Field,
FI: Field + ExtensionField<BinaryField8b> + ExtensionField<F> + Sync,
FE: BinaryField + ExtensionField<F>,
LC: LinearCode<P = PackedType<U, FA>>,
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>,
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§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>,
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>,
sourcepub fn new(
log_rows: usize,
code: LC,
n_test_queries: usize,
vcs: VCS,
) -> Result<Self, Error>
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,
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§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,
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§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,
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,
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>
fn verify_evaluation<CH, Backend>( &self, challenger: &mut CH, commitment: &Self::Commitment, query: &[FE], proof: Self::Proof, values: &[FE], backend: Backend, ) -> Result<(), Error>
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.
type Commitment = <VCS as VectorCommitScheme<<H as HashDigest<<U as PackScalar<FI>>::Packed>>::Digest>>::Commitment
type Committed = (Vec<DenseMatrix<<U as PackScalar<FI>>::Packed>>, <VCS as VectorCommitScheme<<H as HashDigest<<U as PackScalar<FI>>::Packed>>::Digest>>::Committed)
type Proof = Proof<U, FI, FE, <VCS as VectorCommitScheme<<H as HashDigest<<U as PackScalar<FI>>::Packed>>::Digest>>::Proof>
type Error = Error
fn n_vars(&self) -> usize
source§fn commit<Data>(
&self,
polys: &[MultilinearExtension<PackedType<U, F>, Data>],
) -> Result<(Self::Commitment, Self::Committed), Error>
fn commit<Data>( &self, polys: &[MultilinearExtension<PackedType<U, F>, Data>], ) -> Result<(Self::Commitment, Self::Committed), Error>
Commit to a batch of polynomials
source§fn proof_size(&self, n_polys: usize) -> usize
fn proof_size(&self, n_polys: usize) -> usize
Return the byte-size of a proof.
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>where
<FE as WithUnderlier>::Underlier: Sized,
<FI as WithUnderlier>::Underlier: Sized,
<FA as WithUnderlier>::Underlier: Sized,
<F as WithUnderlier>::Underlier: Sized,
LC: Freeze,
VCS: Freeze,
impl<U, F, FA, FI, FE, LC, H, VCS> RefUnwindSafe 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: RefUnwindSafe,
VCS: RefUnwindSafe,
U: RefUnwindSafe,
F: RefUnwindSafe,
FA: RefUnwindSafe,
FI: RefUnwindSafe,
H: RefUnwindSafe,
FE: RefUnwindSafe,
impl<U, F, FA, FI, FE, LC, H, VCS> Send 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: Send,
VCS: Send,
H: Send,
impl<U, F, FA, FI, FE, LC, H, VCS> Sync 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: Sync,
VCS: Sync,
H: Sync,
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>where
<FE as WithUnderlier>::Underlier: Sized,
<FI as WithUnderlier>::Underlier: Sized,
<FA as WithUnderlier>::Underlier: Sized,
<F as WithUnderlier>::Underlier: Sized,
LC: UnwindSafe,
VCS: UnwindSafe,
U: UnwindSafe,
F: UnwindSafe,
FA: UnwindSafe,
FI: UnwindSafe,
H: UnwindSafe,
FE: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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