Skip to content
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

[Feature Request] Add optional jitter to forwarded HTLCs #5288

Open
ajpwahqgbi opened this issue May 11, 2021 · 2 comments
Open

[Feature Request] Add optional jitter to forwarded HTLCs #5288

ajpwahqgbi opened this issue May 11, 2021 · 2 comments
Labels
brainstorming Long term ideas/discussion/requests for feedback feature request Requests for new features htlcswitch P3 might get fixed, nice to have

Comments

@ajpwahqgbi
Copy link

The precise timing of HTLC forwards can enable an on-path adversary to determine with some accuracy the full payment path. One possible mitigation is to add jitter to each forwarded HTLC, like this C-Lightning plugin.

Serious thought needs to be put into this feature to actually withstand serious statistical analysis. Of course it should be optional, and off by default.

@carlaKC carlaKC added htlcswitch P3 might get fixed, nice to have labels May 12, 2021
@carlaKC
Copy link
Collaborator

carlaKC commented May 12, 2021

Serious thought needs to be put into this feature to actually withstand serious statistical analysis.

Definitely. From what I understand of the timing delays utilized on the base layer, they're ineffective against a large-scale attacker (ie a chainanalysis type), so we wouldn't want to add something like this to lnd if we're not certain that it will have the desired privacy gain. Would you be willing to spend some time looking into the kind of jitter that would be effective?

The feasibility of timing attacks relies on the possibility to build a reliable model of latencies, and on the adversary’s capability of observing and correlating of suitable interactive multi-hop message exchanges, such as the current update_add_htlc, update_fail_htlc, and update_fulfill_htlc message payloads.

The above is from the paper, which I admit to only skimming, I wonder how it will hold up once AMP is deployed and HTLCs that are split into multiple parts have distinct payment hashes?

@ajpwahqgbi
Copy link
Author

Would you be willing to spend some time looking into the kind of jitter that would be effective?

Yes, but I can't commit to any specific time line. I'll look into this more deeply "eventually".

I wonder how it will hold up once AMP is deployed[?]

It's a good question, but I think the real problem is not this specific attack but that HTLC message timing leaks information about the payment path.

In fact the scope of this issue should really go beyond merely adding jitter. Adding noise is only one possible mitigation. It's probably worthwhile to look at the techniques cryptographers use to prevent leakage of secret data through timing and power side-channels. I suspect at least some of those techniques are directly applicable to this problem, too.

@carlaKC carlaKC added brainstorming Long term ideas/discussion/requests for feedback feature request Requests for new features labels May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brainstorming Long term ideas/discussion/requests for feedback feature request Requests for new features htlcswitch P3 might get fixed, nice to have
Projects
None yet
Development

No branches or pull requests

2 participants