An Overview of Whisper and its Implementation In SONM

What is Whisper?

Whisper represents a secure messaging system which relies purely on identity based data. Whisper is included by default in Ethereum’s peer-to-peer (P2P) protocol package (go-ethereum/p2p), which enables users to send messages to others via the same network of machines that comprise Ethereum’s network.

The (go-ethereum/p2p) package enables simple and rapid implementation of P2P networking capabilities to any form of application. For instance, alternatively to Whisper, Decentralized hash table (DHT) can be used, with a customizable TTL for each record and conventions to sign and encrypt various message values. As such, Whisper has the ability to manage repeatedly indexed, non-unique sets of records, i.e. a single record is controlled by several keys, some or even all of which can be the same keys of other records.

The delineation between the concepts of “messages” and “envelopes” is tentatively blurred along Whisper’s design. The application is formulated so that it should never determine the difference between both concepts, focusing only on the security and integrity of the conveyed information and avoid any form of “data leakage”. To achieve this, Whisper offers a unique subscription mechanism that allows users to listen to certain Whisper message channels that convey certain topics.


From: myFriendsPubKey,

Fn: func(msg *whisper.Message) { /* … */ },


Sending Messages:

Every time a message is being sent, this is accompanied by a unique process of message sealing, compression and encryption, and in order to verify that the owner of the message has spent computational resources to compress the message, as an incentive, he/she will be given priority to his/her package over other users across the network. This verification process is known as “Proof-of-Work” (PoW) and relies on a simple SHA3 algorithm. Additionally, each message has a lifespan (maximum 2 days), a recipient (recognized by a public key) and a group of message topics.


Message topics are hashed automatically, and only the initial 4 bytes of the resultant SHA3–256 hash function are utilized throughout the process of message data transfer, thus, message topics are unreliable, so filtering is worth considering as a probabilistic approach to topics’ distribution.


Sending messages via Whisper requires encryption of the recipient, so a “struct” has to be used along with a “To” parameter that successfully obtains the recipients’ ECDSA public keys. Listening to message channels is possible via the “watch” method. Accordingly, users can listen to messages of specific recipients, specific topics or simply just messages sent to you.

The flag’s 0 bit determines whether or not a message bears a signature, while all the remaining bits must be randomly set. A message is marked as invalid whenever the 0 bit is set, while the sum of the remaining bits is below 66 bytes.

The data bus is encrypted via either of the following two ways:

1- Messages intended only to one recipient will be encrypted via ECIES and the recipient’s public key will be encrypted via SECP-256k1.

2- Messages with no intended recipients will be encrypted via AES-256 using a randomly formulated key. This key will further shape the topic of the message. Such topics are stored along the same order of the matching topics within the header of the envelope.


Decryption takes place using a private key, if the message’s envelope was encrypted by no more than one sender. In such case, the known full message topic is matched to one of the envelope’s abridged topics; the index is determined and section of the encryption key is decrypted at the beginning of the data segment, so that the final key is retrieved.

Purpose of Encryption:

Encryption guarantees that nodes will not be able to view the messages’ content, as they are only capable of temporarily storing a message without being able to view its content. This represents an essential feature of Whisper’s dark communication approach.

Join the ICO on June 15th :

Sonm Website:
Bitcointalk ANN:
Bitcointalk Bounty Thread:
Telegram (English) @sonm_eng
Telegram (Russian) @sonm_rus