Struct identity_iota::crypto::X25519
source · [−]pub struct X25519;
Expand description
An implementation of X25519 Elliptic-curve Diffie-Hellman (ECDH) cryptographic key exchange.
Implementations
sourceimpl X25519
impl X25519
sourcepub const PRIVATE_KEY_LENGTH: usize = 32usize
pub const PRIVATE_KEY_LENGTH: usize = 32usize
Length in bytes of an X25519 private key.
sourcepub const PUBLIC_KEY_LENGTH: usize = 32usize
pub const PUBLIC_KEY_LENGTH: usize = 32usize
Length in bytes of an X25519 public key.
sourcepub fn key_exchange<PRV, PUB>(
private: &PRV,
public: &PUB
) -> Result<[u8; 32], Error> where
PRV: AsRef<[u8]> + ?Sized,
PUB: AsRef<[u8]> + ?Sized,
pub fn key_exchange<PRV, PUB>(
private: &PRV,
public: &PUB
) -> Result<[u8; 32], Error> where
PRV: AsRef<[u8]> + ?Sized,
PUB: AsRef<[u8]> + ?Sized,
Performs Diffie-Hellman key exchange using the private key of the first party with the public key of the second party, resulting in a shared secret.
Auto Trait Implementations
impl RefUnwindSafe for X25519
impl Send for X25519
impl Sync for X25519
impl Unpin for X25519
impl UnwindSafe for X25519
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more