[−][src]Struct keynesis::key::ed25519_extended::SecretKey
Implementations
impl SecretKey
[src]
pub const SIZE: usize
[src]
pub fn new<Rng>(rng: &mut Rng) -> Self where
Rng: RngCore + CryptoRng,
[src]
Rng: RngCore + CryptoRng,
generate a new SecretKey
with the given random number generator
pub fn public_key(&self) -> PublicKey
[src]
get the PublicKey
associated to this key
Unlike the SecretKey
, the PublicKey
can be safely
publicly shared. The key can then be used to verify any
Signature
generated with this SecretKey
and the original
message.
pub fn exchange(&self, public_key: &PublicKey) -> SharedSecret
[src]
generate a shared secret between the owner of the given public key and ourselves.
pub fn sign<T: AsRef<[u8]>>(&self, msg: T) -> Signature
[src]
create a Signature
for the given message with this SecretKey
.
The Signature
can then be verified against the associated PublicKey
and the original message.
pub fn leak_as_ref(&self) -> &[u8; 64]
[src]
get a reference to the inner Seed bytes
Security Consideration
be mindful that leaking the content of the internal signing key may result in losing the ultimate control of the signing key
pub fn leak_to_hex(&self) -> String
[src]
Trait Implementations
impl Clone for SecretKey
[src]
impl Debug for SecretKey
[src]
conveniently provide an incomplete implementation of Debug for the SecretKey.
impl Drop for SecretKey
[src]
custom implementation of Drop so we can have more certainty that the signing key raw data will be scrubbed (zeroed) before releasing the memory
impl Eq for SecretKey
[src]
impl FromStr for SecretKey
[src]
type Err = FromHexError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl Hash for SecretKey
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<SecretKey> for SecretKey
[src]
impl<'a> TryFrom<&'a [u8]> for SecretKey
[src]
type Error = SecretKeyError
The type returned in the event of a conversion error.
fn try_from(value: &'a [u8]) -> Result<Self, Self::Error>
[src]
impl TryFrom<[u8; 64]> for SecretKey
[src]
Auto Trait Implementations
impl RefUnwindSafe for SecretKey
impl Send for SecretKey
impl Sync for SecretKey
impl Unpin for SecretKey
impl UnwindSafe for SecretKey
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,