crypto

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: AGPL-3.0, BSD-3-Clause Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ShutdownErrMessage = "panda: shutdown requested"

Functions

This section is empty.

Types

type KeyExchange

type KeyExchange struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewKeyExchange

func NewKeyExchange(rand io.Reader, log *logging.Logger, meetingPlace MeetingPlace, sharedRandom []byte, sharedSecret []byte, kxBytes []byte, contactID uint64, pandaChan chan PandaUpdate, shutdownChan chan struct{}) (*KeyExchange, error)

func UnmarshalKeyExchange

func UnmarshalKeyExchange(rand io.Reader, log *logging.Logger, meetingPlace MeetingPlace, serialised []byte, contactID uint64, pandaChan chan PandaUpdate, shutdownChan chan struct{}) (*KeyExchange, error)

func (*KeyExchange) Marshal

func (kx *KeyExchange) Marshal() []byte

func (*KeyExchange) Run

func (kx *KeyExchange) Run()

func (*KeyExchange) SetSharedRandom added in v0.0.21

func (kx *KeyExchange) SetSharedRandom(srv []byte)

SetSharedRandom updates the KeyExchange SharedRandom and resets the protocol state back to KeyExchange_INIT. The caller MUST halt an running KeyExchange before calling SetSharedRandom.

type MeetingPlace

type MeetingPlace interface {
	Padding() int
	Exchange(id, message []byte, shutdown chan struct{}) ([]byte, error)
}

type PandaUpdate

type PandaUpdate struct {
	ID         uint64
	Err        error
	Serialised []byte
	Result     []byte
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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