ecdh

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedCurve = errors.New("unsupported curve")
	ErrUnmarshal        = errors.New("failed to unmarshal key")
)

Functions

This section is empty.

Types

type InMemoryPrivateKey

type InMemoryPrivateKey interface {
	// Zero-ize the secret in memory
	Drop()
}

type PrivateKey

type PrivateKey interface {
	DH(pk dh.PublicKey) ([]byte, error)
	Public() dh.PublicKey
}

type PublicKey

type PublicKey struct {
	*ecdh.PublicKey
}

func (*PublicKey) ECDSA

func (pk *PublicKey) ECDSA() (*ecdsa.PublicKey, error)

func (*PublicKey) MarshalBinary

func (pk *PublicKey) MarshalBinary() ([]byte, error)

func (*PublicKey) MarshalText

func (pk *PublicKey) MarshalText() ([]byte, error)

func (*PublicKey) UnmarshalBinary

func (pk *PublicKey) UnmarshalBinary(data []byte) error

func (*PublicKey) UnmarshalText

func (pk *PublicKey) UnmarshalText(text []byte) error

type StaticKeypair

type StaticKeypair struct {
	PrivateKey
}

func (*StaticKeypair) DropPrivate

func (kp *StaticKeypair) DropPrivate()

func (*StaticKeypair) MarshalBinary

func (kp *StaticKeypair) MarshalBinary() ([]byte, error)

func (*StaticKeypair) UnmarshalBinary

func (kp *StaticKeypair) UnmarshalBinary([]byte) error

Directories

Path Synopsis
Package sw provides an ECDH implementation backed by an Apple Secure Enclave.
Package sw provides an ECDH implementation backed by an Apple Secure Enclave.
Package openpgp provides an ECDH implementation backed by an OpenPGP card.
Package openpgp provides an ECDH implementation backed by an OpenPGP card.
Package pkcs11 provides an ECDH implementation backed by an PKCS11 compatible token or HSM.
Package pkcs11 provides an ECDH implementation backed by an PKCS11 compatible token or HSM.
Package sw implements ECDH in pure software / Go
Package sw implements ECDH in pure software / Go
Package tpm2 provides an ECDH implementation backed by a TPM2 module.
Package tpm2 provides an ECDH implementation backed by a TPM2 module.

Jump to

Keyboard shortcuts

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