vuvuzela

package module
v0.0.0-...-35a3d4e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2015 License: GPL-2.0 Imports: 18 Imported by: 0

README

Metadata absolutely tells you everything about somebody's life

Stewart Baker, former General Counsel of the NSA

|

We kill people based on metadata

Michael Hayden, former Director of the NSA

Vuvuzela

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 explains the system, its threat model, performance, limitations, and more. Our SOSP 2015 slides give a more graphical overview of the system.

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) are prone to traffic analysis attacks. Systems that encrypt metadata using techniques like DC-nets and PIR don't scale beyond thousands of users.

Vuvuzela uses efficient cryptography (NaCl) 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 for users' metadata.

Screenshots

A conversation in the Vuvuzela client

client

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

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, requires Go 1.4 or later):

     $ 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.

  1. Start the last Vuvuzela server:

     $ vuvuzela-server -conf confs/local-last.conf
    
  2. Start the middle server (in a new shell):

     $ vuvuzela-server -conf confs/local-middle.conf
    
  3. Start the first server (in a new shell):

     $ vuvuzela-server -conf confs/local-first.conf
    
  4. Start the entry server (in a new shell):

     $ vuvuzela-entry-server -wait 1s
    
  5. 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 for more information.

Acknowledgements

This code is written by David Lazar with contributions from Jelle van den Hooff, Nickolai Zeldovich, and Matei Zaharia.

Documentation

Overview

Types used by the entry server and client

Index

Constants

View Source
const (
	SizeMessage = 240

	// Eventually this might be dynamic, but one bucket is usually
	// sufficient if users don't dial very often.
	TotalDialBuckets = 1

	DialWait           = 10 * time.Second
	DefaultReceiveWait = 5 * time.Second

	DefaultServerAddr = ":2718"
	DefaultServerPort = "2718"
)
View Source
const (
	SizeEncryptedMessage = SizeMessage + box.Overhead
	SizeConvoExchange    = int(unsafe.Sizeof(ConvoExchange{}))
	SizeEncryptedIntro   = int(unsafe.Sizeof(Introduction{})) + onionbox.Overhead
	SizeDialExchange     = int(unsafe.Sizeof(DialExchange{}))
)

Variables

This section is empty.

Functions

func BackwardNonce

func BackwardNonce(round uint32) *[24]byte

func FillWithFakeDoubles

func FillWithFakeDoubles(dest [][]byte, nonce *[24]byte, nextKeys []*[32]byte)

func FillWithFakeIntroductions

func FillWithFakeIntroductions(dest [][]byte, noiseCounts []int, nonce *[24]byte, nextKeys []*[32]byte)

func FillWithFakeSingles

func FillWithFakeSingles(dest [][]byte, nonce *[24]byte, nextKeys []*[32]byte)

func ForwardNonce

func ForwardNonce(round uint32) *[24]byte

func InitConvoService

func InitConvoService(srv *ConvoService)

func InitDialService

func InitDialService(srv *DialService)

func Intn

func Intn(rand io.Reader, n int) int

func KeyDialBucket

func KeyDialBucket(key *BoxKey, buckets uint32) uint32

func NewConvoRound

func NewConvoRound(client *vrpc.Client, round uint32) error

func NewDialRound

func NewDialRound(client *vrpc.Client, round uint32) error

func RunConvoRound

func RunConvoRound(client *vrpc.Client, round uint32, onions [][]byte) ([][]byte, error)

func RunDialRound

func RunDialRound(client *vrpc.Client, round uint32, onions [][]byte) error

Types

type AccessCount

type AccessCount struct {
	Singles int64
	Doubles int64
}

type AnnounceConvoRound

type AnnounceConvoRound struct {
	Round uint32
}

type AnnounceDialRound

type AnnounceDialRound struct {
	Round   uint32
	Buckets uint32
}

type BadRequestError

type BadRequestError struct {
	Err string
}

func (*BadRequestError) Error

func (e *BadRequestError) Error() string

type BoxKey

type BoxKey [32]byte

func GenerateBoxKey

func GenerateBoxKey(rand io.Reader) (publicKey, privateKey *BoxKey, err error)

func KeyFromString

func KeyFromString(s string) (*BoxKey, error)

func (*BoxKey) Key

func (k *BoxKey) Key() *[32]byte

func (*BoxKey) MarshalJSON

func (k *BoxKey) MarshalJSON() ([]byte, error)

func (*BoxKey) String

func (k *BoxKey) String() string

func (*BoxKey) UnmarshalJSON

func (k *BoxKey) UnmarshalJSON(b []byte) error

type BoxKeys

type BoxKeys []*BoxKey

func (BoxKeys) Keys

func (keys BoxKeys) Keys() []*[32]byte

type ConvoAddArgs

type ConvoAddArgs struct {
	Round  uint32
	Offset int
	Onions [][]byte
}

type ConvoError

type ConvoError struct {
	Round uint32
	Err   string
}

func (*ConvoError) Error

func (e *ConvoError) Error() string

type ConvoExchange

type ConvoExchange struct {
	DeadDrop         DeadDrop
	EncryptedMessage [SizeEncryptedMessage]byte
}

func (*ConvoExchange) Marshal

func (e *ConvoExchange) Marshal() []byte

func (*ConvoExchange) Unmarshal

func (e *ConvoExchange) Unmarshal(data []byte) error

type ConvoGetArgs

type ConvoGetArgs struct {
	Round  uint32
	Offset int
	Count  int
}

type ConvoGetResult

type ConvoGetResult struct {
	Onions [][]byte
}

type ConvoOpenArgs

type ConvoOpenArgs struct {
	Round       uint32
	NumIncoming int
}

