ecdh

package
v0.0.0-...-d9311aa Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ServerKeyVersion = int16(0)
	ServerPublicKey  = &PublicKey{}
)
View Source
var X509Prefix, _ = hex.DecodeString("3059301306072a8648ce3d020106082a8648ce3d030107034200")

Functions

This section is empty.

Types

type PrivateKey

type PrivateKey struct {
	PublicKey
	D *big.Int
}

func GenerateKey

func GenerateKey() (*PrivateKey, error)

func (*PrivateKey) Public

func (priv *PrivateKey) Public() *PublicKey

func (*PrivateKey) SharedSecret

func (priv *PrivateKey) SharedSecret(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