Struct synedrion::ThresholdKeyShare
source · pub struct ThresholdKeyShare<P: SchemeParams> { /* private fields */ }
Expand description
A threshold variant of the key share, where any threshold
shares our of the total number
is enough to perform signing.
Implementations§
sourcepub fn new_centralized(
rng: &mut impl CryptoRngCore,
threshold: usize,
num_parties: usize,
signing_key: Option<&SigningKey>
) -> Box<[Self]>
pub fn new_centralized( rng: &mut impl CryptoRngCore, threshold: usize, num_parties: usize, signing_key: Option<&SigningKey> ) -> Box<[Self]>
Returns num_parties
of random self-consistent key shares
(which in a decentralized case would be the output of KeyGen + Auxiliary protocols).
sourcepub fn verifying_key(&self) -> VerifyingKey
pub fn verifying_key(&self) -> VerifyingKey
Return the verifying key to which this set of shares corresponds.
sourcepub fn num_parties(&self) -> usize
pub fn num_parties(&self) -> usize
Returns the number of parties in this set of shares.
sourcepub fn party_index(&self) -> usize
pub fn party_index(&self) -> usize
Returns the index of this share’s party.
Converts a t-of-n key share into a t-of-t key share
(for the t
parties supplied as party_idxs
)
that can be used in the presigning/signing protocols.
Trait Implementations§
source§fn clone(&self) -> ThresholdKeyShare<P>
fn clone(&self) -> ThresholdKeyShare<P>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§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
Auto Trait Implementations§
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more