pub enum FullPrivateKey {
Raw([u8; 32]),
RFC8032([u8; 32]),
}Expand description
A full private key for Ed25519 cryptographic operations.
When using [Self::Raw] the 32 bytes are the private key itself.
When using [Self::RFC8032] the secret is the first 32 bytes of the sha512 of the given 32 bytes (which are the key k in ed25519 (rfc8032)).
the secret is then “clamped” to produce a valid ed25519 scalar.
Variants§
Raw([u8; 32])
32 bytes canonical raw Ed25519 scalar private key
RFC8032([u8; 32])
The pre-image bytes for RF8032 Ed25519 key generation The actual secret is the first 32 bytes of the sha512 of the pre-image, which is then “clamped”, all according to RFC8032.
Trait Implementations§
Source§impl Clone for FullPrivateKey
impl Clone for FullPrivateKey
Source§fn clone(&self) -> FullPrivateKey
fn clone(&self) -> FullPrivateKey
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 Debug for FullPrivateKey
impl Debug for FullPrivateKey
Source§impl PartialEq for FullPrivateKey
impl PartialEq for FullPrivateKey
impl Eq for FullPrivateKey
impl StructuralPartialEq for FullPrivateKey
Auto Trait Implementations§
impl Freeze for FullPrivateKey
impl RefUnwindSafe for FullPrivateKey
impl Send for FullPrivateKey
impl Sync for FullPrivateKey
impl Unpin for FullPrivateKey
impl UnwindSafe for FullPrivateKey
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