type ConvoRequest

type ConvoRequest struct {
	Round uint32
	Onion []byte
}

type ConvoResponse

type ConvoResponse struct {
	Round uint32
	Onion []byte
}

type ConvoRound

type ConvoRound struct {
	// contains filtered or unexported fields
}

type ConvoService

type ConvoService struct {
	Idle *sync.Mutex

	LaplaceMu float64
	LaplaceB  float64

	PKI        *PKI
	ServerName string
	PrivateKey *BoxKey
	Client     *vrpc.Client
	LastServer bool

	AccessCounts chan *AccessCount
	// contains filtered or unexported fields
}

func (*ConvoService) Add

func (srv *ConvoService) Add(args *ConvoAddArgs, _ *struct{}) error

func (*ConvoService) Close

func (srv *ConvoService) Close(Round uint32, _ *struct{}) error

func (*ConvoService) Delete

func (srv *ConvoService) Delete(Round uint32, _ *struct{}) error

func (*ConvoService) Get

func (srv *ConvoService) Get(args *ConvoGetArgs, result *ConvoGetResult) error

func (*ConvoService) NewRound

func (srv *ConvoService) NewRound(Round uint32, _ *struct{}) error

func (*ConvoService) Open

func (srv *ConvoService) Open(args *ConvoOpenArgs, _ *struct{}) error

type DeadDrop

type DeadDrop [16]byte

type DialAddArgs

type DialAddArgs struct {
	Round  uint32
	Onions [][]byte
}

type DialBucket

type DialBucket struct {
	Round  uint32
	Intros [][SizeEncryptedIntro]byte
}

type DialBucketsArgs

type DialBucketsArgs struct {
	Round uint32
}

type DialBucketsResult

type DialBucketsResult struct {
	Buckets [][][SizeEncryptedIntro]byte
}

type DialError

type DialError struct {
	Round uint32
	Err   string
}

func (*DialError) Error

func (e *DialError) Error() string

type DialExchange

type DialExchange struct {
	Bucket         uint32
	EncryptedIntro [SizeEncryptedIntro]byte
}

func (*DialExchange) Marshal

func (e *DialExchange) Marshal() []byte

func (*DialExchange) Unmarshal

func (e *DialExchange) Unmarshal(data []byte) error

type DialRequest

type DialRequest struct {
	Round uint32
	Onion []byte
}

type DialRound

type DialRound struct {
	sync.Mutex
	// contains filtered or unexported fields
}

type DialService

type DialService struct {
	Idle *sync.Mutex

	LaplaceMu float64
	LaplaceB  float64

	PKI        *PKI
	ServerName string
	PrivateKey *BoxKey
	Client     *vrpc.Client
	LastServer bool
	// contains filtered or unexported fields
}

func (*DialService) Add

func (srv *DialService) Add(args *DialAddArgs, _ *struct{}) error

func (*DialService) Buckets

func (srv *DialService) Buckets(args *DialBucketsArgs, result *DialBucketsResult) error

func (*DialService) Close

func (srv *DialService) Close(Round uint32, _ *struct{}) error

func (*DialService) NewRound

func (srv *DialService) NewRound(Round uint32, _ *struct{}) error

type Envelope

type Envelope struct {
	Type    MsgType
	Message json.RawMessage
}

func Envelop

func Envelop(v interface{}) (*Envelope, error)

func (*Envelope) Open

func (e *Envelope) Open() (interface{}, error)

type Introduction

type Introduction struct {
	Rendezvous  uint32
	LongTermKey BoxKey
}

func (*Introduction) Marshal

func (i *Introduction) Marshal() []byte

func (*Introduction) Unmarshal

func (i *Introduction) Unmarshal(data []byte) error

type MsgType

type MsgType uint8
const (
	// from client to server
	MsgConvoRequest MsgType = iota
	MsgDialRequest

	// from server to client
	MsgBadRequestError
	MsgConvoError
	MsgConvoResponse
	MsgDialError
	MsgDialBucket
	MsgAnnounceConvoRound
	MsgAnnounceDialRound
)

func (MsgType) String

func (i MsgType) String() string

type PKI

type PKI struct {
	People      map[string]*BoxKey
	Servers     map[string]*ServerInfo
	ServerOrder []string
	EntryServer string
}

func ReadPKI

func ReadPKI(jsonPath string) *PKI

func (*PKI) FirstServer

func (pki *PKI) FirstServer() string

func (*PKI) IncomingOnionOverhead

func (pki *PKI) IncomingOnionOverhead(serverName string) int

func (*PKI) Index

func (pki *PKI) Index(serverName string) int

func (*PKI) LastServer

func (pki *PKI) LastServer() string

func (*PKI) NextServer

func (pki *PKI) NextServer(serverName string) string

func (*PKI) NextServerKeys

func (pki *PKI) NextServerKeys(serverName string) BoxKeys

func (*PKI) OutgoingOnionOverhead

func (pki *PKI) OutgoingOnionOverhead(serverName string) int

func (*PKI) ServerKeys

func (pki *PKI) ServerKeys() BoxKeys

type ServerInfo

type ServerInfo struct {
	Address   string
	PublicKey *BoxKey
}

type Shuffler

type Shuffler []int

func NewShuffler

func NewShuffler(rand io.Reader, n int) Shuffler

func (Shuffler) Shuffle

func (s Shuffler) Shuffle(x [][]byte)

func (Shuffler) Unshuffle

func (s Shuffler) Unshuffle(x [][]byte)

Directories

Path Synopsis
parallelfor.go by Jelle van den Hooff
parallelfor.go by Jelle van den Hooff
box

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL