[−][src]Struct frost_dalek::keygen::SecretKey
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]
&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>
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 theSha512
digest of the message, optionally along with some application-specific context string, and can be calculated with the helper functioncompute_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
Signer
s (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]
pub fn from(source: &SecretKey) -> IndividualPublicKey
[src]
impl Zeroize for SecretKey
[src]
Auto Trait Implementations
impl RefUnwindSafe for SecretKey
[src]
impl Send for SecretKey
[src]
impl Sync for SecretKey
[src]
impl Unpin for SecretKey
[src]
impl UnwindSafe for SecretKey
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,