Whisper 
What and Why
Consensus is Expensive 
Avoid use for pure comms
Comms patterns in MMUs 
Static content publication 
e.g. BitTorrent, FTP 
Connection (betwixt identities) 
e.g. VoIP, RTC 
Transient Datagrams 
e.g. Twitter, IM, registries
Datagram patterns in MMUs 
Wholly directed 
e.g. IM, e-mail 
Partially directed 
e.g. Mailing list, usenet 
Filterable global 
e.g. Twitter, registries, content-search
Static Content 
DHT/Swarm 
(See later talk)
RTC Connection 
Raw P2P Connection 
Thin layer over ÐΞVp2p
Routing privacy is 
important 
Encryption alone won’t keep your 
information safe
Whisper 
Hybrid DHT and messaging system 
Dark 
...probabilistic message forwarding 
Subject-key orientated 
...no indication of encryption, no notion of recipient
Is it a DHT? 
Multi-key 
...many ‘topics’ associated with entries 
Multi-value 
...many entries can have the same key-set 
Transient 
...entries have explicit expiry
Is it a Datagram Transport Layer? 
Broadcast/multicast/unicast 
...always secure & authenticated 
Asynchronous 
...packets have a TTL
Anti-DoS/SPAM 
Proof-of-work, 
good-behaviour incentivisation
Always Identity, 
Never Endpoint 
Endpoint is implementation detail
Configurable 
User makes efficiency/privacy tradeoff
Topic-based 
Watch for topic subsets, act accordingly
Secure 
Unicast vs broadcast = Encrypted vs plain
Authenticated 
Origin vs anonymous = Signed vs unsigned
What it’s not 
Point-to-point 
High bandwidth 
Low latency 
Application-level 
Connection-oriented
Two Routes to Routing 
Passive 
...peer steering through rotation against past usefulness 
Active 
...topic advertising through masks
Prioritised Forwarding 
Serve your peers well or risk disconnection 
Interesting Topics 
...prioritise messages in which peer has expressed interest 
Lowest TTL 
...prioritise short-lived messages 
Highest Proof-of-Work 
...prioritise messages for which a greater proof-of-work has been conducted
Masking/Filtering 
Stacking the odds with topic masks 
Configurable 
...masks can use configurable number of bits to give info to peers 
Customised per peer 
...more trusted peers can be better informed 
Customised per ÐApp 
...more sensitive ÐApps can have greater privacy
Masking/Filtering 
Forming the topic vortex 
Consolidation of masks & forwarding 
...masks of all other peers are consolidated packaged and resent 
log(N) distance for mask precision 
...information drops-off further away from peer as net increases
API 
Three functions 
newIdentity 
...create a new identity (i.e. key pair) 
post 
...post an entry/message 
watch 
...watch for new entries/messages on the system
newIdentity 
var key = newIdentity();
post 
shh.post({ 
optionally "from": owned public key, 
optionally "to": public key, 
"topics": [ ..., ... ], 
"payload": ..., 
"ttl": integer, 
"priority": integer 
});
watch 
var w = shh.watch({ 
optionally "to": owned public key, 
"filter": [ ..., ... ], 
}); 
w.changed(function(m) { ... }); 
var ms = w.messages(); 
w.uninstall();
Example 
var myIdentity = shh.newIdentity(); 
shh.post({ 
"from": myIdentity, 
"topics": [ web3.fromAscii(appName) ], 
"payload": [ web3.fromAscii(myName), 
web3.fromAscii("What is your name?") ], 
"ttl": 100, 
"priority": 1000 
}); 
var replyWatch = shh.watch({ 
"filter": [ web3.fromAscii(appName), myIdentity ], 
"to": myIdentity 
}); 
replyWatch.arrived(function(m) 
{ 
// new message m 
console.log("Reply from " + 
web3.toAscii(m.payload) + " whose address is " + 
m.from; 
});
Example 
var broadcastWatch = shh.watch({ "filter": [ 
web3.fromAscii(appName) ] }); 
broadcastWatch.arrived(function(m) 
{ 
if (m.from != myIdentity) 
{ 
// new message m: someone's asking for our name. Let's 
tell them. 
var broadcaster = web3.toAscii(m.payload).substr(0, 
32); 
console.log("Broadcast from " + broadcaster + "; 
replying to tell them our name."); 
shh.post({ 
"from": eth.key, 
"to": m.from, 
"topics": [ eth.fromAscii(appName), m.from ], 
"payload": [ eth.fromAscii(myName) ], 
"ttl": 2, 
"priority": 500 
}); 
} 
});
Not yet covered 
Multicasting (shared-secret dispersal) 
Plausible deniability of authoring (Daniel?) 
Security, privacy and scalability modelling: 
how good is it?
Whisper 
What and Why 
Questions

Whisper

  • 1.
  • 2.
    Consensus is Expensive Avoid use for pure comms
  • 3.
    Comms patterns inMMUs Static content publication e.g. BitTorrent, FTP Connection (betwixt identities) e.g. VoIP, RTC Transient Datagrams e.g. Twitter, IM, registries
  • 4.
    Datagram patterns inMMUs Wholly directed e.g. IM, e-mail Partially directed e.g. Mailing list, usenet Filterable global e.g. Twitter, registries, content-search
  • 5.
    Static Content DHT/Swarm (See later talk)
  • 6.
    RTC Connection RawP2P Connection Thin layer over ÐΞVp2p
  • 7.
    Routing privacy is important Encryption alone won’t keep your information safe
  • 8.
    Whisper Hybrid DHTand messaging system Dark ...probabilistic message forwarding Subject-key orientated ...no indication of encryption, no notion of recipient
  • 9.
    Is it aDHT? Multi-key ...many ‘topics’ associated with entries Multi-value ...many entries can have the same key-set Transient ...entries have explicit expiry
  • 10.
    Is it aDatagram Transport Layer? Broadcast/multicast/unicast ...always secure & authenticated Asynchronous ...packets have a TTL
  • 11.
  • 12.
    Always Identity, NeverEndpoint Endpoint is implementation detail
  • 13.
    Configurable User makesefficiency/privacy tradeoff
  • 14.
    Topic-based Watch fortopic subsets, act accordingly
  • 15.
    Secure Unicast vsbroadcast = Encrypted vs plain
  • 16.
    Authenticated Origin vsanonymous = Signed vs unsigned
  • 17.
    What it’s not Point-to-point High bandwidth Low latency Application-level Connection-oriented
  • 18.
    Two Routes toRouting Passive ...peer steering through rotation against past usefulness Active ...topic advertising through masks
  • 19.
    Prioritised Forwarding Serveyour peers well or risk disconnection Interesting Topics ...prioritise messages in which peer has expressed interest Lowest TTL ...prioritise short-lived messages Highest Proof-of-Work ...prioritise messages for which a greater proof-of-work has been conducted
  • 20.
    Masking/Filtering Stacking theodds with topic masks Configurable ...masks can use configurable number of bits to give info to peers Customised per peer ...more trusted peers can be better informed Customised per ÐApp ...more sensitive ÐApps can have greater privacy
  • 21.
    Masking/Filtering Forming thetopic vortex Consolidation of masks & forwarding ...masks of all other peers are consolidated packaged and resent log(N) distance for mask precision ...information drops-off further away from peer as net increases
  • 22.
    API Three functions newIdentity ...create a new identity (i.e. key pair) post ...post an entry/message watch ...watch for new entries/messages on the system
  • 23.
    newIdentity var key= newIdentity();
  • 24.
    post shh.post({ optionally"from": owned public key, optionally "to": public key, "topics": [ ..., ... ], "payload": ..., "ttl": integer, "priority": integer });
  • 25.
    watch var w= shh.watch({ optionally "to": owned public key, "filter": [ ..., ... ], }); w.changed(function(m) { ... }); var ms = w.messages(); w.uninstall();
  • 26.
    Example var myIdentity= shh.newIdentity(); shh.post({ "from": myIdentity, "topics": [ web3.fromAscii(appName) ], "payload": [ web3.fromAscii(myName), web3.fromAscii("What is your name?") ], "ttl": 100, "priority": 1000 }); var replyWatch = shh.watch({ "filter": [ web3.fromAscii(appName), myIdentity ], "to": myIdentity }); replyWatch.arrived(function(m) { // new message m console.log("Reply from " + web3.toAscii(m.payload) + " whose address is " + m.from; });
  • 27.
    Example var broadcastWatch= shh.watch({ "filter": [ web3.fromAscii(appName) ] }); broadcastWatch.arrived(function(m) { if (m.from != myIdentity) { // new message m: someone's asking for our name. Let's tell them. var broadcaster = web3.toAscii(m.payload).substr(0, 32); console.log("Broadcast from " + broadcaster + "; replying to tell them our name."); shh.post({ "from": eth.key, "to": m.from, "topics": [ eth.fromAscii(appName), m.from ], "payload": [ eth.fromAscii(myName) ], "ttl": 2, "priority": 500 }); } });
  • 28.
    Not yet covered Multicasting (shared-secret dispersal) Plausible deniability of authoring (Daniel?) Security, privacy and scalability modelling: how good is it?
  • 29.
    Whisper What andWhy Questions