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

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

Constructor.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.