Documentation ¶
Index ¶
- Constants
- func BackwardNonce(round uint32) *[24]byte
- func FillWithFakeDoubles(dest [][]byte, nonce *[24]byte, nextKeys []*[32]byte)
- func FillWithFakeSingles(dest [][]byte, nonce *[24]byte, nextKeys []*[32]byte)
- func ForwardNonce(round uint32) *[24]byte
- func NewRound(servers []*vrpc.Client, settings *RoundSettings) ([][]byte, error)
- func RunRound(server *vrpc.Client, round uint32, onions [][]byte) ([][]byte, error)
- type AccessCount
- type AddArgs
- type ChainService
- func (srv *ChainService) Add(args *AddArgs, _ *struct{}) error
- func (srv *ChainService) Close(round uint32, _ *struct{}) error
- func (srv *ChainService) Delete(round uint32, _ *struct{}) error
- func (srv *ChainService) Get(args *GetArgs, reply *GetReply) error
- func (srv *ChainService) SetNumIncoming(args *SetNumIncomingArgs, _ *struct{}) error
- type CoordinatorService
- type DeadDrop
- type GetArgs
- type GetReply
- type MixMessage
- type NewRoundArgs
- type NewRoundReply
- type RoundSettings
- type Server
- type SetNumIncomingArgs
- type SetRoundSettingsReply
Constants ¶
View Source
const ( SizeMessageBody = 240 SizeEncryptedMessageBody = SizeMessageBody + box.Overhead )
Variables ¶
This section is empty.
Functions ¶
func BackwardNonce ¶
func FillWithFakeDoubles ¶
func FillWithFakeSingles ¶
func ForwardNonce ¶
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.
Types ¶
type AccessCount ¶
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) 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 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
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 SetRoundSettingsReply ¶
type SetRoundSettingsReply struct { // Signature on RoundSettings Signature []byte }
Click to show internal directories.
Click to hide internal directories.