Ethereum Messaging: Explaining Whisper and Status.im

Tonino Jankov
Share

This article will show how Ethereum, rather than being just a cryptocurrency or smart contracts platform, is actually developing into a whole ecosystem.


There are four components to the post-Snowden Web: static content publication, dynamic messages, trustless transactions and an integrated user-interface. — Gavin Wood


In the 1990s, the Internet sprang into existence and, year by year, it has revolutionized the way we communicate, the way we do business, the way we consume news and TV. In many ways, it has democratized access to information, and drastically lowered global communications costs, but it has also raised the average citizen’s expectations in regards to access to communications, news, and privacy.

Websites like Wikileaks, Facebook, Twitter, in the second wave — dubbed Web 2.0 — have, along with other websites, like Youtube, Linkedin, and many personal publishing platforms like WordPress, changed the publishing of information, and made it hard to hide. Whatever news is out there is bound to be revealed, sooner or later.

Governments and officials have gone down because of this. For good and for bad, what began as leaked cables published by Wikileaks in 2010, fomented public revolt in countries like Tunisia, Libya, and sparks later turned to fires that changed the face of the Middle East. At that time, sparked by leaks of governments cables, western countries saw a series of protests as well.

In his book When Google Met Wikileaks, Julian Assange outlined often unholy links between politics, tech giants and the intelligence community. Commenting on Eric Schmidt’s and Jared Cohen’s book The New Digital Age, he rightly notes:

while Mr. Schmidt and Mr. Cohen tell us that the death of privacy will aid governments in “repressive autocracies” in “targeting their citizens,” they also say governments in “open” democracies will see it as “a gift” enabling them to “better respond to citizen and customer concerns”.

The crackdown of financial institutions on Wikileaks then showed us how vulnerable to censorship we are — even in the age of the Internet.

Then came the Snowden revelations, and the public’s illusion about the actual extent to which our privacy is breached on an everyday basis was flushed down the toilet.

It was in this environment that Ethereum was created. Some months after the Snowden revelations, Gavin Wood, co-creator of Ethereum, wrote an article outlining his vision of Web 3.0 — a web which utilizes the internet infrastructure we already have, and cryptography that’s available, along with the blockchain, to build a better internet. This is to include content publishing, messaging, and value transactions — in a decentralized, censorship-proof way, with privacy guaranteed.

Whisper

In the article, Wood outlines an identity-based pseudonymous low-level messaging system, a system that will give its users — both people and ĐApps — hash-based identities, privacy assurances, encrypted messages, cryptographic guarantees about senders, and messages with a defined time-to-live. This system has, for lack of a better word, modular privacy and anonymity, and guarantees of “darkness” — allowing users to opt-in or out of different privacy features. It uses the infrastructure of the Ethereum network.

Whisper is being built as a protocol, meaning that it lays the foundation for higher-level implementations, ĐApps, built on it, with different variations, using different features of the protocol, and different settings. It’s currently at POC 2 stage, being usable in current versions of geth and Parity. The usage on the mainnet is restricted by the number of running, production Ethereum nodes that have the Whisper protocol enabled. The protocol is, we can say, in alpha stage. Many specs will change.

Both Ethereum and Whisper client nodes use the ÐΞVp2p Wire Protocol for their P2P communication. In particular, the RPLx protocol is used, which is described as —

a cryptographic peer-to-peer network and protocol suite which provides a general-purpose transport and interface for applications to communicate via a P2P network.

The Node-discovery algorithm of a decentralized, censorship resistant network is its major part. Ethereum uses adapted Kademlia UDP for this, similar to Bittorrent network’s peer discovery.

Because of the evolving specs, the best place for the current definition of the protocol is Ethereum’s wiki — currently Whisper POC 2 Spec page.

Whisper combines aspects of both DHTs and datagram messaging systems (e.g. UDP).

When designing a system that aims for complete darkness — meaning guaranteed privacy and anonymity — there are performance tradeoffs. This is, we presume, the reason for the choice of UDP, which is lower level, but at the same time faster then TCP, and gives greater control.

This line from the spec that may explain many of the design decisions:

It is designed to be a building block in next generation ÐApps which require large-scale many-to-many data-discovery, signal negotiation and modest transmissions with an absolute minimum of fuss and the expectation that one has a very reasonable assurance of complete privacy.

As the spec says, there’s an important distinction between encryption of messages and pitch-black darkness, which is what the designers of Ethereum are trying to achieve. Today we know that well-funded actors are able to break privacy guarantees even of networks like Tor. For many purposes, merely knowing the destination of someone’s communication can end the needed privacy guarantees, without ever breaking the encryption of the content. (A political party insider communicating to Wikileaks would be one example.) Metadata about our communication, analyzed in sufficient, bulk amounts, can give a lot of data, and sometimes annul the effect of encrypted content.

Recent GDPR legislation in Europe somewhat reflects this.

This is why there’s a need to reach deep — to code a new system starting at a very low level.

