Struct libp2p_noise::X25519Spec
source · pub struct X25519Spec(_);
Expand description
A X25519 key.
Trait Implementations§
source§impl AsRef<[u8]> for X25519Spec
impl AsRef<[u8]> for X25519Spec
source§impl Clone for X25519Spec
impl Clone for X25519Spec
source§fn clone(&self) -> X25519Spec
fn clone(&self) -> X25519Spec
Returns a copy 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 Protocol<X25519Spec> for X25519Spec
impl Protocol<X25519Spec> for X25519Spec
Noise protocols for X25519 with libp2p-spec compliant signatures.
Note: Only the XX handshake pattern is currently guaranteed to be interoperable with other libp2p implementations.
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<X25519Spec>, NoiseError>
fn public_from_bytes(bytes: &[u8]) -> Result<PublicKey<X25519Spec>, NoiseError>
Construct a DH public key from a byte slice.
source§fn verify(
id_pk: &PublicKey,
dh_pk: &PublicKey<X25519Spec>,
sig: &Option<Vec<u8>>
) -> bool
fn verify(
id_pk: &PublicKey,
dh_pk: &PublicKey<X25519Spec>,
sig: &Option<Vec<u8>>
) -> bool
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<X25519Spec>
) -> Result<Vec<u8>, NoiseError>
source§fn linked(id_pk: &PublicKey, dh_pk: &PublicKey<C>) -> bool
fn linked(id_pk: &PublicKey, dh_pk: &PublicKey<C>) -> 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