Blockchain has enabled decentralized value transfer. A bigger future is decentralized messaging. One unresolved area is anonymous message broadcasting which provides metadata privacy(who is sender, who is receiver, who send to whom, IP address, location, et cetera).
Raven is an anonymous message broadcasting network which is decentralized, censorship resistance, privacy preserving and scalable. Anyone can send/receive, broadcast messages anonymously without revealing message metadata.
It has two main use cases, one is decentralized messaging applications for humans, e.g., whistleblowing, anonymous group chat, anonymous survey, privacy preserved message broadcasting for decentralized applications. The other use case is for protecting blockchain against deanonymization attacks thereby DoS attacks in which network adversary links transaction/block/attestation to IP addresses and other sensitive metadata.
Anonymity is achieved by implementing Dandelion++ protocol on top of libp2p's Gossipsub module, Dandelion is a privacy preserving protocol to enable message sender anonymity, it has two phases. The first phase is stem phase, where messages go through a psuedo-random path. The second phase is fluffing. At a random time during the stem phase, the message is diffused to its surrounding peers, so the third party observer cannot track back the message to the original node who send the message, because the message is relayed through an anonymous graph. Message broadcasting is implemented by libp2p's gossipsub. Dandelion++ is an improved version of Dandelion.
**Dandelion++ implementation on libp2p-pubsub**: https://github.com/rairyx/go-libp2p-pubsub/
**What it demonstrates**: Three Go peers, one JS peer are all created and run a chat server using a shared PubSub topic. Typing text in any peer sends it to all the other peers.
**Quick test**: `cd pubsub` and then run `./test/test.sh`. Requires Terminator (eg, `sudo apt-get install terminator`). The rest of this section describes how to test manually.
The bootstrapper creates a new libp2p node, subscribes to the shared topic string, spawns a go routine to emit any publishes to that topic, and then waits forever.
(Note that the node ID of `raven` is going to be `Qm...6aJ9oRuEzWa`. Node IDs in libp2p are just public keys, and the public key `Qm...6aJ9oRuEzWa` is derived from the private key file `../util/private_key.bin.bootstrapper.Wa`. That file is just an X.509 keypair generated by the included program `util/private-key-gen`). We use fixed public/private keypairs for each node in this example to keep things simple.)
This peer, which is not in bootstrapper mode, creates a node, subscribes to the shared topic string, spawns the same go routine, and then loops forever requesting user input and publishing each line to the topic.
**Third terminal**: Create another go peer to connect to bootstrapper and publish on the topic