keynesis_network/lib.rs
1/*!
2# ASMTP network protocol
3
4this crate implements the Anonymous and Secure Mail Transfer Protocol (ASMTP).
5The protocol is rather simple:
6
71. 2 peers perform a handshake including the version and a [Noise Protocol IK] handshake
8 allowing to authenticate each other and to establish a secure communication between
9 the 2 nodes.
102. Once the connection is established, all messages are encrypted and authenticated.
11 After each messages the key is being rotated (see Noise's transport state _rekey_
12 function).
133. Only 2 types of messages are allowed to transport between the nodes:
14 a. [`Gossip`] which are information about other peers in the network and their
15 subscriptions (see [`poldercast`])
16 b. [`Topic`] based message: messages that are associated with a 32bytes topic
17 code.
18
19This crates only implements the network part of ASMTP.
20
21## ASMTP and Poldercast
22
23[`poldercast`] is a Pub/Sub protocol that allows to build a topology of peers
24based on their topic preferences (their subscriptions).
25
26ASMTP will use the [`Topic`] to relay messages to the appropriate peers.
27
28[Noise Protocol IK]: https://noiseexplorer.com/patterns/IK/
29[`Gossip`]: poldercast::Gossip
30[`Topic`]: poldercast::Topic
31[`poldercast`]: poldercast
32
33*/
34
35mod accept;
36mod codec;
37mod handle;
38pub mod net;
39mod opening;
40mod session_id;
41mod version;
42
43pub use self::{accept::Accepting, handle::Handle, session_id::SessionId, version::Version};