Expand description
Mixnet core logic.
Structs§
- A packet plus the ID of the peer it should be sent to.
- Mixnet configuration.
- Unitless delay. Can be converted to a
Duration
withto_duration
. - Flags to indicate events that have occurred. Note that these may be set spuriously.
- Mixnet core state.
X
is the type of the extra data stored for each mixnode (Mixnode::extra
). - Per-mixnode data.
- The index of a mixnode in a session’s mixnode list. The index is always <=
MAX_MIXNODE_INDEX
. - A reply to a previously sent request.
- A request from another node.
- Metrics that can be used to estimate a request’s round-trip time.
- A concatenation of multiple slices. The slices are not copied until
copy_to_slice
orto_vec
is called. - Configuration that can vary between sessions depending on whether the local node is a mixnode or not.
- The index and phase of the current session.
Enums§
- A message received over the mixnet.
- Error querying the mixnodes for a session.
- Request/reply posting error.
- Relative session index.
- Each session should progress through these phases in order.
- Topology error.
Constants§
- Size in bytes of a
KxPublic
. - Maximum number of hops a packet can traverse. Sending a packet directly to the final destination node would count as one hop. Strictly speaking it is possible to construct packets that will traverse slightly more hops than this, but not using this crate.
- Maximum valid mixnode index.
- Size in bytes of a
MessageId
. - Size in bytes of a
Packet
. - Size in bytes of a
PeerId
. - Size in bytes of a
Surb
.
Traits§
- A trait for querying the peer ID and connectivity of the local node.
Type Aliases§
- Key-exchange public key.
- An unclamped key-exchange secret key.
- Message identifier. Should be randomly generated. Attached to fragments to enable reassembly.
- Type for packets sent between nodes. Note that all packets are the same size.
- Globally unique identifier for a network peer. This is treated as an opaque type.
- Raw mixnode index type, not guaranteed to be <=
MAX_MIXNODE_INDEX
. - Absolute session index.
- A “single-use reply block”. This should be treated as an opaque type.