Repository navigation
p2p: assign separate network keys to outbound onion connections - #34456
frankomosh wants to merge 2 commits into
Conversation
Outbound onion connections appear distinct to external observers (different Tor circuits). Sharing a network_id might allow correlation of inv broadcast timing or addr response caching across apparently unrelated peers. Assign a deterministic network_id per onion destination to break that vector.
…n connections Verifies that: - different onion destinations receive different keys - same destination receives same key (deterministic) - non-onion outbound remains grouped (no regression)
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process. LLM Linter (✨ experimental)Possible places where named args for integral literals may be used (e.g.
2026-01-30 06:30:38 |
Broadcasting time for invs for outbounds shouldn't be correlated? |
Thanks @ajtowns. I seemingly overstated the inv correlation part. I have updated the description to focus on addr caching. |
mzumsande
left a comment
There was a problem hiding this comment.
The motivation of #33464 was to make fingerprinting of identities from different network harder. But this doesn't apply here, so I wonder what we are trying to prevent / what does an attacker gain from linking the connections?
This one focuses on intra-network linkability. A scenario: Attacker runs multiple onion sybil peers. When the same victim connects to 3 of them, all 3 connections would share the same m_network_key, thus the same addr cache bucket. For this reason, the attackers might observe identical response contents and timings, and this would be a strong signal these are the same node. (maybe after longer term behavioral analysis the attacker might deanonymize the victim here). Separation of network_ids would make each peer to have independent cache buckets, responses differs and therefore correlation becomes much harder. |
|
Addr caching also seems irrelevant because we ignore GETADDR requests from outbound peers - we only send getaddr answers to inbounds. So even if we decided to care about intra-network linkability, I think that this change doesn't achieve anything. |
|
Seems like this PR should be closed? |
This PR is inspired by sipa's suggestion in #33464 (comment).
Outbound onion connections use distinct Tor circuits and appear unrelated externally. Sharing a network_id might allow correlation via addr caching behaviour (e.g.,
GetAddresses()responses), enabling an observer to link apparently distinct connections.Changes proposed here assign each outbound onion connection a unique, deterministic network_id based on its destination address.
Unchanged: