Struct sn_dbc::AmountSecrets [−][src]
Expand description
Contains amount and Pedersen Commitment blinding factor which must be kept secret (encrypted) in the DBC.
Fields
amount: Amountblinding_factor: ScalarImplementations
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
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
fn try_from(
params: (&PublicKeySet, &BTreeMap<I, DecryptionShare>, &Ciphertext)
) -> Result<Self, Error>
fn try_from(
params: (&PublicKeySet, &BTreeMap<I, DecryptionShare>, &Ciphertext)
) -> Result<Self, Error>
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.
fn try_from(
params: (&PublicKeySet, &BTreeMap<I, SecretKeyShare>, &Ciphertext)
) -> Result<Self, Error>
fn try_from(
params: (&PublicKeySet, &BTreeMap<I, SecretKeyShare>, &Ciphertext)
) -> Result<Self, Error>
Decrypt AmountSecrets ciphertext using threshold+1 SecretKeyShares
Decrypt AmountSecrets ciphertext using a SecretKeySet
Auto Trait Implementations
impl RefUnwindSafe for AmountSecrets
impl Send for AmountSecrets
impl Sync for AmountSecrets
impl Unpin for AmountSecrets
impl UnwindSafe for AmountSecrets
Blanket Implementations
Mutably borrows from an owned value. Read more