pub struct SigningKey(pub SecretKey);
Expand description
MultiSig secret key, which is a wrapper over the BlstSk type from the blst library.
Tuple Fields§
§0: SecretKey
Implementations§
Source§impl SigningKey
impl SigningKey
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, MultiSignatureError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, MultiSignatureError>
Convert a string of bytes into a SigningKey
.
§Error
Fails if the byte string represents a scalar larger than the group order.
Trait Implementations§
Source§impl Clone for SigningKey
impl Clone for SigningKey
Source§fn clone(&self) -> SigningKey
fn clone(&self) -> SigningKey
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§impl Debug for SigningKey
impl Debug for SigningKey
Source§impl<'de> Deserialize<'de> for SigningKey
impl<'de> Deserialize<'de> for SigningKey
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&SigningKey> for ProofOfPossession
impl From<&SigningKey> for ProofOfPossession
Source§fn from(sk: &SigningKey) -> Self
fn from(sk: &SigningKey) -> Self
Convert a secret key into an MspPoP
. This is performed by computing
k1 = H_G1(b"PoP" || mvk)
and k2 = g1 * sk
where H_G1
hashes into
G1
and g1
is the generator in G1
.
Source§impl From<&SigningKey> for VerificationKey
impl From<&SigningKey> for VerificationKey
Source§fn from(sk: &SigningKey) -> Self
fn from(sk: &SigningKey) -> Self
Convert a secret key into an MspMvk
. This is performed by computing
MspMvk = g2 * sk
, where g2
is the generator in G2. We can use the
blst built-in function sk_to_pk
.
Source§impl From<&SigningKey> for VerificationKeyPoP
impl From<&SigningKey> for VerificationKeyPoP
Source§fn from(sk: &SigningKey) -> Self
fn from(sk: &SigningKey) -> Self
Convert a secret key into a VerificationKeyPoP
by simply converting to a
MspMvk
and MspPoP
.
Auto Trait Implementations§
impl Freeze for SigningKey
impl RefUnwindSafe for SigningKey
impl Send for SigningKey
impl Sync for SigningKey
impl Unpin for SigningKey
impl UnwindSafe for SigningKey
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