convo

package
v0.0.0-...-55ba49f Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2019 License: AGPL-3.0-or-later Imports: 14 Imported by: 10

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func FillWithFakeDoubles

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

func FillWithFakeSingles

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

Types

type AccessCount

type AccessCount struct {
	Singles int64
	Doubles int64
}

type ConvoConfig

type ConvoConfig struct {
	Version     int
	Coordinator CoordinatorConfig
	MixServers  []mixnet.PublicServerConfig
}

func (*ConvoConfig) MarshalJSON

func (c *ConvoConfig) MarshalJSON() ([]byte, error)

func (*ConvoConfig) UnmarshalJSON

func (c *ConvoConfig) UnmarshalJSON(data []byte) error

func (*ConvoConfig) UseLatestVersion

func (c *ConvoConfig) UseLatestVersion()

func (*ConvoConfig) Validate

func (c *ConvoConfig) Validate() error

type ConvoService

type ConvoService struct {
	Laplace      rand.Laplace
	AccessCounts chan AccessCount
}

func (*ConvoService) Bidirectional

func (s *ConvoService) Bidirectional() bool

func (*ConvoService) GenerateNoise

func (s *ConvoService) GenerateNoise(settings mixnet.RoundSettings, myPos int) [][]byte

func (*ConvoService) HandleMessages

func (s *ConvoService) HandleMessages(settings mixnet.RoundSettings, incoming [][]byte) (interface{}, error)

func (*ConvoService) ParseServiceData

func (s *ConvoService) ParseServiceData(data []byte) (interface{}, error)

func (*ConvoService) SizeIncomingMessage

func (s *ConvoService) SizeIncomingMessage() int

func (*ConvoService) SizeReplyMessage

func (s *ConvoService) SizeReplyMessage() int

type CoordinatorConfig

type CoordinatorConfig struct {
	Key     ed25519.PublicKey
	Address string
}

func (CoordinatorConfig) MarshalEasyJSON

func (v CoordinatorConfig) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (CoordinatorConfig) MarshalJSON

func (v CoordinatorConfig) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*CoordinatorConfig) UnmarshalEasyJSON

func (v *CoordinatorConfig) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*CoordinatorConfig) UnmarshalJSON

func (v *CoordinatorConfig) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type DeadDrop

type DeadDrop [16]byte

type DeadDropMessage

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

func (*DeadDropMessage) Marshal

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

func (*DeadDropMessage) Unmarshal

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

Jump to

Keyboard shortcuts

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