Versions in this module Expand all Collapse all v0 v0.0.1 Jun 16, 2022 Changes in this version + type AEADID uint16 + const AEAD_AESGCM128 + const AEAD_AESGCM256 + const AEAD_CHACHA20POLY1305 + const AEAD_EXPORT_ONLY + type AEADScheme interface + ID func() AEADID + KeySize func() int + New func(key []byte) (cipher.AEAD, error) + NonceSize func() int + type AuthKEMScheme interface + AuthDecap func(enc []byte, skR KEMPrivateKey, pkS KEMPublicKey) ([]byte, error) + AuthEncap func(rand io.Reader, pkR KEMPublicKey, skS KEMPrivateKey) ([]byte, []byte, error) + type CipherSuite struct + AEAD AEADScheme + KDF KDFScheme + KEM KEMScheme + func AssembleCipherSuite(kemID KEMID, kdfID KDFID, aeadID AEADID) (CipherSuite, error) + func (suite CipherSuite) ID() []byte + type KDFID uint16 + const KDF_HKDF_SHA256 + const KDF_HKDF_SHA384 + const KDF_HKDF_SHA512 + type KDFScheme interface + Expand func(prk, info []byte, L int) []byte + Extract func(salt, ikm []byte) []byte + Hash func(message []byte) []byte + ID func() KDFID + LabeledExpand func(prk []byte, suiteID []byte, label string, info []byte, L int) []byte + LabeledExtract func(salt []byte, suiteID []byte, label string, ikm []byte) []byte + OutputSize func() int + type KEMID uint16 + const DHKEM_P256 + const DHKEM_P521 + const DHKEM_X25519 + const DHKEM_X448 + const KEM_SIKE503 + const KEM_SIKE751 + type KEMPrivateKey interface + PublicKey func() KEMPublicKey + type KEMPublicKey interface + type KEMScheme interface + Decap func(enc []byte, skR KEMPrivateKey) ([]byte, error) + DeriveKeyPair func(ikm []byte) (KEMPrivateKey, KEMPublicKey, error) + DeserializePrivateKey func(skXm []byte) (KEMPrivateKey, error) + DeserializePublicKey func(pkXm []byte) (KEMPublicKey, error) + Encap func(rand io.Reader, pkR KEMPublicKey) ([]byte, []byte, error) + ID func() KEMID + PrivateKeySize func() int + PublicKeySize func() int + SerializePrivateKey func(skX KEMPrivateKey) []byte + SerializePublicKey func(pkX KEMPublicKey) []byte + type Mode uint8 + type ReceiverContext struct + func SetupAuthPSKR(suite CipherSuite, skR KEMPrivateKey, pkS KEMPublicKey, ...) (*ReceiverContext, error) + func SetupAuthR(suite CipherSuite, skR KEMPrivateKey, pkS KEMPublicKey, enc, info []byte) (*ReceiverContext, error) + func SetupBaseR(suite CipherSuite, skR KEMPrivateKey, enc, info []byte) (*ReceiverContext, error) + func SetupPSKR(suite CipherSuite, skR KEMPrivateKey, enc, psk, pskID, info []byte) (*ReceiverContext, error) + func UnmarshalReceiverContext(opaque []byte) (*ReceiverContext, error) + func (ctx *ReceiverContext) Export(context []byte, L int) []byte + func (ctx *ReceiverContext) Marshal() ([]byte, error) + func (ctx *ReceiverContext) Open(aad, ct []byte) ([]byte, error) + type SenderContext struct + func SetupAuthPSKS(suite CipherSuite, rand io.Reader, pkR KEMPublicKey, skS KEMPrivateKey, ...) ([]byte, *SenderContext, error) + func SetupAuthS(suite CipherSuite, rand io.Reader, pkR KEMPublicKey, skS KEMPrivateKey, ...) ([]byte, *SenderContext, error) + func SetupBaseS(suite CipherSuite, rand io.Reader, pkR KEMPublicKey, info []byte) ([]byte, *SenderContext, error) + func SetupPSKS(suite CipherSuite, rand io.Reader, pkR KEMPublicKey, psk, pskID, info []byte) ([]byte, *SenderContext, error) + func UnmarshalSenderContext(opaque []byte) (*SenderContext, error) + func (ctx *SenderContext) Export(context []byte, L int) []byte + func (ctx *SenderContext) Marshal() ([]byte, error) + func (ctx *SenderContext) Seal(aad, pt []byte) []byte