The Vac team is excited to present a new raw RFC for a libp2p based Mix Protocol. This protocol aims to address a critical gap in the current libp2p framework: the lack of native support for sender anonymity.
What Makes our Mix Protocol Special?
At its core, the Mix Protocol leverages the Sphinx packet format, a proven method for anonymous communication in mix networks. By routing messages through a series of mix nodes, it ensures that neither intermediary nodes nor the final recipient can trace the sender.
Key features include:
Sphinx Packet Format: Guarantees anonymity and unlinkability through fixed-size packets and layered encryption.
Random Path Selection: Routes messages through a random series of mix nodes, concealing their origin.
Protocol Agnostic: Wraps around existing libp2p protocols without requiring changes to their implementation.
Pluggable Components: Allows for customizable spam protection, peer discovery, and incentivization mechanisms.
Delayed Forwarding: Thwarts timing analysis attacks by introducing random delays in message forwarding.
Anonymity Across All libp2p Protocols
One of the Mix Protocol’s most exciting aspects is its protocol-agnostic nature. It wraps around any existing libp2p protocol – whether it’s for messaging, file sharing, or more – without requiring code changes to existing frameworks. This makes it easier than ever for developers to integrate privacy features into their applications while ensuring sender anonymity.
Why It Matters
The Mix Protocol opens up new possibilities for privacy-preserving applications in the libp2p ecosystem:
Enhanced Anonymity: Add a layer of privacy to existing libp2p applications.
Censorship Resistance: Build networks that are more resilient to surveillance and censorship.
Flexible Integration: Incorporate privacy features without overhauling existing architectures.
Decentralized Privacy: Enhance user privacy without relying on centralized components.
Get Involved
We invite everyone to explore the potential of the Mix Protocol by:
Awesome work and great to see the agnostic approach to the topic. Thank you for that.
Doesn’t libp2p-gossipsub provide some sender anonymity, in this case unlinkability between sender ip and specific message, see On the anonymity of Waku-Relay ?
Some reference to support the following statement would be great please:
libp2p protocols do not inherently protect sender identities.
My understanding is that while libp2p-gossipsub protocol does provide some sender anonymity when StrictNoSign is applied, it is not enough enough to protect specific actors in a system where their network have a predictable pattern.
@fryorcraken the sender anonymity we define for relay/gossipsub is a weak anonymity that does not protect the anonymity of the libp2p endpoints involved in every libp2p transaction (including relay/gossipsub hops). This is of course especially detrimental for req-resp protocols where servers can easily identify and profile the “client” in each exchange. However, knowing the identities of each side of a relay hop also opens up the protocol to a range of fairly trivial deanonymisation attacks (e.g. timing analysis) even if messages are not signed.
TL;DR: existing Relay sender anonymity functions at a higher layer and provides weak anonymity only (see Waku Privacy and Anonymity Analysis Part I: Definitions and Waku Relay | Vac Research). We do not have any anonymity for the sending party on libp2p protocol level.
Thank you both for your insights. @fryorcraken StrictNoSign does offer basic sender anonymity by omitting identifiers like from, signature, and key. However, as @haelius rightly points out, this anonymity is relatively weak and has limitations.
While StrictNoSign provides basic unlinkability, K-anonymity within the mesh, and plausible deniability, it doesn’t protect against:
Powerful adversaries capable of traffic analysis
Targeted attacks, even in weaker attacker models
Deanonymization through timing analysis or correlation of network patterns
Our Mix Protocol aims to address these limitations by providing a more robust, protocol-agnostic solution. We’re working towards stronger anonymity guarantees at the libp2p protocol level, complementing and enhancing the existing privacy features in protocols like GossipSub.
This approach will better protect against sophisticated deanonymization attacks and provide stronger anonymity, particularly in scenarios where the current weak anonymity might be insufficient, such as in networks with predictable patterns.
Our Mix Protocol, while sharing conceptual similarities with Tor (layered encryption and multi-hop routing), is specifically designed for libp2p networks:
libp2p Integration: Seamless integration, providing sender anonymity across libp2p protocols without requiring changes to their implementation.
Decentralized: Operates without reliance on centralized or trusted entities, enhancing resilience and censorship resistance.
Sphinx packet format: Provides stronger protection against certain attacks (e.g., tagging).
Extensibility: Features pluggable components for spam protection, peer discovery, and incentivization, allowing adaptation to various use cases.
While both Tor and our Mix protocol protect sender anonymity, the latter is better suited for decentralized, p2p environments.
Regarding “Decentralized: Operates without reliance on centralized or trusted entities, enhancing resilience and censorship resistance”:
Nodes used for mixing will come from some population and the latter could have a fraction of Byzantine nodes. Presence of these nodes can make the prob. that all mix nodes, selected by the sender, are Byzantine very high.
You raise a valid concern about Byzantine nodes in the mix network. Our protocol design acknowledges this challenge and incorporates several mitigations:
Random path selection: Senders choose mix nodes randomly, reducing the probability of selecting an all-Byzantine path.
Configurable path length: Users can adjust the number of mix nodes in their path, balancing anonymity and Byzantine resistance.
Deanonymization probability analysis: We’re conducting analyses on deanonymization probabilities under various attack models, including AS-level adversaries. Our preliminary results suggest that with proper implementation of Sphinx packet format, random delays, and careful path selection (using 3-4 distinct nodes), we can maintain a low deanonymization probability even against strong adversaries controlling a significant fraction of the network.
Reputation system (planned): We’re exploring reputation mechanisms to help identify and avoid potentially malicious nodes.
While these measures significantly reduce risks, they don’t eliminate them entirely. We’re actively researching additional Byzantine-resistant techniques and welcome community input on further improvements.
Ultimately, the protocol aims to provide strong anonymity guarantees while maintaining a balance with practical usability in decentralized networks.