[][src]Struct ristretto255_dh::StaticSecret

pub struct StaticSecret(_);

A Diffie-Hellman secret key used to derive a shared secret when combined with a public key, that can be stored and loaded.

Implementations

impl StaticSecret[src]

pub fn new<T>(rng: T) -> StaticSecret where
    T: RngCore + CryptoRng
[src]

Generate a StaticSecret using a new scalar mod the group order.

pub fn diffie_hellman(&self, peer_public: &PublicKey) -> SharedSecret[src]

Do Diffie-Hellman key agreement between self's secret and a peer's public key, resulting in a SharedSecret.

Trait Implementations

impl Clone for StaticSecret[src]

impl Copy for StaticSecret[src]

impl<'de> Deserialize<'de> for StaticSecret[src]

impl Eq for StaticSecret[src]

impl<'a> From<&'a StaticSecret> for PublicKey[src]

impl From<[u8; 32]> for StaticSecret[src]

impl From<[u8; 64]> for StaticSecret[src]

impl From<StaticSecret> for [u8; 32][src]

impl PartialEq<StaticSecret> for StaticSecret[src]

impl Serialize for StaticSecret[src]

impl StructuralEq for StaticSecret[src]

impl StructuralPartialEq for StaticSecret[src]

Auto Trait Implementations

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.