-
Notifications
You must be signed in to change notification settings - Fork 522
BOLT1: Add support for network message padding (feature ??) #1304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
4b85b28 to
dd85700
Compare
option_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]: lightning#1302
dd85700 to
c81def0
Compare
|
Hmm. We already have ping messages for this? And they have the advantage that they can create completely bogus messages. The more germane question is how to determine appropriate padding values? I haven't been able to come up with a great answer for this yet :( |
Oh, how are ping messages connected? I agree they could be used as cover traffic once we have network message padding, i.e., all messages are the same size, but otherwise I don't see how they are connected?
Yeah, in the LDK draft implementation I just chose Note that in the last spec meeting everybody (including me) seemed to prefer to add padding at the BOLT8 transport layer rather than going with the (arguably pretty hacky) TLV-based approach in this draft PR. There were however some confusions around whether or not this would be possible without a v2 noise/BOLT8 protocol, which I hope to discuss/clarify further in today's meeting. |
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 coverupdate_add_htlcmessages by including suitably sized TLV records in all sent TLV streamextensions.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 #1302 for some questions around that).
A draft of a reference implementation can be found over at lightningdevkit/rust-lightning#4248
Some sidenotes on the chosen approach/current PR: