hpke

package standard library
go1.23.3 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SupportedAEADs = map[uint16]struct {
	keySize   int
	nonceSize int
	aead      func([]byte) (cipher.AEAD, error)
}{

	0x0001: {/* contains filtered or unexported fields */},
	0x0002: {/* contains filtered or unexported fields */},
	0x0003: {/* contains filtered or unexported fields */},
}
View Source
var SupportedKDFs = map[uint16]func() *hkdfKDF{

	0x0001: func() *hkdfKDF { return &hkdfKDF{crypto.SHA256} },
}
View Source
var SupportedKEMs = map[uint16]struct {
	curve   ecdh.Curve
	hash    crypto.Hash
	nSecret uint16
}{

	0x0020: {ecdh.X25519(), crypto.SHA256, 32},
}

Functions

func ParseHPKEPublicKey

func ParseHPKEPublicKey(kemID uint16, bytes []byte) (*ecdh.PublicKey, error)

func SuiteID

func SuiteID(kemID, kdfID, aeadID uint16) []byte

Types

type Sender

type Sender struct {
	// contains filtered or unexported fields
}

func SetupSender

func SetupSender(kemID, kdfID, aeadID uint16, pub crypto.PublicKey, info []byte) ([]byte, *Sender, error)

func (*Sender) Seal

func (s *Sender) Seal(aad, plaintext []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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