Module replay

Source
Expand description

Facility for detecting and preventing replays on introduction requests.

If we were to permit the introduction point to replay the same request multiple times, it would cause the service to contact the rendezvous point again with the same rendezvous cookie as before, which could help with traffic analysis.

(This could also be a DoS vector if the introduction point decided to overload the service.)

Because we use the same introduction point keys across restarts, we need to make sure that our replay logs are already persistent. We do this by using a file on disk.

Modules§

data 🔒
Wrapper around a fast-ish data structure for detecting replays with some false positive rate. Bloom filters, cuckoo filters, and xorf filters are all an option here. You could even use a HashSet.
ipt 🔒
Code for a replay log for Introduce2 messages.
pow 🔒 hs-pow-full
Code for a replay log for Proof-of-Work Nonces.

Structs§

PersistFile 🔒
Persistent state file, and associated data
ReplayLog 🔒
A probabilistic data structure to record fingerprints of observed Introduce2 messages.

Enums§

LogContentError 🔒
A problem that prevents us from reading a ReplayLog from disk.
ReplayError 🔒
An error occurred while checking whether we’ve seen an element before.

Constants§

MAGIC_LEN 🔒
The length of the ReplayLogType::MAGIC constant.
OUTPUT_LEN 🔒
The length of the message that we store on disk, in bytes.
REPLAY_LOG_SUFFIX 🔒
Replay log files have a .bin suffix.

Traits§

ReplayLogType 🔒
A trait to represent a set of types that ReplayLog can be used with.

Type Aliases§

IptReplayLog 🔒
A ReplayLog for Introduce2 messages.
PowNonceReplayLog 🔒 hs-pow-full
A ReplayLog for Proof-of-Work Nonces.