pub struct KeyPackage<C: Ciphersuite> { /* private fields */ }
Expand description
A FROST keypair, which can be generated either by a trusted dealer or using a DKG.
When using a central dealer, SecretShare
s are distributed to
participants, who then perform verification, before deriving
KeyPackage
s, which they store to later use during signing.
Implementations§
source§impl<C: Ciphersuite> KeyPackage<C>
impl<C: Ciphersuite> KeyPackage<C>
Auto-generated by derive_getters::Getters
.
sourcepub fn identifier(&self) -> &Identifier<C>
pub fn identifier(&self) -> &Identifier<C>
Denotes the participant identifier each secret share key package is owned by.
This participant’s signing share. This is secret.
This participant’s public key.
sourcepub fn verifying_key(&self) -> &VerifyingKey<C>
pub fn verifying_key(&self) -> &VerifyingKey<C>
The public verifying key that represents the entire group.
sourcepub fn min_signers(&self) -> &u16
pub fn min_signers(&self) -> &u16
Get field min_signers
from instance of KeyPackage
.
source§impl<C> KeyPackage<C>where
C: Ciphersuite,
impl<C> KeyPackage<C>where
C: Ciphersuite,
sourcepub fn new(
identifier: Identifier<C>,
signing_share: SigningShare<C>,
verifying_share: VerifyingShare<C>,
verifying_key: VerifyingKey<C>,
min_signers: u16,
) -> Self
pub fn new( identifier: Identifier<C>, signing_share: SigningShare<C>, verifying_share: VerifyingShare<C>, verifying_key: VerifyingKey<C>, min_signers: u16, ) -> Self
Create a new KeyPackage
instance.
source§impl<C> KeyPackage<C>where
C: Ciphersuite,
impl<C> KeyPackage<C>where
C: Ciphersuite,
Trait Implementations§
source§impl<C: Clone + Ciphersuite> Clone for KeyPackage<C>
impl<C: Clone + Ciphersuite> Clone for KeyPackage<C>
source§fn clone(&self) -> KeyPackage<C>
fn clone(&self) -> KeyPackage<C>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<C: Debug + Ciphersuite> Debug for KeyPackage<C>
impl<C: Debug + Ciphersuite> Debug for KeyPackage<C>
source§impl<'de, C> Deserialize<'de> for KeyPackage<C>where
C: Ciphersuite,
impl<'de, C> Deserialize<'de> for KeyPackage<C>where
C: Ciphersuite,
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>,
source§impl<C: PartialEq + Ciphersuite> PartialEq for KeyPackage<C>
impl<C: PartialEq + Ciphersuite> PartialEq for KeyPackage<C>
source§impl<C> Serialize for KeyPackage<C>where
C: Ciphersuite,
impl<C> Serialize for KeyPackage<C>where
C: Ciphersuite,
source§fn try_from(secret_share: SecretShare<C>) -> Result<Self, Error<C>>
fn try_from(secret_share: SecretShare<C>) -> Result<Self, Error<C>>
Tries to verify a share and construct a KeyPackage
from it.
When participants receive a SecretShare
from the dealer, they
MUST verify the integrity of the share before continuing on to
transform it into a signing/verification keypair. Here, we assume that
every participant has the same view of the commitment issued by the
dealer, but implementations MUST make sure that all participants have
a consistent view of this commitment in practice.
source§impl<C: Ciphersuite> Zeroize for KeyPackage<C>
impl<C: Ciphersuite> Zeroize for KeyPackage<C>
impl<C: Eq + Ciphersuite> Eq for KeyPackage<C>
impl<C: Ciphersuite> StructuralPartialEq for KeyPackage<C>
Auto Trait Implementations§
impl<C> Freeze for KeyPackage<C>
impl<C> RefUnwindSafe for KeyPackage<C>where
C: RefUnwindSafe,
<<<C as Ciphersuite>::Group as Group>::Field as Field>::Scalar: RefUnwindSafe,
<<C as Ciphersuite>::Group as Group>::Element: RefUnwindSafe,
impl<C> Send for KeyPackage<C>
impl<C> Sync for KeyPackage<C>
impl<C> Unpin for KeyPackage<C>
impl<C> UnwindSafe for KeyPackage<C>where
C: UnwindSafe,
<<<C as Ciphersuite>::Group as Group>::Field as Field>::Scalar: UnwindSafe,
<<C as Ciphersuite>::Group as Group>::Element: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)