“IT ALL STARTED WITH A BAD ANALOGY…”
So, you remember how you used to pass around chits during the class to communicate effectively? Yeah well, that’s essentially what Whisper is. It’s a platform where decentralised apps (DApps) can communicate with each other. Moreover, the ink being used in these chits fades away after some time. That means that each message over Whisper is transient in nature. The messages sent have topics associated with them and they’re delivered to DApps which have subscribed to that particular topic over that node. Whisper has an advantage over smart contracts in the sense that they don’t require “gas” (a token of currency) to be sent by the sender in order to get the message delivered. Small messages can be shared using whisper freely and the anonymity it offers is central to its nature. The nodes in-between don’t know about the communication happening between the sender and the receiver.
The function of keys is done by the topics of each message. Each message can have multiple topics associated with it and there can be multiple messages sharing the same topic. Whisper communication involves the Whisper envelope (which carries information such as Hash, Topic, Expiry, etcetera) and the Whisper message (Key of the sender, information of the sender, the identity of the receiver, the content of interest, etcetera).
But like any chit passing game, the teacher catches up to you eventually. The Whisper Envelopes are not encrypted and can be comprehended by any node. However, remember using that fading ink? Well, here it is! Even if the envelope is not encrypted, the messages are. So the payload of the message remains secure even if the nature of information being transmitted is revealed to some extent.
COMMUNICATION IS THE KEY
Now obviously, there are a few tradeoffs to be made when it comes to efficiency and privacy. In case the privacy is of utmost importance, the whisper message will reach the intended receiver later than when efficiency would be more important (but then the intermediate nodes will have more access to the data being shared). Obviously this leads to a lot of communication patterns which can be employed by Whisper users:
- Anonymous Broadcast: In this case, there is neither an intended receiver of the message nor is the ‘From’ column signed with the private key of the sender. Basically, anyone on the node can comprehend this message. This is you spreading propaganda against your math teacher by distributing pamphlets while wearing a mask.
- Clear Signed Broadcast: In this form of communication, the identity of the sender is known but there is no specific receiver. This is you challenging your math teacher in class for giving the wrong proof of the Pythagorean theorem.
- Encrypted Anonymous Message: This is when the sender is unknown but the message is encrypted and can only be decrypted by the private key of a particular receiver. This is you going overboard and legit leaving threatening messages on your math teacher’s desk.
- Encrypted Signed Message: This is when the identity of the sender and the identity of the receiver are both defined. This is you making parle with your math teacher in private.
NEVER TOO LATE TO SEND YOUR FIRST MESSAGE!
Now if you wish to send a Whisper message, you’ll need the entire data set ready to be used. You will have to provide arguments for the new message, decide whether ‘to’ and ‘from’ fields are to be filled, and then you will have to seal the envelope by spending the required amount of work by hashing the data. Once all the steps are completed, your message will be injected in the Whisper Message Queue.
Now there are two types of routing at play here: Passive and Active. We explained earlier how the sender can configure the way a message reaches its recipients. Even though Whisper has secured functions, even an IP address is enough for attackers to sniff out as to who is attacking whom. Thus, one must trade on efficiency in order to grain privacy. This trade-off for privacy is what we call ‘dark’ communication. This form of communication is probabilistic in nature and doesn’t notify other nodes on the same network unless they have something to do with the message.