pub struct KeyShare<P: SchemeParams> { /* private fields */ }
Expand description
The full key share with auxiliary parameters.
Implementations§
sourcepub fn new_centralized(
rng: &mut impl CryptoRngCore,
num_parties: usize,
signing_key: Option<&SigningKey>
) -> Box<[Self]>
pub fn new_centralized( rng: &mut impl CryptoRngCore, 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 update(self, change: KeyShareChange<P>) -> Self
pub fn update(self, change: KeyShareChange<P>) -> Self
Return the updated key share using the share change obtained from the KeyRefresh+Auxiliary protocol).
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.
Trait Implementations§
source§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