pub struct SigningKey(/* private fields */);Expand description
Ed448 signing key (RFC 8032).
Wraps a 57-byte private key. The high bit of the last byte is ignored per RFC 8032 (the “clamping” step is part of signing, not the key storage).
Implementations§
Source§impl SigningKey
impl SigningKey
Sourcepub fn from_bytes(bytes: &[u8; 57]) -> Result<Self>
pub fn from_bytes(bytes: &[u8; 57]) -> Result<Self>
Construct a signing key from raw 57-byte secret bytes.
Sourcepub fn sign(&self, message: &[u8]) -> Signature
pub fn sign(&self, message: &[u8]) -> Signature
Sign a message. Returns a 114-byte Ed448 signature.
Uses “pure” Ed448 (not Ed448ph) — the message is hashed directly without a prehash separator.
Sourcepub fn verifying_key(&self) -> VerifyingKey
pub fn verifying_key(&self) -> VerifyingKey
Get the corresponding 57-byte public key.
Trait Implementations§
Source§impl Clone for SigningKey
impl Clone for SigningKey
Source§fn clone(&self) -> SigningKey
fn clone(&self) -> SigningKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Drop for SigningKey
impl Drop for SigningKey
Auto Trait Implementations§
impl Freeze for SigningKey
impl RefUnwindSafe for SigningKey
impl Send for SigningKey
impl Sync for SigningKey
impl Unpin for SigningKey
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more