pub struct SigningKey<C>where
C: Ciphersuite,{ /* private fields */ }Expand description
A signing key for a Schnorr signature on a FROST Ciphersuite::Group.
Implementations§
Source§impl<C> SigningKey<C>where
C: Ciphersuite,
impl<C> SigningKey<C>where
C: Ciphersuite,
Sourcepub fn deserialize(bytes: &[u8]) -> Result<SigningKey<C>, Error<C>>
pub fn deserialize(bytes: &[u8]) -> Result<SigningKey<C>, Error<C>>
Deserialize from bytes
Sourcepub fn sign<R: RngCore + CryptoRng>(
&self,
rng: R,
message: &[u8],
) -> Signature<C>
pub fn sign<R: RngCore + CryptoRng>( &self, rng: R, message: &[u8], ) -> Signature<C>
Create a signature msg using this SigningKey.
Sourcepub fn from_scalar(
scalar: <<<C as Ciphersuite>::Group as Group>::Field as Field>::Scalar,
) -> Result<Self, Error<C>>
pub fn from_scalar( scalar: <<<C as Ciphersuite>::Group as Group>::Field as Field>::Scalar, ) -> Result<Self, Error<C>>
Creates a SigningKey from a scalar. Returns an error if the scalar is zero.
Trait Implementations§
Source§impl<C> Clone for SigningKey<C>where
C: Ciphersuite + Clone,
impl<C> Clone for SigningKey<C>where
C: Ciphersuite + Clone,
Source§fn clone(&self) -> SigningKey<C>
fn clone(&self) -> SigningKey<C>
Returns a duplicate 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<C> Debug for SigningKey<C>where
C: Ciphersuite,
impl<C> Debug for SigningKey<C>where
C: Ciphersuite,
Source§impl<C> Drop for SigningKey<C>where
C: Ciphersuite,
impl<C> Drop for SigningKey<C>where
C: Ciphersuite,
Source§impl<C> From<&SigningKey<C>> for VerifyingKey<C>where
C: Ciphersuite,
impl<C> From<&SigningKey<C>> for VerifyingKey<C>where
C: Ciphersuite,
Source§fn from(signing_key: &SigningKey<C>) -> Self
fn from(signing_key: &SigningKey<C>) -> Self
Converts to this type from the input type.
Source§impl<C> From<SigningKey<C>> for VerifyingKey<C>where
C: Ciphersuite,
impl<C> From<SigningKey<C>> for VerifyingKey<C>where
C: Ciphersuite,
Source§fn from(signing_key: SigningKey<C>) -> Self
fn from(signing_key: SigningKey<C>) -> Self
Converts to this type from the input type.
Source§impl<C> PartialEq for SigningKey<C>where
C: Ciphersuite + PartialEq,
impl<C> PartialEq for SigningKey<C>where
C: Ciphersuite + PartialEq,
impl<C> Eq for SigningKey<C>where
C: Ciphersuite + Eq,
impl<C> StructuralPartialEq for SigningKey<C>where
C: Ciphersuite,
impl<C> ZeroizeOnDrop for SigningKey<C>where
C: Ciphersuite,
Auto Trait Implementations§
impl<C> Freeze for SigningKey<C>
impl<C> RefUnwindSafe for SigningKey<C>
impl<C> Send for SigningKey<C>
impl<C> Sync for SigningKey<C>
impl<C> Unpin for SigningKey<C>
impl<C> UnsafeUnpin for SigningKey<C>
impl<C> UnwindSafe for SigningKey<C>
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