Struct snarkvm_algorithms::commitment::bhp::BHPCommitment
source · [−]pub struct BHPCommitment<G: ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> {
pub bhp_crh: BHPCRH<G, NUM_WINDOWS, WINDOW_SIZE>,
pub random_base: Vec<G>,
}
Fields
bhp_crh: BHPCRH<G, NUM_WINDOWS, WINDOW_SIZE>
random_base: Vec<G>
Trait Implementations
sourceimpl<G: Clone + ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> Clone for BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G: Clone + ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> Clone for BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
sourcefn clone(&self) -> BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
fn clone(&self) -> BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<G: ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> CommitmentScheme for BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G: ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> CommitmentScheme for BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
type Output = <G::Affine as AffineCurve>::BaseField
type Parameters = (Arc<Vec<Vec<G>>>, Vec<G>)
type Randomness = G::ScalarField
fn setup(message: &str) -> Self
fn commit(
&self,
input: &[u8],
randomness: &Self::Randomness
) -> Result<Self::Output, CommitmentError>
fn parameters(&self) -> Self::Parameters
sourceimpl<G: Debug + ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> Debug for BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G: Debug + ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> Debug for BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
sourceimpl<G: ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> From<(Arc<Vec<Vec<G, Global>, Global>>, Vec<G, Global>)> for BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G: ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> From<(Arc<Vec<Vec<G, Global>, Global>>, Vec<G, Global>)> for BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
sourceimpl<G: ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> FromBytes for BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G: ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> FromBytes for BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
sourceimpl<G: PartialEq + ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> PartialEq<BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>> for BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G: PartialEq + ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> PartialEq<BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>> for BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
sourcefn eq(&self, other: &BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>) -> bool
fn eq(&self, other: &BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>) -> bool
fn ne(&self, other: &BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>) -> bool
This method tests for !=
.
sourceimpl<G: ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> ToBytes for BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G: ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> ToBytes for BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
sourceimpl<F: Field, G: ProjectiveCurve + ToConstraintField<F>, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> ToConstraintField<F> for BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<F: Field, G: ProjectiveCurve + ToConstraintField<F>, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> ToConstraintField<F> for BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
fn to_field_elements(&self) -> Result<Vec<F>, ConstraintFieldError>
impl<G: Eq + ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> Eq for BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G: ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> StructuralEq for BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G: ProjectiveCurve, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> StructuralPartialEq for BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
Auto Trait Implementations
impl<G, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> RefUnwindSafe for BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE> where
G: UnwindSafe + RefUnwindSafe,
impl<G, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> Send for BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> Sync for BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE>
impl<G, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> Unpin for BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE> where
G: Unpin,
impl<G, const NUM_WINDOWS: usize, const WINDOW_SIZE: usize> UnwindSafe for BHPCommitment<G, NUM_WINDOWS, WINDOW_SIZE> where
G: UnwindSafe + RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcepub fn equivalent(&self, key: &K) -> bool
pub fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more