pub struct PedersenGens<P: Compressable> {
pub h_base: P,
pub h_base_compressed: P::Compressed,
pub g_base_vec: Vec<P>,
pub g_base_compressed_vec: Vec<P::Compressed>,
pub extension_degree: ExtensionDegree,
}
Expand description
Represents a pair of base points for Pedersen commitments
The Bulletproofs implementation and API is designed to support pluggable bases for Pedersen commitments, so that the choice of bases is not hard-coded.
The default generators are:
h_base
: the curve basepoint;g_base_vec
: the result of domain separated SHA3-512 (hash of unique indexed strings) hash-to-group on inputB_bytes
.
Fields§
§h_base: P
Base for the committed value
h_base_compressed: P::Compressed
Compressed base for the committed value
g_base_vec: Vec<P>
Base for the blinding factor vector
g_base_compressed_vec: Vec<P::Compressed>
Compressed base for the blinding factor vector
extension_degree: ExtensionDegree
Blinding factor extension degree
Implementations§
source§impl<P> PedersenGens<P>where
P: Compressable,
impl<P> PedersenGens<P>where P: Compressable,
sourcepub fn h_base_compressed(&self) -> P::Compressed
pub fn h_base_compressed(&self) -> P::Compressed
Returns the non-public value compressed base point
source§impl<P> PedersenGens<P>where
P: Compressable + MultiscalarMul<Point = P> + Clone,
impl<P> PedersenGens<P>where P: Compressable + MultiscalarMul<Point = P> + Clone,
Trait Implementations§
source§impl<P: Clone + Compressable> Clone for PedersenGens<P>where
P::Compressed: Clone,
impl<P: Clone + Compressable> Clone for PedersenGens<P>where P::Compressed: Clone,
source§fn clone(&self) -> PedersenGens<P>
fn clone(&self) -> PedersenGens<P>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<P: Debug + Compressable> Debug for PedersenGens<P>where
P::Compressed: Debug,
impl<P: Debug + Compressable> Debug for PedersenGens<P>where P::Compressed: Debug,
source§impl<P: PartialEq + Compressable> PartialEq<PedersenGens<P>> for PedersenGens<P>where
P::Compressed: PartialEq,
impl<P: PartialEq + Compressable> PartialEq<PedersenGens<P>> for PedersenGens<P>where P::Compressed: PartialEq,
source§fn eq(&self, other: &PedersenGens<P>) -> bool
fn eq(&self, other: &PedersenGens<P>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<P: Compressable> StructuralPartialEq for PedersenGens<P>
Auto Trait Implementations§
impl<P> RefUnwindSafe for PedersenGens<P>where P: RefUnwindSafe, <P as Compressable>::Compressed: RefUnwindSafe,
impl<P> Send for PedersenGens<P>where P: Send, <P as Compressable>::Compressed: Send,
impl<P> Sync for PedersenGens<P>where P: Sync, <P as Compressable>::Compressed: Sync,
impl<P> Unpin for PedersenGens<P>where P: Unpin, <P as Compressable>::Compressed: Unpin,
impl<P> UnwindSafe for PedersenGens<P>where P: UnwindSafe, <P as Compressable>::Compressed: 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