Documentation ¶
Index ¶
- type AEADID
- type AEADScheme
- type AuthKEMScheme
- type CipherSuite
- type KDFID
- type KDFScheme
- type KEMID
- type KEMPrivateKey
- type KEMPublicKey
- type KEMScheme
- type Mode
- type ReceiverContext
- 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)
- type SenderContext
- 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)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AEADScheme ¶
type AuthKEMScheme ¶
type AuthKEMScheme interface { KEMScheme AuthEncap(rand io.Reader, pkR KEMPublicKey, skS KEMPrivateKey) ([]byte, []byte, error) AuthDecap(enc []byte, skR KEMPrivateKey, pkS KEMPublicKey) ([]byte, error) }
type CipherSuite ¶
type CipherSuite struct { KEM KEMScheme KDF KDFScheme AEAD AEADScheme }
func AssembleCipherSuite ¶
func AssembleCipherSuite(kemID KEMID, kdfID KDFID, aeadID AEADID) (CipherSuite, error)
func (CipherSuite) ID ¶
func (suite CipherSuite) ID() []byte
type KDFScheme ¶
type KDFScheme interface { ID() KDFID Hash(message []byte) []byte Extract(salt, ikm []byte) []byte Expand(prk, info []byte, L int) []byte LabeledExtract(salt []byte, suiteID []byte, label string, ikm []byte) []byte LabeledExpand(prk []byte, suiteID []byte, label string, info []byte, L int) []byte OutputSize() int }
type KEMPrivateKey ¶
type KEMPrivateKey interface {
PublicKey() KEMPublicKey
}
type KEMPublicKey ¶
type KEMPublicKey interface{}
type KEMScheme ¶
type KEMScheme interface { ID() KEMID DeriveKeyPair(ikm []byte) (KEMPrivateKey, KEMPublicKey, error) SerializePublicKey(pkX KEMPublicKey) []byte DeserializePublicKey(pkXm []byte) (KEMPublicKey, error) Encap(rand io.Reader, pkR KEMPublicKey) ([]byte, []byte, error) Decap(enc []byte, skR KEMPrivateKey) ([]byte, error) PublicKeySize() int PrivateKeySize() int SerializePrivateKey(skX KEMPrivateKey) []byte DeserializePrivateKey(skXm []byte) (KEMPrivateKey, error) // contains filtered or unexported methods }
type ReceiverContext ¶
type ReceiverContext struct {
// contains filtered or unexported fields
}
func SetupAuthPSKR ¶
func SetupAuthPSKR(suite CipherSuite, skR KEMPrivateKey, pkS KEMPublicKey, enc, psk, pskID, info []byte) (*ReceiverContext, error)
func SetupAuthR ¶
func SetupAuthR(suite CipherSuite, skR KEMPrivateKey, pkS KEMPublicKey, enc, info []byte) (*ReceiverContext, error)
func SetupBaseR ¶
func SetupBaseR(suite CipherSuite, skR KEMPrivateKey, enc, info []byte) (*ReceiverContext, error)
func SetupPSKR ¶
func SetupPSKR(suite CipherSuite, skR KEMPrivateKey, enc, psk, pskID, info []byte) (*ReceiverContext, error)
func UnmarshalReceiverContext ¶
func UnmarshalReceiverContext(opaque []byte) (*ReceiverContext, error)
type SenderContext ¶
type SenderContext struct {
// contains filtered or unexported fields
}
func SetupAuthPSKS ¶
func SetupAuthPSKS(suite CipherSuite, rand io.Reader, pkR KEMPublicKey, skS KEMPrivateKey, psk, pskID, info []byte) ([]byte, *SenderContext, error)
func SetupAuthS ¶
func SetupAuthS(suite CipherSuite, rand io.Reader, pkR KEMPublicKey, skS KEMPrivateKey, info []byte) ([]byte, *SenderContext, error)
func SetupBaseS ¶
func SetupBaseS(suite CipherSuite, rand io.Reader, pkR KEMPublicKey, info []byte) ([]byte, *SenderContext, error)
func SetupPSKS ¶
func SetupPSKS(suite CipherSuite, rand io.Reader, pkR KEMPublicKey, psk, pskID, info []byte) ([]byte, *SenderContext, error)
func UnmarshalSenderContext ¶
func UnmarshalSenderContext(opaque []byte) (*SenderContext, error)
func (*SenderContext) Seal ¶
func (ctx *SenderContext) Seal(aad, pt []byte) []byte
Click to show internal directories.
Click to hide internal directories.