Commit 4b85b28
committed
Add support for network message padding (
Previous research [1], [2] has shown that the Lightning Network is
susceptible to passive network-layer attacks on privacy that can exploit
metadata leaking from transmitted network messages.
While other factors such as timing come into play, the most severe
information leakage is due to the fact that a passive adversary
monitoring the Noise-encrypted network traffic can still observe clearly
distinguished network message sizes, which allows them to reliably
classify messages by type, and therefore in turn allows them to draw
conclusions on node behavior. In the worst case, this allows a purely
passive off-path adversary able to monitor traffic of multiple nodes on
a payment path to not only observe *that* a payment took place, but also
to identify the payment's endpoints.
To mitigate the information leakage coming from observable network
message sizes, we here propose the introduction of
`option_message_padding`, a simple protocol that allows Lightning
counterparties to opt into padding network messages to fixed size
thresholds large enough to cover `update_add_htlc` messages by including
suitably sized TLV records in all sent TLV stream `extension`s.
This approach will lead to uniform message size distribution for
'normal' day-to-day operations. Note however that messages beyond the
chosen size threshold will still stand out and leak some amount of
information. Moreover, note that we abstained from including padding for
custom messages, as it's not guaranteed that all application-layer
protocols are able to handle TLV streams according to
'it's-okay-to-be-odd' rules (see [3] for some questions around that).
[1]: https://www.research-collection.ethz.ch/bitstream/handle/20.500.11850/611970/paper.pdf
[2]: https://drops.dagstuhl.de/storage/00lipics/lipics-vol316-aft2024/LIPIcs.AFT.2024.12/LIPIcs.AFT.2024.12.pdf
[3]: #1302option_message_padding)1 parent 0cf2151 commit 4b85b28
2 files changed
+66
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
137 | 139 | | |
138 | 140 | | |
139 | 141 | | |
| |||
504 | 506 | | |
505 | 507 | | |
506 | 508 | | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
507 | 567 | | |
508 | 568 | | |
509 | 569 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| 101 | + | |
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
| |||
0 commit comments