pub struct EphemeralSecret(pub(crate) Array<u8, U56>);Expand description
An EphemeralSecret is a Scalar on Curve448.
Tuple Fields§
§0: Array<u8, U56>Implementations§
Source§impl EphemeralSecret
impl EphemeralSecret
Sourcepub fn new<R>(csprng: &mut R) -> Self
👎Deprecated since 0.14.0: use the Generate trait instead
pub fn new<R>(csprng: &mut R) -> Self
Generate trait insteadDEPRECATED: Generate a new ephemeral secret from the given RNG.
Sourcepub fn diffie_hellman(&self, public_key: &PublicKey) -> SharedSecret
pub fn diffie_hellman(&self, public_key: &PublicKey) -> SharedSecret
Performs a Diffie-hellman key exchange between the secret key and an external public key
Trait Implementations§
Source§impl Clone for EphemeralSecret
impl Clone for EphemeralSecret
Source§fn clone(&self) -> EphemeralSecret
fn clone(&self) -> EphemeralSecret
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 From<&EphemeralSecret> for PublicKey
Given an EphemeralSecret Key, compute the corresponding public key
using the generator specified in RFC7748
impl From<&EphemeralSecret> for PublicKey
Given an EphemeralSecret Key, compute the corresponding public key
using the generator specified in RFC7748
Source§fn from(secret: &EphemeralSecret) -> PublicKey
fn from(secret: &EphemeralSecret) -> PublicKey
Converts to this type from the input type.
Source§impl Generate for EphemeralSecret
impl Generate for EphemeralSecret
Source§fn try_generate_from_rng<R>(csprng: &mut R) -> Result<Self, R::Error>where
R: TryCryptoRng + ?Sized,
fn try_generate_from_rng<R>(csprng: &mut R) -> Result<Self, R::Error>where
R: TryCryptoRng + ?Sized,
Generate random key using the provided
TryCryptoRng. Read moreSource§fn generate_from_rng<R>(rng: &mut R) -> Self
fn generate_from_rng<R>(rng: &mut R) -> Self
Generate random key using the provided
CryptoRng.Auto Trait Implementations§
impl Freeze for EphemeralSecret
impl RefUnwindSafe for EphemeralSecret
impl Send for EphemeralSecret
impl Sync for EphemeralSecret
impl Unpin for EphemeralSecret
impl UnsafeUnpin for EphemeralSecret
impl UnwindSafe for EphemeralSecret
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