Struct sn_dbc::AmountSecrets[][src]

pub struct AmountSecrets {
    pub amount: Amount,
    pub blinding_factor: Scalar,
}
Expand description

Contains amount and Pedersen Commitment blinding factor which must be kept secret (encrypted) in the DBC.

Fields

amount: Amountblinding_factor: Scalar

Implementations

Convert to bytes

build AmountSecrets from fixed size byte array.

build AmountSecrets from byte array reference

generate a pedersen commitment

encrypt secrets to public_key producing Ciphertext

generate a random blinding factor

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

create AmountSecrets from an amount and a randomly generated blinding factor

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Decrypt AmountSecrets using threshold+1 DecryptionShares

This fn should be used when keys (SecretKeyShare) are distributed across multiple parties. In which case each party will need to call SecretKeyShare::decrypt_share() or decrypt_share_no_verify() to generate a DecryptionShare and one party will need to obtain/aggregate all the shares together somehow.

The type returned in the event of a conversion error.

Decrypt AmountSecrets ciphertext using threshold+1 SecretKeyShares

The type returned in the event of a conversion error.

Decrypt AmountSecrets ciphertext using a SecretKey

The type returned in the event of a conversion error.

Decrypt AmountSecrets ciphertext using a SecretKeySet

The type returned in the event of a conversion error.

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

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.