Documentation ¶
Overview ¶
Package addfriend provides functionality for Alpenhorn's add-friend protocol.
Index ¶
- Constants
- type MixMessage
- type Mixer
- func (srv *Mixer) Bidirectional() bool
- func (srv *Mixer) GenerateNoise(settings mixnet.RoundSettings, myPos int) [][]byte
- func (srv *Mixer) HandleMessages(settings mixnet.RoundSettings, messages [][]byte) (interface{}, error)
- func (srv *Mixer) ParseServiceData(data []byte) (interface{}, error)
- func (srv *Mixer) SizeIncomingMessage() int
- func (srv *Mixer) SizeReplyMessage() int
- type ServiceData
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 (*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 (*Mixer) SizeIncomingMessage ¶
func (*Mixer) SizeReplyMessage ¶
type ServiceData ¶
func (ServiceData) Marshal ¶
func (d ServiceData) Marshal() []byte
func (*ServiceData) Unmarshal ¶
func (d *ServiceData) Unmarshal(data []byte) error
Click to show internal directories.
Click to hide internal directories.