Versions in this module Expand all Collapse all v2 v2.1.4 Dec 14, 2023 Changes in this version + type AEAD uint16 + const AEAD_AES128GCM + const AEAD_AES256GCM + const AEAD_ChaCha20Poly1305 + const AEAD_EXPORT_ONLY + func (a AEAD) IsValid() bool + func (a AEAD) KeySize() uint16 + func (a AEAD) New(key []byte) (cipher.AEAD, error) + func (a AEAD) NonceSize() uint16 + type Exporter interface + Export func(exporterContext []byte, length uint16) ([]byte, error) + type KDF uint16 + const KDF_HKDF_SHA256 + const KDF_HKDF_SHA384 + const KDF_HKDF_SHA512 + func (k KDF) Expand(prk, labeledInfo []byte, outputLen uint16) ([]byte, error) + func (k KDF) Extract(secret, salt []byte) []byte + func (k KDF) ExtractSize() uint16 + func (k KDF) IsValid() bool + type KEM uint16 + const KEM_P256_HKDF_SHA256 + const KEM_P384_HKDF_SHA384 + const KEM_P521_HKDF_SHA512 + const KEM_X25519_HKDF_SHA256 + func (k KEM) IsValid() bool + func (k KEM) Scheme() kem.Scheme + type Opener interface + Open func(ct, aad []byte) (pt []byte, err error) + type Receiver interface + SetupAuth func(enc []byte, pkS *ecdh.PublicKey) (Opener, error) + SetupAuthPSK func(enc []byte, psk, pskID []byte, pkS *ecdh.PublicKey) (Opener, error) + SetupBase func(enc []byte) (Opener, error) + SetupPSK func(enc []byte, psk, pskID []byte) (Opener, error) + type Sealer interface + Seal func(pt, aad []byte) (ct []byte, err error) + type Sender interface + SetupAuth func(skS *ecdh.PrivateKey) ([]byte, Sealer, error) + SetupAuthPSK func(psk, pskID []byte, skS *ecdh.PrivateKey) ([]byte, Sealer, error) + SetupBase func() ([]byte, Sealer, error) + SetupPSK func(psk, pskID []byte) ([]byte, Sealer, error) + type Suite struct + func New(kemID KEM, kdfID KDF, aeadID AEAD) *Suite + func (s Suite) IsValid() bool + func (s Suite) Params() (KEM, KDF, AEAD) + func (s Suite) Receiver(skR *ecdh.PrivateKey, info []byte) Receiver + func (s Suite) Sender(pkR *ecdh.PublicKey, info []byte) Sender