pub struct X25519(_);
Expand description
A X25519 key.
Trait Implementations§
source§impl Protocol<X25519> for X25519
impl Protocol<X25519> for X25519
Legacy Noise protocol for X25519.
Note: This Protocol
provides no configuration that
is interoperable with other libp2p implementations.
See crate::X25519Spec
instead.
source§fn params_ik() -> ProtocolParams
fn params_ik() -> ProtocolParams
The protocol parameters for the IK handshake pattern.
source§fn params_ix() -> ProtocolParams
fn params_ix() -> ProtocolParams
The protocol parameters for the IX handshake pattern.
source§fn params_xx() -> ProtocolParams
fn params_xx() -> ProtocolParams
The protocol parameters for the XX handshake pattern.
source§fn public_from_bytes(bytes: &[u8]) -> Result<PublicKey<X25519>, NoiseError>
fn public_from_bytes(bytes: &[u8]) -> Result<PublicKey<X25519>, NoiseError>
Construct a DH public key from a byte slice.
source§fn linked(id_pk: &PublicKey, dh_pk: &PublicKey<X25519>) -> bool
fn linked(id_pk: &PublicKey, dh_pk: &PublicKey<X25519>) -> bool
👎Deprecated
Determines whether the authenticity of the given DH static public key
and public identity key is linked, i.e. that proof of ownership of a
secret key for the static DH public key implies that the key is
authentic w.r.t. the given public identity key. Read more
source§fn verify(
id_pk: &PublicKey,
dh_pk: &PublicKey<C>,
sig: &Option<Vec<u8, Global>>
) -> boolwhere
C: AsRef<[u8]>,
fn verify( id_pk: &PublicKey, dh_pk: &PublicKey<C>, sig: &Option<Vec<u8, Global>> ) -> boolwhere C: AsRef<[u8]>,
Verifies that a given static DH public key is authentic w.r.t. a
given public identity key in the context of an optional signature. Read more
fn sign( id_keys: &Keypair, dh_pk: &PublicKey<C> ) -> Result<Vec<u8, Global>, NoiseError>where C: AsRef<[u8]>,
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§
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
source§impl<T> ProtocolName for Twhere
T: AsRef<[u8]>,
impl<T> ProtocolName for Twhere T: AsRef<[u8]>,
source§impl<T> ToHex for Twhere
T: AsRef<[u8]>,
impl<T> ToHex for Twhere T: AsRef<[u8]>,
source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)