addfriend

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: 20 Imported by: 2

Documentation

Overview

Package addfriend provides functionality for Alpenhorn's add-friend protocol.

Index

Constants

View Source
const (
	// SizeIntro is the size in bytes of an add-friend introduction.
	// This should be equal to int(unsafe.Sizeof(introduction{})) in
	// the alpenhorn package.
	SizeIntro = 228

	// SizeEncryptedIntro is the size of an encrypted introduction.
	SizeEncryptedIntro = SizeIntro + ibe.Overhead
)
View Source
const AddFriendServiceDataVersion = 0

Variables

This section is empty.

Functions

This section is empty.

Types

type MixMessage

type MixMessage struct {
	Mailbox        uint32
	EncryptedIntro [SizeEncryptedIntro]byte
}

func (*MixMessage) MarshalBinary

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

func (*MixMessage) UnmarshalBinary

func (m *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