core

package
v0.7.10 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// PhantomSelectionMinGeneration
	PhantomSelectionMinGeneration uint = 1

	// PhantomHkdfMinVersion indicates the first version in which the Phantom selection was based on HKDF
	PhantomHkdfMinVersion uint = 2

	// RandomizeDstPortMinVersion is the earliest client library version ID that supports destination port randomization
	RandomizeDstPortMinVersion uint = 3

	// SharedKeysRefactorMinVersion
	SharedKeysRefactorMinVersion uint = 4
)

Variables

This section is empty.

Functions

func ConjureHMAC

func ConjureHMAC(key []byte, str string) []byte

ConjureHMAC implements the hmak that can then be used for further hkdf key generation

func CurrentClientLibraryVersion added in v0.7.0

func CurrentClientLibraryVersion() uint32

CurrentClientLibraryVersion returns the current client library version used for feature compatibility support between client and server. Currently I don't intend to connect this to the library tag version in any way.

When adding new client versions comment out older versions and add new version below with a description of the reason for the new version.

Types

type ConjureSharedKeys added in v0.7.0

type ConjureSharedKeys struct {
	SharedSecret []byte
	ConjureSeed  []byte

	TransportReader io.Reader
	TransportKeys   interface{}
}

ConjureSharedKeys contains keys that the station is required to keep.

func GenSharedKeys added in v0.7.0

func GenSharedKeys(clientLibVer uint, sharedSecret []byte, tt pb.TransportType) (ConjureSharedKeys, error)

GenSharedKeys generates the keys requires to form a Conjure connection based on the SharedSecret

type SharedKeys added in v0.7.0

type SharedKeys struct {
	SharedSecret, Representative []byte
	ConjureSeed                  []byte
	Reader                       io.Reader
}

func GenerateClientSharedKeys added in v0.7.0

func GenerateClientSharedKeys(pubkey [32]byte) (*SharedKeys, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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