-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d54f8de
commit cf61af5
Showing
50 changed files
with
3,900 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Vuvuzela: Scalable Private Messaging | ||
Copyright (C) 2015 David Lazar | ||
|
||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
|
||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,117 @@ | ||
> *Metadata absolutely tells you everything about somebody's life* | ||
> | ||
> — [Stewart Baker](http://www.nybooks.com/articles/archives/2013/nov/21/snowden-leaks-and-public/), former General Counsel of the NSA | ||
| | ||
|
||
> *We kill people based on metadata* | ||
> | ||
> — [Michael Hayden](https://www.youtube.com/watch?v=kV2HDM86XgI&t=17m53s), former Director of the NSA | ||
# Vuvuzela | ||
|
||
Vuvuzela is a scalable private messaging system that hides metadata. | ||
The code will be available soon, but please read our | ||
[SOSP paper](http://sigops.org/sosp/sosp15/current/2015-Monterey/printable/136-hooff.pdf) | ||
in the meantime. | ||
Vuvuzela is a messaging system that protects the privacy of message contents | ||
and message metadata. Users communicating through Vuvuzela do not reveal who | ||
they are talking to, even in the presence of powerful nation-state adversaries. | ||
Our [SOSP 2015 paper](https://davidlazar.org/papers/vuvuzela.pdf) explains | ||
the system, its threat model, performance, limitations, and more. | ||
|
||
Vuvuzela is the first system that provides strong metadata privacy while | ||
scaling to millions of users. Previous systems that hide metadata using | ||
Tor (such as [Pond](https://pond.imperialviolet.org/)) are prone to traffic | ||
analysis attacks. Systems that encrypt metadata using techniques like | ||
DC-nets and PIR don't scale past thousands of users. | ||
|
||
Vuvuzela uses efficient cryptography ([NaCl](http://nacl.cr.yp.to)) to hide as | ||
much metadata as possible and adds noise to metadata that can't be encrypted | ||
efficiently. This approach provides less privacy than encrypting all of the | ||
metadata, but it enables Vuvuzela to support millions of users. Nonetheless, | ||
Vuvuzela adds enough noise to thwart adversaries like the NSA and guarantees | ||
[differential privacy](https://en.wikipedia.org/wiki/Differential_privacy) for | ||
users' metadata. | ||
|
||
|
||
## Screenshots | ||
|
||
**A conversation in the Vuvuzela client** | ||
|
||
![client](https://github.com/davidlazar/vuvuzela/blob/master/screenshots/client.gif) | ||
|
||
In practice, the message latency would be around 20s to 40s, depending | ||
on security parameters and the number of users connected to the system. | ||
|
||
**Noise generated by the Vuvuzela servers** | ||
|
||
![server](https://github.com/davidlazar/vuvuzela/blob/master/screenshots/server.gif) | ||
|
||
Vuvuzela is unable to encrypt two kinds of metadata: the number of idle users | ||
(connected users without a conversation partner) and the number of active users | ||
(users engaged in a conversation). Without noise, a sophisticated adversary | ||
could use this metadata to learn who is talking to who. However, the Vuvuzela | ||
servers generate noise that perturbs this metadata so that it is difficult to | ||
exploit. | ||
|
||
|
||
## Usage | ||
|
||
Follow these steps to run the Vuvuzela system locally using the provided | ||
sample configs. | ||
|
||
1. Install Vuvuzela (assuming `GOPATH=~/go`): | ||
|
||
$ go get github.com/davidlazar/vuvuzela/... | ||
|
||
The remaining steps assume `PATH` contains `~/go/bin` and that the | ||
current working directory is `~/go/src/github.com/davidlazar/vuvuzela`. | ||
|
||
2. Start the last Vuvuzela server: | ||
|
||
$ vuvuzela-server -conf confs/local-last.conf | ||
|
||
3. Start the middle server (in a new shell): | ||
|
||
$ vuvuzela-server -conf confs/local-middle.conf | ||
|
||
4. Start the first server (in a new shell): | ||
|
||
$ vuvuzela-server -conf confs/local-first.conf | ||
|
||
5. Start the entry server (in a new shell): | ||
|
||
$ vuvuzela-entry-server -wait 1s | ||
|
||
6. Run the Vuvuzela client: | ||
|
||
$ vuvuzela-client -conf confs/alice.conf | ||
|
||
The client supports these commands: | ||
|
||
* `/dial <user>` to dial another user | ||
* `/talk <user>` to start a conversation | ||
* `/talk <yourself>` to end a conversation | ||
|
||
|
||
## Deployment considerations | ||
|
||
This Vuvuzela implementation is not ready for wide-use deployment. | ||
In particular, we haven't yet implemented these crucial components: | ||
|
||
* **Public Key Infrastructure**: | ||
Vuvuzela assumes the existence of a PKI in which users can privately | ||
learn each others public keys. This implementation uses `pki.conf` | ||
as a placeholder until we integrate a real PKI. | ||
|
||
* **CDN to distribute dialing dead drops**: | ||
Vuvuzela's dialing protocol (used to initiate conversations) uses a | ||
lot of server bandwidth. To make dialing practical, Vuvuzela should | ||
use a CDN or BitTorrent to distribute the dialing dead drops. | ||
|
||
There is a lot more interesting work to do. See the | ||
[issue tracker](https://github.com/davidlazar/vuvuzela/issues) | ||
for more information. | ||
|
||
|
||
## Acknowledgements | ||
|
||
This code is written by David Lazar with contributions from | ||
Jelle van den Hooff, Nickolai Zeldovich, and Matei Zaharia. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package vuvuzela | ||
|
||
import ( | ||
"encoding/json" | ||
"fmt" | ||
"io" | ||
|
||
"github.com/davidlazar/go-crypto/encoding/base32" | ||
"golang.org/x/crypto/nacl/box" | ||
) | ||
|
||
type BoxKey [32]byte | ||
|
||
func GenerateBoxKey(rand io.Reader) (publicKey, privateKey *BoxKey, err error) { | ||
pub, priv, err := box.GenerateKey(rand) | ||
return (*BoxKey)(pub), (*BoxKey)(priv), err | ||
} | ||
|
||
func (k *BoxKey) Key() *[32]byte { | ||
return (*[32]byte)(k) | ||
} | ||
|
||
func (k *BoxKey) String() string { | ||
return base32.EncodeToString(k[:]) | ||
} | ||
|
||
func KeyFromString(s string) (*BoxKey, error) { | ||
key := new(BoxKey) | ||
b, err := base32.DecodeString(s) | ||
if err != nil { | ||
return nil, fmt.Errorf("base32 decode error: %s", err) | ||
} | ||
if copy(key[:], b) < 32 { | ||
return nil, fmt.Errorf("short key") | ||
} | ||
return key, nil | ||
} | ||
|
||
func (k *BoxKey) MarshalJSON() ([]byte, error) { | ||
return json.Marshal(k.String()) | ||
} | ||
|
||
func (k *BoxKey) UnmarshalJSON(b []byte) error { | ||
var s string | ||
if err := json.Unmarshal(b, &s); err != nil { | ||
return err | ||
} | ||
bs, err := base32.DecodeString(s) | ||
if err != nil { | ||
return fmt.Errorf("base32 decode error: %s", err) | ||
} | ||
if copy(k[:], bs) < 32 { | ||
return fmt.Errorf("short key") | ||
} | ||
return nil | ||
} | ||
|
||
type BoxKeys []*BoxKey | ||
|
||
func (keys BoxKeys) Keys() []*[32]byte { | ||
xs := make([]*[32]byte, len(keys)) | ||
for i := range keys { | ||
xs[i] = (*[32]byte)(keys[i]) | ||
} | ||
return xs | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"MyName": "alice", | ||
"MyPublicKey": "j10hpqtgnqc1y21xp5y7yamwa32jvdp89888q2semnxg95j4v82g", | ||
"MyPrivateKey": "82v7008ke1dyzatzq04mrtnxt5s92vnfxpdgr61rbtw30hbge330" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"MyName": "bob", | ||
"MyPublicKey": "nhd9ja88j65zwmnszw0b12zg1wqgqqmq382tafyw3gd642e9s1ag", | ||
"MyPrivateKey": "wqdzrmdyvk7ee8w37r8ey56pt5dkkfz64039qhzv3w81a75bgsc0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"ServerName": "local-first", | ||
"DebugAddr": ":12718", | ||
"PublicKey": "pd04y1ryrfxtrayjg9f4cfsw1ayfhwrcfd7g7emhfjrsc4cd20f0", | ||
"PrivateKey": "v5sr0d6d2efr3hrbfw5qxxsnvhqh44kkqed1f43txe4qr8rhk310", | ||
"ConvoMu": 1000.0, | ||
"ConvoB": 4.0, | ||
"DialMu": 100.0, | ||
"DialB": 4.0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"ServerName": "local-last", | ||
"ListenAddr": ":2720", | ||
"DebugAddr": ":12719", | ||
"PublicKey": "fkaf8ds0a4fmdsztqzpcn4em9npyv722bxv2683n9fdydzdjwgy0", | ||
"PrivateKey": "bvypy8wgg8a5tag3zw8r4atx8e31qcdrqxvveaz5cdv46s5sjyb0", | ||
"ConvoMu": 1000.0, | ||
"ConvoB": 4.0, | ||
"DialMu": 100.0, | ||
"DialB": 4.0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"ServerName": "local-middle", | ||
"ListenAddr": ":2719", | ||
"PublicKey": "349bs143gvm7n0kxwhsaayeta2ptjrybwf37s4j7sj0yfrc3dxs0", | ||
"PrivateKey": "c7g9y76ehpc90w3a9t541705enragpzg6p588b5xn8pnvk0a5h50", | ||
"ConvoMu": 1000.0, | ||
"ConvoB": 4.0, | ||
"DialMu": 100.0, | ||
"DialB": 4.0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"People": { | ||
"alice": "j10hpqtgnqc1y21xp5y7yamwa32jvdp89888q2semnxg95j4v82g", | ||
"bob": "nhd9ja88j65zwmnszw0b12zg1wqgqqmq382tafyw3gd642e9s1ag" | ||
}, | ||
"Servers": { | ||
"local-first": { | ||
"Address": "localhost", | ||
"PublicKey": "pd04y1ryrfxtrayjg9f4cfsw1ayfhwrcfd7g7emhfjrsc4cd20f0" | ||
}, | ||
"local-middle": { | ||
"Address": "localhost:2719", | ||
"PublicKey": "349bs143gvm7n0kxwhsaayeta2ptjrybwf37s4j7sj0yfrc3dxs0" | ||
}, | ||
"local-last": { | ||
"Address": "localhost:2720", | ||
"PublicKey": "fkaf8ds0a4fmdsztqzpcn4em9npyv722bxv2683n9fdydzdjwgy0" | ||
} | ||
}, | ||
"ServerOrder": ["local-first", "local-middle", "local-last"], | ||
"EntryServer": "ws://localhost:8080" | ||
} |
Oops, something went wrong.