dialing

package
v0.0.0-...-6b33518 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: 19 Imported by: 2

Documentation

Overview

Package dialing provides functionality for Alpenhorn's dialing protocol.

Index

Constants

View Source
const DialingServiceDataVersion = 0
View Source
const (
	// SizeToken is the number of bytes in a dialing token.
	SizeToken = 32
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MixMessage

type MixMessage struct {
	Mailbox uint32
	Token   [SizeToken]byte
}

func (*MixMessage) MarshalBinary

func (e *MixMessage) MarshalBinary() ([]byte, error)

func (*MixMessage) UnmarshalBinary

func (e *MixMessage) UnmarshalBinary(data []byte) error

type Mixer

type Mixer struct {
	SigningKey ed25519.PrivateKey

	Laplace rand.Laplace
	// contains filtered or unexported fields
}

func (*Mixer) Bidirectional

func (srv *Mixer) Bidirectional() bool

func (*Mixer) GenerateNoise

func (srv *Mixer) GenerateNoise(settings mixnet.RoundSettings, myPos int) [][]byte

func (*Mixer) HandleMessages

func (srv *Mixer) HandleMessages(settings mixnet.RoundSettings, messages [][]byte) (interface{}, error)

func (*Mixer) ParseServiceData

func (srv *Mixer) ParseServiceData(data []byte) (interface{}, error)

func (*Mixer) SizeIncomingMessage

func (srv *Mixer) SizeIncomingMessage() int

func (*Mixer) SizeReplyMessage

func (srv *Mixer) SizeReplyMessage() int

type ServiceData

type ServiceData struct {
	CDNKey       ed25519.PublicKey
	CDNAddress   string
	NumMailboxes uint32
}

func (ServiceData) Marshal

func (d ServiceData) Marshal() []byte

func (*ServiceData) Unmarshal

func (d *ServiceData) Unmarshal(data []byte) error

Jump to

Keyboard shortcuts

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