Towards a Waku v2 Security Analysis

We are planning to write a research log post introducing a Waku threat model,
and future privacy and anonymity goals.
This will not (yet) be part of a thorough scientific security analysis, and more along the lines of the ProtonMail threat model.

This forum post comprises a non-comprehensive list of aspects the Waku v2 threat model should cover,
and also touches on possible countermeasures, with a focus on Waku’s request response protocols.
(For now, it is just a braindump; I will add more, foremost a list of attacks, after finishing current prio tasks.)
The purpose of this post is starting a discussion and filling in the gaps.

The post on the research log should provide readers with

  • a definition of relevant terms
  • adversarial model(s),
  • a threat model,
  • a list of threats Waku v2 protects against,
  • an explanation of how Waku protects against these threats, and
  • what is out of scope.

The list of attack based threats (detailed in the threat model) should be analyzed in (various) adversarial models. (This can be done informally at first, giving an overview over existing attacks and reasoning as to why we expect these attacks to be thwarted in specific adversarial models.)

Edit: As comments suggest, it makes sense to keep a complete threat model / security analysis as a future goal while having a series of posts on parts, e.g. a post on security / anonymity relay protocol.
Also see @sanaz post on the anonymity of Waku-Relay.

Adversarial Models

Adversarial models describe the power of an attacker.
Power in this context includes but is not limited to

  • access to resources (e.g. nodes controlled in a network)
  • passive vs active: while passive attackers just listen to traffic, active attackers might inject, alter, and drop messages
  • position in the network
    • internal vs external (access to a network link or not)
    • being able to see ingress and/or egress traffic

Dolev-Yao Model

In the Dolev-Yao model the attacker has full control over the whole network and is only limited by the employed cryptographic measures.
Ideally, Waku v2 would provide all of privacy, anonymity, and censorship resistance in this model.
(However, this model is unrealistically strong, and even when introducing some select relaxations, we still have a very strong model.)

Tor Model

Tor research typically models the attacker as either

  • an AS-level attacker that has full access over the infrastructure of an autonomous system, or
  • an attacker that controls p% (often 20%) of the Tor nodes

Tor does not protect against an attacker that can observe both entry and exit node.

A thorough comparison with Tor seems out of scope because Tor’s main application area is web traffic while Waku’s application area is messaging.
For messaging, Waku will have superior anonymity properties: Waku does not depend on low latency and can leverage mix-nets (see below).
A short comparison seems useful though, because many readers will be familiar with Tor and seek an answer to the question how Tor compares to Waku.

Weaker Models


Desired Properties

Guaranteeing Properties like privacy, anonymity, and censorship resistance only makes sense
when these properties are clearly defined, and when stating under which adversarial model they are guaranteed.
The Waku security analysis should define these properties; the following gives some first impression / basis for discussion.


Waku does not involve any trusted third party that has access to user’s private data.
Thus, Waku v2 avoids typical privacy issues by design.

Privacy issues we should investigate in the Waku v2 threat model are security threats that impact the user’s privacy.
Any attack breaching confidentiality would effect the user’s privacy.
Waku v2 provides confidentiality via noise.

However, anonymity can be seen as a part of privacy, too.
Attacks involving meta-data analysis effect the user’s privacy.

Open question: How should we define privacy?

An (incomplete) suggestion:

We define privacy as keeping private information about users and generated by users private, i.e. not disclosing this information to entities the user did not agree to.
In the context of Waku v2, this private information comprises:

  • message content (only disclosed to intended recipients)
  • identity
  • usage patterns

This information must also be protected from inference attacks.


With the above definition of privacy, anonymity is a part of privacy.

Receiver Anonymity

  • hiding the interest in certain topics
  • for any given message, it must be impossible to infer receivers

(Receiver anonymity for 1:1 communication is out of scope for now, because 1:1 communication is not part of Waku.
1:1 communication protocols can be designed on top of Waku v2.
If such a protocol should become part of Waku in the future, it will be included in the Waku threat model.)

Sender Anonymity

It must be impossible to infer the original sender of a message on the Waku v2 layer (and ideally on deeper layers, too).
Protocols running on top of Waku v2, e.g. a 1:1 messaging protocol, can relax this: the receiver is allowed to know who the sender is.

Censorship Resistance

Censorship resistance is a property the threat model has to cover separately.
Even with privacy and anonymity protected, censorship resistance is not guaranteed.

Censorship resistance requires Waku v2 traffic not to be fingerprintable.

Further Security Properties

DoS Resilience


(Focus on attack-based threats.)


  • Collusion of a set of (relay) nodes
    • homomorphous to an attacker controlling a set of nodes

attacks against discv5

Waku v2 uses discv5 as a means of ambient peer discovery.
We have to make sure that ambient peer discovery does not leak additional private information about peers.

Attacks against discv5 comprise

  • Sybil attacks (a general problem)
  • eclipse attacks

Privacy issues in the current version of Waku

  • sender timestamp allows fingerprinting / tracking
  • static PeerID allows tracking and identifying peers

Protection Methods

Sender Anonymity

We could introduce pluggable anonymity in Waku v2, which allows using one of the following mechanisms

  • none
  • Dandelion++
  • mix-net: Nym
  • Tor (as a fallback if mix-net is not accessible)

Because Waku does not require low latency, we can leverage mix-nets like Nym and achieve stronger anonymity guarantees than Tor.
Even with an attacker observing the whole network, mix-nets can protect anonymity.

The pluggable anonymity method could be plugged in between the sender node and the indented receiver peer.
For the relay protocol, the indented receiver would be the first relay node.
All further relay hops would not require any further anonymity methods.

For these mechanisms to work, messages are not allowed to contain identifiers like the PeerID.

protecting timestamps

