Struct secp256k1_zkp::CommitmentSecrets[][src]

pub struct CommitmentSecrets {
    pub value: u64,
    pub value_blinding_factor: Tweak,
    pub generator_blinding_factor: Tweak,
}

Represents all secret data involved in making a PedersenCommitment where one of the generators is blinded.

A Pedersen commitment of the form P = vT' + r'G can be expressed as vT + (vr + r')G if T' = T + rG with:

  • v = value
  • T being a public key generated from a [Tag]
  • r = generator_blinding_factor
  • r' = value_blinding_factor

Fields

value: u64

The value that is committed to.

value_blinding_factor: Tweak

The blinding factor used when committing to the value.

generator_blinding_factor: Tweak

The blinding factor used when producing the Generator that is necessary to commit to the value.

Implementations

impl CommitmentSecrets[src]

pub fn new(
    value: u64,
    value_blinding_factor: Tweak,
    generator_blinding_factor: Tweak
) -> Self
[src]

Constructor.

Trait Implementations

impl Debug for CommitmentSecrets[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.