Struct keynesis::noise::X [−][src]
One-Way Handshake Noise X
Implementations
impl<DH, H, RNG> X<DH, H, RNG> where
DH: Dh,
H: Hash,
[src]
DH: Dh,
H: Hash,
impl<DH, H, RNG> X<DH, H, RNG> where
RNG: RngCore + CryptoRng,
DH: Dh,
H: Hash,
[src]
RNG: RngCore + CryptoRng,
DH: Dh,
H: Hash,
pub fn send(
self,
s: &DH,
rs: &PublicKey,
payload: impl AsRef<[u8]>,
mut output: impl Write
) -> Result<(), HandshakeStateError>
[src]
self,
s: &DH,
rs: &PublicKey,
payload: impl AsRef<[u8]>,
mut output: impl Write
) -> Result<(), HandshakeStateError>
establish a one-way handshake with an already known PublicIdentity
and send the given payload too.
This is not the strongest way to establish a channel with another
peer. However it is strong enough encryption scheme as long as the
peer's PrivateIdentity
is not compromised. This is why we are not
allowing a TransportState to be built with this function.
This is an asymmetric encryption scheme. Once the message has been sent, we won't be able to decode it back.
impl<DH, H, RNG> X<DH, H, RNG> where
DH: Dh,
H: Hash,
[src]
DH: Dh,
H: Hash,
pub fn receive(
self,
s: &DH,
input: &[u8]
) -> Result<(PublicKey, Box<[u8]>), HandshakeStateError>
[src]
self,
s: &DH,
input: &[u8]
) -> Result<(PublicKey, Box<[u8]>), HandshakeStateError>
receive a one-way handshake with an unknown
Auto Trait Implementations
impl<DH, H, RNG> RefUnwindSafe for X<DH, H, RNG> where
DH: RefUnwindSafe,
H: RefUnwindSafe,
RNG: RefUnwindSafe,
<H as Hash>::HASH: RefUnwindSafe,
[src]
DH: RefUnwindSafe,
H: RefUnwindSafe,
RNG: RefUnwindSafe,
<H as Hash>::HASH: RefUnwindSafe,
impl<DH, H, RNG> Send for X<DH, H, RNG> where
DH: Send,
H: Send,
RNG: Send,
<H as Hash>::HASH: Send,
[src]
DH: Send,
H: Send,
RNG: Send,
<H as Hash>::HASH: Send,
impl<DH, H, RNG> Sync for X<DH, H, RNG> where
DH: Sync,
H: Sync,
RNG: Sync,
<H as Hash>::HASH: Sync,
[src]
DH: Sync,
H: Sync,
RNG: Sync,
<H as Hash>::HASH: Sync,
impl<DH, H, RNG> Unpin for X<DH, H, RNG> where
DH: Unpin,
H: Unpin,
RNG: Unpin,
<H as Hash>::HASH: Unpin,
[src]
DH: Unpin,
H: Unpin,
RNG: Unpin,
<H as Hash>::HASH: Unpin,
impl<DH, H, RNG> UnwindSafe for X<DH, H, RNG> where
DH: UnwindSafe,
H: UnwindSafe,
RNG: UnwindSafe,
<H as Hash>::HASH: UnwindSafe,
[src]
DH: UnwindSafe,
H: UnwindSafe,
RNG: UnwindSafe,
<H as Hash>::HASH: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,