msg

package
v0.0.0-...-4805961 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2020 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DisconnectCauseDelimiter                      uint32 = 0xdeadbeef
	DisconnectCauseNone                           uint32 = 0
	DisconnectCauseProtocolRequestedNotSupported  uint32 = 1
	DisconnectCauseNotEnoughSecurityRequested     uint32 = 2
	DisconnectCauseTooMuchSecurityRequested       uint32 = 3
	DisconnectCauseCounterpartyKeyIdNotRecognised uint32 = 4
	DisconnectCausePotpNotRecognised              uint32 = 5
	DisconnectCausePuzzleNotSolved                uint32 = 6
	DisconnectCauseSeverMisconfiguration          uint32 = 7

	SharedSecretRequestTypeKEMAndPotp uint8 = 0
)
View Source
const ClientHelloProtocol = 1
View Source
const PuzzleSHA512LZ = 1

Variables

View Source
var DisconnectCauseString = map[uint32]string{
	DisconnectCauseNone:                           "None",
	DisconnectCauseProtocolRequestedNotSupported:  "Protocol requested not supported",
	DisconnectCauseNotEnoughSecurityRequested:     "Not enough security Requested",
	DisconnectCauseCounterpartyKeyIdNotRecognised: "Counter party key not recognised",
	DisconnectCausePotpNotRecognised:              "Pragmatic one-time-pad (potp) not recognised",
	DisconnectCausePuzzleNotSolved:                "Puzzle not solved",
	DisconnectCauseSeverMisconfiguration:          "Server misconfiguration",
}
View Source
var SecureWireGoodState = []byte{'G', 'O', 'O', 'D'}

Functions

This section is empty.

Types

type ClientHello

type ClientHello struct {
	Protocol uint32
	WireType WireType
	KeyId    [256 / 8]byte
}

func (*ClientHello) KeyIdAsString

func (k *ClientHello) KeyIdAsString() string

type DisconnectCause

type DisconnectCause struct {
	Delimiter uint32
	Cause     uint32
}

type PuzzleRequest

type PuzzleRequest struct {
	Puzzle uint16
	Body   [64]byte
	Param  uint16
}

type PuzzleResponse

type PuzzleResponse struct {
	Response [64]byte
}

type SharedSecret

type SharedSecret struct {
	Otp    []byte
	Shared [][]byte
}

func (*SharedSecret) SharesJoined

func (s *SharedSecret) SharesJoined() []byte

type SharedSecretBundleDescriptionResponse

type SharedSecretBundleDescriptionResponse struct {
	PotpIdUsed   [256 / 8]byte
	PotpOffset   uint64
	SecretsCount uint8
	SecretSize   uint16
}

Message used in the wire, describes how many 'SecretsCount' of size 'SecretSize' to read.

func (*SharedSecretBundleDescriptionResponse) PotpIdAsString

func (b *SharedSecretBundleDescriptionResponse) PotpIdAsString() string

type SharedSecretRequest

type SharedSecretRequest struct {
	RequestType uint8 // fix=0, fix proposal of keys and Potps, open to make an unbounded list in the future
	KeyId       [256 / 8]byte
	WireType    WireType
}

func (*SharedSecretRequest) KeyIdPreferredAsString

func (s *SharedSecretRequest) KeyIdPreferredAsString() string

type WireType

type WireType uint32
const WireTypeSimpleAES256 WireType = 1
const WireTypeTripleAES256 WireType = 2
const WireTypeTripleAES256Optional WireType = 3

Jump to

Keyboard shortcuts

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