Struct threshold_crypto::PublicKeyShare
source · pub struct PublicKeyShare(_);
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.
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