pub struct SecretKeyShare(/* private fields */);Expand description
A secret key share.
§Serde integration
SecretKeyShare implements Deserialize but not Serialize to avoid accidental
serialization in insecure contexts. To enable both use the ::serde_impl::SerdeSecret
wrapper which implements both Deserialize and Serialize.
Implementations§
Sourcepub fn from_mut(fr: &mut Fr) -> Self
pub fn from_mut(fr: &mut Fr) -> Self
Creates a new SecretKeyShare from a mutable reference to a field element. This
constructor takes a reference to avoid any unnecessary stack copying/moving of secrets
field elements. The field element will be copied bytewise onto the heap, the resulting
Box is stored in the SecretKey which is then wrapped in a SecretKeyShare.
WARNING this constructor will overwrite the pointed to Fr element with zeros once it
has been copied into a new SecretKeyShare.
Returns the matching public key share.
Sourcepub fn sign_g2<H: Into<G2Affine>>(&self, hash: H) -> SignatureShare
pub fn sign_g2<H: Into<G2Affine>>(&self, hash: H) -> SignatureShare
Signs the given element of G2.
Sourcepub fn sign<M: AsRef<[u8]>>(&self, msg: M) -> SignatureShare
pub fn sign<M: AsRef<[u8]>>(&self, msg: M) -> SignatureShare
Signs the given message.
Returns a decryption share, or None, if the ciphertext isn’t valid.
Returns a decryption share, without validating the ciphertext.
Trait Implementations§
Source§fn clone(&self) -> SecretKeyShare
fn clone(&self) -> SecretKeyShare
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more