Struct tari_bulletproofs::PedersenGens
source · pub struct PedersenGens {
pub B: RistrettoPoint,
pub B_blinding: RistrettoPoint,
}
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:
B
: theristretto255
basepoint;B_blinding
: the result ofristretto255
SHA3-512 hash-to-group on inputB_bytes
.
Fields§
§B: RistrettoPoint
Base for the committed value
B_blinding: RistrettoPoint
Base for the blinding factor
Implementations§
source§impl PedersenGens
impl PedersenGens
sourcepub fn commit(&self, value: Scalar, blinding: Scalar) -> RistrettoPoint
pub fn commit(&self, value: Scalar, blinding: Scalar) -> RistrettoPoint
Creates a Pedersen commitment using the value scalar and a blinding factor.
Trait Implementations§
source§impl Clone for PedersenGens
impl Clone for PedersenGens
source§fn clone(&self) -> PedersenGens
fn clone(&self) -> PedersenGens
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 more