rendezvous

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Expected []MsgType
	Got      MsgType
}

func (Error) Error

func (e Error) Error() string

type Msg

type Msg struct {
	Type    MsgType `json:"type"`
	Payload Payload `json:"payload,omitempty"`
}

type MsgType

type MsgType int
const (
	RendezvousToSenderBind        MsgType = iota // An ID for this connection is bound and communicated
	SenderToRendezvousEstablish                  // Sender has generated and hashed password
	ReceiverToRendezvousEstablish                // Passsword has been communicated to receiver who has hashed it
	RendezvousToSenderReady                      // Rendezvous announces to sender that receiver is connected
	SenderToRendezvousPAKE                       // Sender sends PAKE information to rendezvous
	RendezvousToReceiverPAKE                     // Rendezvous forwards PAKE information to receiver
	ReceiverToRendezvousPAKE                     // Receiver sends PAKE information to rendezvous
	RendezvousToSenderPAKE                       // Rendezvous forwards PAKE information to receiver
	SenderToRendezvousSalt                       // Sender sends cryptographic salt to rendezvous
	RendezvousToReceiverSalt                     // Rendevoux forwards cryptographic salt to receiver
	// From this point there is a safe channel established
	ReceiverToRendezvousClose // Receiver can connect directly to sender, close receiver connection -> close sender connection
	SenderToRendezvousClose   // Transit sequence is completed, close sender connection -> close receiver connection
)

func (MsgType) Name

func (t MsgType) Name() string

type Payload

type Payload struct {
	ID       int    `json:"id,omitempty"`
	Password string `json:"password,omitempty"`
	Bytes    []byte `json:"pake_bytes,omitempty"`
	Salt     []byte `json:"salt,omitempty"`
}

Jump to

Keyboard shortcuts

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