Whisper’s POC2 promises a “100% dark operation” — which is a bold claim.

They continue:

This applies not only for metadata collection from inter-peer conduits (i.e. backbone dragnet devices), but even against a much more arduous “100% – 2” attack; i.e. where every node in the network were compromised (though functional) save a pair running ÐApps for people that wanted to communicate without anybody else knowing.

Protocol Elements

The main elements are Envelopes, Messages and Topics.

Envelopes are packets that contain time-to-live (in seconds), expiry (in Unix time), topics (“these might, for example, correspond to “twitter” hash tags or an intended recipient’s public key hashed with some session nonce or application-identity”) and nonce (which provides for proof-of-work requirements for message senders in future implementations). And then there’s the message data field.

The Message data field within an envelope contains the actual message — the payload — and flags and signature. Payloads are encrypted by the sender and decrypted by the recipient, both in one of two ways.

The protocol provides for ranking of peers by the nodes, and ranking of the messages themselves by the work spent in obtaining the nonce that we mentioned before. Proof of bigger work should afford a message bigger priority on the network.

Nodes can advertise their topics of interest to each other. Senders and recipients can opt in or out of different privacy features versus performance features, because this is sometimes a tradeoff.

Proto

Since the spec is currently fluid, and the implementation is being worked on, it’s hard to precisely distinguish what’s already implemented, what’s on the way, and what’s on a level of proposal.

Status.im

Status logo

Status calls itself “A mobile OS, built for Ethereum”. It’s an Ethereum client that’s meant to bring the richness of Ethereum capabilities to smartphones. It was introduced in 2016 at Devcon2 in Shanghai.

Under the hood, the mobile app runs a full implementation of geth. ĐApps are being run on user’s mobile phones. They can be added to chats.

A screenshot of status on a mobile phone

The chat feature is implemented on top of Whisper.

At the time of writing this article (May 2018), Status 0.9.18 is the current release.

Many ĐApps, such as Gnosis, Aragon, Etherisc, Uport, Ethlance, CryptoKitties, Bancor, Peepeth and others are available within the app.

Status combines a messenger and browser running on top of the Ethereum network and is aiming to be a ĐApp browser, enabling developers to reach the users. As such — along with similar projects that may spring up — it’s an important, high-level element in Ethereum and blockchain applications coming to the mainstream. They say their mission is ”to lower the barriers to entry on Ethereum”.

Besides the Ether wallet, and encrypted chat, it also aims to provide a kind of a social network built on top of ĐApps, and the Whisper protocol, with optional levels of anonymity.

Chat

The release article says the following:

In this latest release, group chat has been temporarily disabled so that we can focus efforts on 1–1 and public chat. It will be re-introduced in a future release.

A P2P exchange is meant to facilitate fiat-to-ETH real-world decentralized exchange. Their business model is to charge a small fee for this.

Scheme

Status Network Token

In May 2017, folks from Status announced the Status Network, and the token, SNT — a utility token which is meant to facilitate the functioning of the network and application. It will serve as the mechanism of governance of the client, decentralized push notification market, username registrations using Ethereum Name Service, curation of content, the aforementioned P2P exchange and other features.

The white paper is available here. Judging from CoinMarketCap data, trading information about the token, which can often be used to ascertain how active the project is, Status Network, with market cap of ~$300 000 000 is doing well, and the market seems to have accepted it.

Status Wiki

Status.im wiki has a user guide, and informations for developers, either those who want to build a serverless chatbot, or their own ĐApp, and add it to Status.

Their Open Bounty offers rewards to developers who contribute to development.

The Ecosystem

By building a space for ĐApps to reach the end users, and bringing the Ethereum technology to the masses on a higher level, Status is building an ecosystem. This is further emphasized in their incubator program — “An Incubator Dedicated to Decentralization”.

Status’ Embark is a framework for developing ĐApps. It can be installed via npm:

npm install -g embark

It’s a framework that attempts to unify and ease the usage of all three parts of Web 3 — Swarm, or IPFS, for storage, Whisper or Orbit for communication, Ethereum blockchain with ĐApps itself, and, at last, front-end technologies like React, Foundation, Angular, and different front-end utility tools.

There’s a dashboard, configuration system, a plugins ecosystem. More can be learned here.

The company is incorporated in Zug, Switzerland, with offices in Singapore. The mobile app is being developed, besides the standard Go — the language of geth — in Clojure/Clojurescript, a functional language that lends itself nicely to advanced logic.

Conclusion

Building the Web 3.0 is a big endeavor. Many companies are trying to fix the internet. The success is varying. But the Ethereum project had the vision of changing the Internet from the start. So, to talk about Ethereum just as a cryptocurrency platform, or smart contracts platform, would be an understatement. There is a whole ecosystem being built beside the Ethereum blockchain.

Judging by the adoption of the Ethereum itself, incentives system built in, and the activity around the other two branches — Swarm and Whisper, and projects like Status.im — we have basis to expect some very interesting changes to the Internet as we know it in the coming years.