ecdh

package
v1.28.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyExchange

type KeyExchange interface {
	// Check returns a non-nil error if the peers public key cannot used for the
	// key exchange - for instance the public key isn't a point on the elliptic curve.
	// It's recommended to check peer's public key before computing the secret.
	Check(peerPubkey []byte) error

	// ComputeSecret returns the secret value computed from the given private key
	// and the peers public key.
	ComputeSecret(privkey crypto.PrivateKey, peerPubkey []byte) (secret []byte, err error)
}

func NewEllipticECDH

func NewEllipticECDH(c elliptic.Curve) (KeyExchange, error)

Jump to

Keyboard shortcuts

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