Struct libp2p_noise::X25519Spec [−][src]
pub struct X25519Spec(_);
Expand description
A X25519 key.
Trait Implementations
impl Clone for X25519Spec
[src]
impl Clone for X25519Spec
[src]fn clone(&self) -> X25519Spec
[src]
fn clone(&self) -> X25519Spec
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Protocol<X25519Spec> for X25519Spec
[src]
impl Protocol<X25519Spec> for X25519Spec
[src]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.
fn params_ik() -> ProtocolParams
[src]
fn params_ik() -> ProtocolParams
[src]The protocol parameters for the IK handshake pattern.
fn params_ix() -> ProtocolParams
[src]
fn params_ix() -> ProtocolParams
[src]The protocol parameters for the IX handshake pattern.
fn params_xx() -> ProtocolParams
[src]
fn params_xx() -> ProtocolParams
[src]The protocol parameters for the XX handshake pattern.
fn public_from_bytes(bytes: &[u8]) -> Result<PublicKey<X25519Spec>, NoiseError>
[src]
fn public_from_bytes(bytes: &[u8]) -> Result<PublicKey<X25519Spec>, NoiseError>
[src]Construct a DH public key from a byte slice.
fn verify(
id_pk: &PublicKey,
dh_pk: &PublicKey<X25519Spec>,
sig: &Option<Vec<u8>>
) -> bool
[src]
fn verify(
id_pk: &PublicKey,
dh_pk: &PublicKey<X25519Spec>,
sig: &Option<Vec<u8>>
) -> bool
[src]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>
[src]
id_keys: &Keypair,
dh_pk: &PublicKey<X25519Spec>
) -> Result<Vec<u8>, NoiseError>
fn linked(id_pk: &PublicKey, dh_pk: &PublicKey<C>) -> bool
[src]
fn linked(id_pk: &PublicKey, dh_pk: &PublicKey<C>) -> bool
[src]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
Auto Trait Implementations
impl RefUnwindSafe for X25519Spec
impl Send for X25519Spec
impl Sync for X25519Spec
impl Unpin for X25519Spec
impl UnwindSafe for X25519Spec
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,