ecdh

package
v0.0.0-...-d85f73f Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var X509Prefix, _ = hex.DecodeString("3059301306072a8648ce3d020106082a8648ce3d030107034200")

Functions

This section is empty.

Types

type PrivateKey

type PrivateKey struct {
	PublicKey
	D []byte
}

func GenerateKey

func GenerateKey() (*PrivateKey, error)

func (*PrivateKey) Public

func (priv *PrivateKey) Public() *PublicKey

func (*PrivateKey) ShareKey

func (priv *PrivateKey) ShareKey(pub *PublicKey) [16]byte

type PublicKey

type PublicKey struct {
	elliptic.Curve
	X, Y *big.Int
}

func (*PublicKey) Bytes

func (pub *PublicKey) Bytes() []byte

Jump to

Keyboard shortcuts

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