mixnet

package
v0.0.0-...-f3b58b8 Latest Latest
Warning

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

Go to latest
Published: May 17, 2017 License: AGPL-3.0-or-later Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SizeMessageBody          = 240
	SizeEncryptedMessageBody = SizeMessageBody + box.Overhead
)

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 FillWithFakeSingles

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

func ForwardNonce

func ForwardNonce(round uint32) *[24]byte

func NewRound

func NewRound(servers []*vrpc.Client, settings *RoundSettings) ([][]byte, error)

NewRound starts a new mixing round on the given servers. NewRound fills in settings.OnionKeys and returns the servers' signatures of the round settings.

settings.Round and settings.NumMailboxes must be set.

func RunRound

func RunRound(server *vrpc.Client, round uint32, onions [][]byte) ([][]byte, error)

Types

type AccessCount

type AccessCount struct {
	Singles int64
	Doubles int64
}

type AddArgs

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

type ChainService

type ChainService struct {
	*Server
}

func (*ChainService) Add

func (srv *ChainService) Add(args *AddArgs, _ *struct{}) error

Add is an RPC used to add onions to the mix.

func (*ChainService) Close

func (srv *ChainService) Close(round uint32, _ *struct{}) error

func (*ChainService) Delete

func (srv *ChainService) Delete(round uint32, _ *struct{}) error

func (*ChainService) Get

func (srv *ChainService) Get(args *GetArgs, reply *GetReply) error

func (*ChainService) SetNumIncoming

func (srv *ChainService) SetNumIncoming(args *SetNumIncomingArgs, _ *struct{}) error

type CoordinatorService

type CoordinatorService struct {
	*Server
}

func (*CoordinatorService) NewRound

func (srv *CoordinatorService) NewRound(args *NewRoundArgs, reply *NewRoundReply) error

func (*CoordinatorService) SetRoundSettings

func (srv *CoordinatorService) SetRoundSettings(settings *RoundSettings, reply *SetRoundSettingsReply) error

SetRoundSettings is an RPC used by the coordinator to set the parameters for a round. The RPC returns a signature of the round settings. Clients must verify this signature from each server before participating in the round. This prevents dishonest servers from tricking clients and other servers into using different keys or a different number of mailboxes in a round (which can lead to distinguishable noise).

type DeadDrop

type DeadDrop [16]byte

type GetArgs

type GetArgs struct {
	Round  uint32
	Offset int
	Count  int
}

type GetReply

type GetReply struct {
	Onions [][]byte
}

type MixMessage

type MixMessage struct {
	DeadDrop         DeadDrop
	EncryptedMessage [SizeEncryptedMessageBody]byte
}

func (*MixMessage) Marshal

func (m *MixMessage) Marshal() []byte

func (*MixMessage) Unmarshal

func (m *MixMessage) Unmarshal(data []byte) error

type NewRoundArgs

type NewRoundArgs struct {
	Round uint32
}

type NewRoundReply

type NewRoundReply struct {
	OnionKey *[32]byte
}

type RoundSettings

type RoundSettings struct {
	Round uint32
	// OnionKeys are the encryption keys in mixnet order.
	OnionKeys []*[32]byte
}

func (*RoundSettings) Sign

func (r *RoundSettings) Sign(key ed25519.PrivateKey) []byte

func (*RoundSettings) Verify

func (r *RoundSettings) Verify(key ed25519.PublicKey, sig []byte) bool

type Server

type Server struct {
	SigningKey     ed25519.PrivateKey
	ServerPosition int // position in chain, starting at 0
	NumServers     int
	NextServer     *vrpc.Client

	Laplace rand.Laplace

	AccessCounts chan AccessCount
	// contains filtered or unexported fields
}

type SetNumIncomingArgs

type SetNumIncomingArgs struct {
	Round       uint32
	NumIncoming int
}

type SetRoundSettingsReply

type SetRoundSettingsReply struct {
	// Signature on RoundSettings
	Signature []byte
}

Jump to

Keyboard shortcuts

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