pub struct PublicKeyShare(/* private fields */);
Expand description
A public key share.
Implementations§
Sourcepub fn verify_g2<H: Into<G2Affine>>(
&self,
sig: &SignatureShare,
hash: H,
) -> bool
pub fn verify_g2<H: Into<G2Affine>>( &self, sig: &SignatureShare, hash: H, ) -> bool
Returns true
if the signature matches the element of G2
.
Sourcepub fn verify<M: AsRef<[u8]>>(&self, sig: &SignatureShare, msg: M) -> bool
pub fn verify<M: AsRef<[u8]>>(&self, sig: &SignatureShare, msg: M) -> bool
Returns true
if the signature matches the message.
This is equivalent to verify_g2(sig, hash_g2(msg))
.
Returns true
if the decryption share matches the ciphertext.
Sourcepub fn from_bytes<B: Borrow<[u8; 48]>>(bytes: B) -> FromBytesResult<Self>
pub fn from_bytes<B: Borrow<[u8; 48]>>(bytes: B) -> FromBytesResult<Self>
Returns the key share with the given representation, if valid.
Trait Implementations§
Source§fn clone(&self) -> PublicKeyShare
fn clone(&self) -> PublicKeyShare
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§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
Source§fn cmp(&self, other: &PublicKeyShare) -> Ordering
fn cmp(&self, other: &PublicKeyShare) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. 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