Instead of setting a sender timestamp, the first relay that sees a message could set the timestamp

  • the message might come directly from the sender in case identity protection is off
  • the message might come from a mixnet (with a slight delay) in case protection is on

However, as @s1fr0 pointed out, an attacker could use the timestamp field to encode and transport information along the relay path.
(To protect anonymity, the timestamp field cannot be authenticated.)

Censorship Resistance

A possible countermeasure against fingerprinting is pluggable transports.


Great to see this coming along!

Although privacy and anonymity are strictly connected, I would keep them as separate concepts. Privacy is about the ability to selectively reveal information to some party, (included identity) while anonymity is the ability to keep your identity (real or artificial) unlinkable from your actions.

In your post was implicit in many points, but I think privacy definition should stress (at least to some extent) reduction of metadata leakages, possibly on all protocol/network layer employed. This is very hard to formalize and probably harder to measure how Waku can be safe from private information inference using available metadata. However I think is worth to mention as one of the security goal we want to achieve, especially because this justifies some implementation choice we have already made and possibly future designs. So, to informally sum up, privacy should not only allow users to be the only one able to selectively decide to whom reveal some of their information, but ideally any of their actions should reveal nothing except the fact that someone is performing something in the network (and in order to address anonymity as well someone should means: never seen before, never seen again and with no obvious relation to anyone else (past and future)).

I also think that Censorship Resistance can be hugely impacted by discovery methods: not only because new joiners can be redirected to all-malicious-nodes parallel networks where extensive (meta)data collection may help in running targeted attacks, but also because it may represent a single point of failure which prevents users to connect to the network at all (I’ve in mind, for example, shutdown of the DNS server used to discover nodes in one of the implemented discovery methods).

Some other possible threats include deliberate backdoors or bugs in the code-base and/or cryptographic primitives/protocol designs employed.

1 Like

Thanks @kaiserd for the forum post!
I have some questions and suggestions:
1- There is an initial security analysis of waku req/reply protocols namely, store, filter, and light-push which you can find in their respective specs, e.g., for Waku-Store protocol 13/WAKU2-STORE | Vac RFC, the analysis provides an initial adversarial model, the security considerations and the definitions of the desired security properties 13/WAKU2-STORE | Vac RFC. I strongly recommend benefiting from that past effort, especially the security definitions.
2- I see you have mentioned

Waku does not require low latency

why is that?
3- What do you mean by “AS-Level” attacker?
4- As each req/reply protocol messages embody different metadata, it would make sense to analyze them separately, as they will be subject to different types of (inference, traffic analysis) attacks.

Another suggestion for keeping the scope of the current analysis more contained and small is to follow a more modular approach i.e., first get focused on the security analysis of the waku-relay, and then later extend the work to the req/reply protocols. I think this was also the initial plan when we wanted to compare Tor with Waku.

Here is the initial waku-relay security analysis research/ at master · vacp2p/research · GitHub

Can you please clarify how you defined 1:1 communication and why is the receiver anonymity out of scope?

@s1fr0 Thank your for your answer!

Although privacy and anonymity are strictly connected, I would keep them as
separate concepts. Privacy is about the ability to selectively reveal
information to some party, (included identity) while anonymity is the ability
to keep your identity (real or artificial) unlinkable from your actions.

Agreed :).

In your post was implicit in many points, but I think privacy definition
should stress (at least to some extent) reduction of metadata leakages,
possibly on all protocol/network layer employed. […]

Agreed. We can use your informal definition in the research log post.
This helps readers quickly grasp the idea.

The treat model I planned would list attacks based on metadata leakage.

I also think that Censorship Resistance can be hugely impacted by discovery methods […]

Yes. One part of the general threat model vs Waku v2 should be about ambient peer discovery.
It does not only effect censorship resistance but the aforementioned metadata leakage, too.
It might leak information about the position of the peer in the network etc…

@sanaz Thank you for the post :).


Yes. I fully agree. This post was more like a dump of my current thoughts.
I will comment on your forum post on the anonymity of Waku-Relay, too.
I also agree that it makes sense to have a first post on the research log that focuses on the relay protocol.
Here, I was aiming at a more general Wakuv2 threat model. While focusing on request response protocols for now, I would also include discovery protocols later on.


For a messaging protocol, I would assume that our latency requirement are not as strict as for interactive web session.
This in turn, would allow us leveraging mix-nets like Nym and get stronger anonymity properties than Tor.


An attacker that controls an entire autonomous system. For instance a malicious ISP.


See 1.
An series of research log post breaking down the threats versus each of the protocols starting with relay would be a nice, imo.
(This is in line with your second comment that I just read ;))
Yet, I still think, a comprehensive threat model (including ambient peer discovery) should be the future goal.
There might be attacks that combine weaknesses in several protocols.

I think this was also the initial plan when we wanted to compare Tor with Waku.

I was just planning to introduce the Tor attacker model, and look at threats vs Waku within this model.
Tor and Waku have different purposes.
Imo, giving an overview over the differences (both technical and from a use-case point of view),
and explaining why Waku can achieve stronger anonymity properties (if we accept higher latency), should be enough.

You could post your existing work here on the research log.
This allows reader to get an overview over Tor, and understand the differences.
I would stress that Tor’s main purpose is anonymous web browsing (incl. downloads and interactive sessions), while Waku’s main purpose is messaging. These purposes pose different restriction on the design, which reflect in their security/privacy/anonymity models.

For current/future work, I would rather focus on the Wakuv2 threat model.

I do not have any specific definition for 1:1 messaging yet.
Just that it would live on top of Waku, and thus receiver anonymity with respect to this protocol outside of Waku, would be out of scope.
I will edit the to make it more clear.

Ofc, if we plan to integrate 1:1 messaging as a Waku protocol, it must be part of the threat model.