pub struct PublicKeyPackage<C: Ciphersuite> { /* private fields */ }Expand description
Public data that contains all the signers’ verifying shares as well as the group verifying key.
Used for verification purposes before publishing a signature.
Implementations§
Source§impl<C: Ciphersuite> PublicKeyPackage<C>
Auto-generated by derive_getters::Getters.
impl<C: Ciphersuite> PublicKeyPackage<C>
Auto-generated by derive_getters::Getters.
The verifying shares for all participants. Used to validate signature shares they generate.
Sourcepub fn verifying_key(&self) -> &VerifyingKey<C>
pub fn verifying_key(&self) -> &VerifyingKey<C>
The joint public key for the entire group.
Sourcepub fn min_signers(&self) -> Option<u16>
pub fn min_signers(&self) -> Option<u16>
The minimum number of signers (threshold) required for the group.
This can be None in packages created with frost_core prior to 3.0.0.
Source§impl<C> PublicKeyPackage<C>where
C: Ciphersuite,
impl<C> PublicKeyPackage<C>where
C: Ciphersuite,
Sourcepub fn new(
verifying_shares: BTreeMap<Identifier<C>, VerifyingShare<C>>,
verifying_key: VerifyingKey<C>,
min_signers: Option<u16>,
) -> Self
pub fn new( verifying_shares: BTreeMap<Identifier<C>, VerifyingShare<C>>, verifying_key: VerifyingKey<C>, min_signers: Option<u16>, ) -> Self
Create a new PublicKeyPackage instance.
min_signers is an Option for compatibility with pre-3.0.0 packages.
In normal usage, it should always be Some(value).
Sourcepub fn from_commitment(
identifiers: &BTreeSet<Identifier<C>>,
commitment: &VerifiableSecretSharingCommitment<C>,
) -> Result<PublicKeyPackage<C>, Error<C>>
pub fn from_commitment( identifiers: &BTreeSet<Identifier<C>>, commitment: &VerifiableSecretSharingCommitment<C>, ) -> Result<PublicKeyPackage<C>, Error<C>>
Computes the public key package given a list of participant identifiers
and a VerifiableSecretSharingCommitment. This is useful in scenarios
where the commitments are published somewhere and it’s desirable to
recreate the public key package from them.
Sourcepub fn from_dkg_commitments(
commitments: &BTreeMap<Identifier<C>, &VerifiableSecretSharingCommitment<C>>,
) -> Result<PublicKeyPackage<C>, Error<C>>
pub fn from_dkg_commitments( commitments: &BTreeMap<Identifier<C>, &VerifiableSecretSharingCommitment<C>>, ) -> Result<PublicKeyPackage<C>, Error<C>>
Computes the public key package given a map of participant identifiers
and their VerifiableSecretSharingCommitment from a distributed key
generation process. This is useful in scenarios where the commitments
are published somewhere and it’s desirable to recreate the public key
package from them.
Sourcepub fn max_signers(&self) -> u16
pub fn max_signers(&self) -> u16
Return the maximum number of signers.
Source§impl<C> PublicKeyPackage<C>where
C: Ciphersuite,
impl<C> PublicKeyPackage<C>where
C: Ciphersuite,
Trait Implementations§
Source§impl<C: Clone + Ciphersuite> Clone for PublicKeyPackage<C>
impl<C: Clone + Ciphersuite> Clone for PublicKeyPackage<C>
Source§fn clone(&self) -> PublicKeyPackage<C>
fn clone(&self) -> PublicKeyPackage<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 PublicKeyPackage<C>
impl<C: Debug + Ciphersuite> Debug for PublicKeyPackage<C>
Source§impl<'de, C> Deserialize<'de> for PublicKeyPackage<C>where
C: Ciphersuite,
Available on crate feature serde only.Custom deserializer for PublicKeyPackage, which allows a non-existing
min_signers field for the postcard encoding.
impl<'de, C> Deserialize<'de> for PublicKeyPackage<C>where
C: Ciphersuite,
serde only.Custom deserializer for PublicKeyPackage, which allows a non-existing
min_signers field for the postcard encoding.