[][src]Struct x448::Secret

pub struct 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]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.