dhke_x25519

package
v0.0.0-...-cb92b4e Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2023 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrivateKeySize = curve25519.ScalarSize
	PublicKeySize  = curve25519.PointSize
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PrivateKey

type PrivateKey = [PrivateKeySize]byte

type PublicKey

type PublicKey = [PublicKeySize]byte

type Scheme

type Scheme struct{}

func (Scheme) ComputeShared

func (s Scheme) ComputeShared(dst []byte, priv *PrivateKey, pub *PublicKey) error

func (Scheme) DerivePublic

func (s Scheme) DerivePublic(priv *PrivateKey) PublicKey

func (Scheme) Generate

func (s Scheme) Generate(rng io.Reader) (PublicKey, PrivateKey, error)

func (Scheme) MarshalPrivate

func (s Scheme) MarshalPrivate(dst []byte, priv *PrivateKey)

func (Scheme) MarshalPublic

func (s Scheme) MarshalPublic(dst []byte, x *PublicKey)

func (Scheme) ParsePrivate

func (s Scheme) ParsePrivate(x []byte) (PrivateKey, error)

func (Scheme) ParsePublic

func (s Scheme) ParsePublic(x []byte) (PublicKey, error)

func (Scheme) PrivateKeySize

func (s Scheme) PrivateKeySize() int

func (Scheme) PublicKeySize

func (s Scheme) PublicKeySize() int

func (Scheme) SharedSize

func (s Scheme) SharedSize() int

Jump to

Keyboard shortcuts

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