kx

package
v0.0.0-...-835eb37 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Curve25519

func Curve25519(options interface{}, public, secret, res []byte) (dst []byte, err error)

Curve25519 performs curve25519 key exchange on parts it's given.

func GenCurve25519

func GenCurve25519(options interface{}, res *Generated) (err error)

GenCurve25519 creates KX pair.

Types

type Gen

type Gen = func(options interface{}, res *Generated) (err error)

Gen generates key excahnge secret and pubic part. It appends to values in Generated struct.

type Generated

type Generated struct {
	PublicPart []byte
	SecretPart []byte
}

Generated contains public and secret part of key to KX algorithm.

type KX

type KX func(options interface{}, public, secret, res []byte) (dst []byte, err error)

KX performs key exchange from given public and secret key(it parses them first). Result bytes(algorithm-dependent) are appended to res.

Max byte count can be set with appropriate options. TODO(teawithsand): implement it

Jump to

Keyboard shortcuts

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