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§impl<C> Serialize for PublicKeyPackage<C>where
C: Ciphersuite,
impl<C> Serialize for PublicKeyPackage<C>where
C: Ciphersuite,
impl<C: Eq + Ciphersuite> Eq for PublicKeyPackage<C>
impl<C: Ciphersuite> StructuralPartialEq for PublicKeyPackage<C>
Auto Trait Implementations§
impl<C> Freeze for PublicKeyPackage<C>
impl<C> RefUnwindSafe for PublicKeyPackage<C>where
C: RefUnwindSafe,
<<C as Ciphersuite>::Group as Group>::Element: RefUnwindSafe,
<<<C as Ciphersuite>::Group as Group>::Field as Field>::Scalar: RefUnwindSafe,
impl<C> Send for PublicKeyPackage<C>
impl<C> Sync for PublicKeyPackage<C>
impl<C> Unpin for PublicKeyPackage<C>
impl<C> UnwindSafe for PublicKeyPackage<C>where
C: UnwindSafe,
<<C as Ciphersuite>::Group as Group>::Element: UnwindSafe + RefUnwindSafe,
<<<C as Ciphersuite>::Group as Group>::Field as Field>::Scalar: RefUnwindSafe,
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
)