3 releases (breaking)
0.3.1 | Feb 9, 2022 |
---|---|
0.3.0 |
|
0.2.0 | Dec 9, 2021 |
0.1.0 | Nov 24, 2021 |
#21 in #handshake
200KB
5.5K
SLoC
KEYNESIS-NETWORK
This crate implements the network part of the Anonymous Secure Mail Transfer
Protocol (ASMTP). See siblings libraries for the other part of the protocol
as well as keynesis
.
This crates does not contain material to keep and manage multiple connections,
see asmtpd
's code for that. Instead here we are focusing on the low level part
of the protocol. Providing the core features such as the protocol for the
establishing handshakes (establishing a secure bidirectional connection with
forward secrecy enabled: noise
).
Handshake
the handshake is pretty simple, it consist of one byte of protocol version and followed by the [IK] noise pattern handshake messages. This allows for the initiator to open their identity only to the expected peer.
Messages
Once the connection is established all messages in or out are encrypted with forward secrecy. We have guarantee that the remote peer is the expected peer and they also have means to authenticate our node.
Now we can send messages.
Lack of multiplexing
as you can see there is no Request/Response to the messages. While it is possible to request a peer to do something for us there is no way of knowing if the node is going to respond to that specific request or not. If after sometimes there is no response you might want to try again. But for now there is no multiplexing of the queries in order to simplify the implementation of the network protocol.
There is exactly 7 message types (8 with the handshake) that goes through the network and while there is room for up to 255 it is likely not to grow much.
License
This project is licensed under the MIT OR Apache-2.0 dual license.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in ASMTP by you, shall be licensed as MIT OR Apache-2.0
dual
license, without any additional terms or conditions.
Dependencies
~6–15MB
~171K SLoC