You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: traffic/README.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
A traffic analysis resistance layer for BIP-324 encrypted bitcoin connections. Decoy packet and padding strategies are used to obscure communication patterns, attempting to make it harder for network observers to analyze bitcoin peer-to-peer communication patterns. The library follows a *sans I/O* design, but provides I/O drivers for easy entry points.
4
4
5
5
***High-level I/O** - `io::ShapedProtocol` (sync) and `futures::ShapedProtocol` (async) handle the complete encrypted connection life-cycle with automatic traffic shaping, including handshake, padding, and decoy generation.
6
-
***Lower-level components** - `TrafficShaper` manages the timing and generation of traffic obfuscation.
6
+
***Lower-level components** - `TrafficShaper` manages the timing and generation of traffic obfuscation. It can be used directly if the caller wishes to drive the I/O themselves.
7
7
8
8
## Feature Flags
9
9
@@ -20,17 +20,20 @@ When using the `tokio` feature, the effective MSRV may be higher depending on th
20
20
21
21
The BIP-324 specification defines *decoy packets* as the primary mechanism for hiding the shape of encrypted traffic. Even with encryption, bitcoin p2p traffic patterns can be highly distinctive to a third party observer. Transactions and blocks have characteristic sizes, message exchanges follow predictable patterns (like initial handshake sequences, pings and pongs), and the timing between messages can reveal protocol state machines. Also, a new block propagates about every ten minutes. An observer monitoring encrypted traffic could potentially identify bitcoin nodes, track transaction propagation, or infer network topology.
22
22
23
-
This library uses decoy packets in two complementary ways. The first is *padding*, where the library immediately follows genuine packet sends with a decoy packet. This makes it hard for observers to determine where one message ends and another begins. And the second is consistent *background noise*. A separate thread (or task) continuously sends decoy packets, attempting to prevent traffic analysis based on communication patterns and timing.
23
+
This library uses decoy packets in two complementary ways, *packet padding* and *cover traffic*. Padding is where the library immediately follows a genuine packet send with a decoy packet. This makes it hard for observers to determine where one message ends and another begins, hiding the genuine packet size. Cover traffic is decoys continuously sent by a separate thread (or task) attempting to prevent traffic analysis based on communication patterns.
24
24
25
25
The goal is not to make bitcoin traffic completely unidentifiable, that maybe impossible, but rather to significantly increase the computational and analytical costs for observers. This creates a game of economic tradeoffs, how much bandwidth and processing power should nodes spend on decoy bytes versus how much effort observers must expend to identify bitcoin traffic? The ideal strategies would use minimal decoy bytes to impose maximum analysis costs on observers. Finding these efficient strategies remains an open research area, but even simple random noise raises the bar for passive network surveillance.
26
26
27
+
*No hard analysis has been done yet on the effectiveness of the following strategies to hide bitcoin p2p channel shape.*
28
+
27
29
### Padding Strategies
28
30
29
31
*`Disabled` - No padding, genuine packet sizes only (default).
30
-
*`Random` - Adds randomly sized decoy packet. Pure noise, no hard analysis has been done on how effective this hides bitcoin p2p channel shape.
32
+
*`Random` - Adds randomly sized decoy packet. Pure noise.
33
+
**TODO*`Fixed` - Pad a message size to its nearest power of two. A mixnet strategy to make all messages look identical and avoid a randomness pattern which leaks information.
31
34
32
35
### Decoy Strategies
33
36
34
37
*`Disabled` - No automatic decoy packets, genuine writes only (default).
35
-
*`Random` - Sends randomly sized decoy packets at random intervals. Pure noise, no hard analysis has been done on how effective this hides bitcoin p2p channel shape.
36
-
38
+
*`Random` - Sends randomly sized decoy packets at random intervals. Pure noise.
39
+
**TODO*`Mimic` - Instead of hiding the bitcoin p2p traffic, embrace it but send even more bitcoin looking things.This could help break any sort of tracking analysis.
0 commit comments