pub enum HandshakeOp {
Start,
GenKey,
GetHandshakeHash,
MixHash(HandshakeData),
MixKey(HandshakeData),
MixKeyDh(HandshakeData, HandshakeData),
EncryptAndHash(HandshakeData),
DecryptAndHash(HandshakeData),
Stop,
Split,
}Expand description
Different operations to perform in handshake scripts, see §5 of https://www.discocrypto.com/disco.html
Variants§
Start
Start a message
GenKey
Generate a new key pair
GetHandshakeHash
Get the handshake hash
MixHash(HandshakeData)
Does an AD(data)
MixKey(HandshakeData)
Does a KEY(key) and sets is_keyed to true
MixKeyDh(HandshakeData, HandshakeData)
Does an KEY(ECDH(key, key)) and sets is_keyed to true
EncryptAndHash(HandshakeData)
Does either a send_CLR(data) or send_ENC(data) + send_MAX(16) depending on is_keyed
DecryptAndHash(HandshakeData)
Does either a recv_CLR(data) or recv_ENC(data) + recv_MAC(16) depending on is_keyed
Stop
Stop marks the end of one side’s state changes
Split
End the handshake process and split into send/recv states
Trait Implementations§
Source§impl Clone for HandshakeOp
impl Clone for HandshakeOp
Source§fn clone(&self) -> HandshakeOp
fn clone(&self) -> HandshakeOp
Returns a duplicate 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 Debug for HandshakeOp
impl Debug for HandshakeOp
Source§impl<'de> Deserialize<'de> for HandshakeOp
impl<'de> Deserialize<'de> for HandshakeOp
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for HandshakeOp
impl PartialEq for HandshakeOp
Source§impl Serialize for HandshakeOp
impl Serialize for HandshakeOp
impl Copy for HandshakeOp
impl StructuralPartialEq for HandshakeOp
Auto Trait Implementations§
impl Freeze for HandshakeOp
impl RefUnwindSafe for HandshakeOp
impl Send for HandshakeOp
impl Sync for HandshakeOp
impl Unpin for HandshakeOp
impl UnwindSafe for HandshakeOp
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