[−][src]Struct x448::Secret
A Secret is a Scalar on Curve448.
Implementations
impl Secret
[src]
pub fn new<T>(csprng: &mut T) -> Self where
T: RngCore + CryptoRng,
[src]
T: RngCore + CryptoRng,
Generate a x448 Secret
key.
pub fn as_diffie_hellman(&self, public_key: &PublicKey) -> Option<SharedSecret>
[src]
Performs a Diffie-hellman key exchange between the secret key and an external public key
pub fn to_diffie_hellman(self, public_key: &PublicKey) -> Option<SharedSecret>
[src]
Performs a Diffie-hellman key exchange once between the secret key and an external public key
pub fn from_bytes(bytes: &[u8]) -> Option<Secret>
[src]
Converts a byte slice into a secret and clamp
pub fn as_bytes(&self) -> &[u8; 56]
[src]
Converts a secret into a byte array
Trait Implementations
impl<'_> From<&'_ Secret> for PublicKey
[src]
Given a Secret Key, compute the corresponding public key using the generator specified in RFC7748 XXX: Waiting for upstream PR to use pre-computation
impl From<[u8; 56]> for Secret
[src]
Computes a Scalar according to RFC7748 given a byte array of length 56
Auto Trait Implementations
impl RefUnwindSafe for Secret
impl Send for Secret
impl Sync for Secret
impl Unpin for Secret
impl UnwindSafe for Secret
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, 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>,