Struct threshold_crypto::SecretKeyShare
source · pub struct SecretKeyShare(_);
Expand description
A secret key share.
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
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 default() -> SecretKeyShare
fn default() -> SecretKeyShare
Returns the “default value” for a type. Read more