[][src]Struct frost_dalek::keygen::SecretKey

pub struct SecretKey { /* fields omitted */ }

A secret key, used by one participant in a threshold signature scheme, to sign a message.

Implementations

impl SecretKey[src]

pub fn to_public(&self) -> IndividualPublicKey[src]

Derive the corresponding public key for this secret key.

impl SecretKey[src]

pub fn sign(
    &self,
    message_hash: &[u8; 64],
    group_key: &GroupKey,
    my_secret_commitment_share_list: &mut SecretCommitmentShareList,
    my_commitment_share_index: usize,
    signers: &[Signer]
) -> Result<PartialThresholdSignature, &'static str>
[src]

Compute an individual signer's PartialThresholdSignature contribution to a ThresholdSignature on a message.

Inputs

  • The message_hash to be signed by every individual signer, this should be the Sha512 digest of the message, optionally along with some application-specific context string, and can be calculated with the helper function compute_message_hash.
  • The public GroupKey for this group of signing participants,
  • This signer's SecretCommitmentShareList being used in this instantiation and
  • The index of the particular CommitmentShare being used, and
  • The list of all the currently participating Signers (including ourself).

Warning

The secret share index here must be the same secret share corresponding to its public commitment which is passed to SignatureAggregrator.include_signer().

Returns

A Result whose Ok value contains a PartialThresholdSignature, which should be sent to the SignatureAggregator. Otherwise, its Err value contains a string describing the error which occurred.

Trait Implementations

impl Debug for SecretKey[src]

impl Drop for SecretKey[src]

impl From<&'_ SecretKey> for IndividualPublicKey[src]

impl Zeroize for SecretKey[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> Same<T> for T

type Output = T

Should always be Self

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,