Struct frost_core::keys::PublicKeyPackage
source · 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>
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.
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>
) -> Self
pub fn new( verifying_shares: BTreeMap<Identifier<C>, VerifyingShare<C>>, verifying_key: VerifyingKey<C> ) -> Self
Create a new PublicKeyPackage
instance.
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.
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,
impl<'de, C> Deserialize<'de> for PublicKeyPackage<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 PublicKeyPackage<C>
impl<C: PartialEq + Ciphersuite> PartialEq for PublicKeyPackage<C>
source§fn eq(&self, other: &PublicKeyPackage<C>) -> bool
fn eq(&self, other: &PublicKeyPackage<C>) -> bool
self
and other
values to be equal, and is used
by ==
.