Documentation ¶
Index ¶
- type AEADID
- type AEADScheme
- type AuthKEMScheme
- type CipherSuite
- type DecryptContext
- func SetupAuthPSKR(suite CipherSuite, skR KEMPrivateKey, pkS KEMPublicKey, ...) (*DecryptContext, error)
- func SetupAuthR(suite CipherSuite, skR KEMPrivateKey, pkS KEMPublicKey, enc, info []byte) (*DecryptContext, error)
- func SetupBaseR(suite CipherSuite, skR KEMPrivateKey, enc, info []byte) (*DecryptContext, error)
- func SetupPSKR(suite CipherSuite, skR KEMPrivateKey, enc, psk, pskID, info []byte) (*DecryptContext, error)
- type EncryptContext
- func SetupAuthPSKS(suite CipherSuite, rand io.Reader, pkR KEMPublicKey, skS KEMPrivateKey, ...) ([]byte, *EncryptContext, error)
- func SetupAuthS(suite CipherSuite, rand io.Reader, pkR KEMPublicKey, skS KEMPrivateKey, ...) ([]byte, *EncryptContext, error)
- func SetupBaseS(suite CipherSuite, rand io.Reader, pkR KEMPublicKey, info []byte) ([]byte, *EncryptContext, error)
- func SetupPSKS(suite CipherSuite, rand io.Reader, pkR KEMPublicKey, psk, pskID, info []byte) ([]byte, *EncryptContext, error)
- type HPKEMode
- type KDFID
- type KDFScheme
- type KEMID
- type KEMPrivateKey
- type KEMPublicKey
- type KEMScheme
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)
type DecryptContext ¶
type DecryptContext struct {
// contains filtered or unexported fields
}
func SetupAuthPSKR ¶
func SetupAuthPSKR(suite CipherSuite, skR KEMPrivateKey, pkS KEMPublicKey, enc, psk, pskID, info []byte) (*DecryptContext, error)
func SetupAuthR ¶
func SetupAuthR(suite CipherSuite, skR KEMPrivateKey, pkS KEMPublicKey, enc, info []byte) (*DecryptContext, error)
func SetupBaseR ¶
func SetupBaseR(suite CipherSuite, skR KEMPrivateKey, enc, info []byte) (*DecryptContext, error)
func SetupPSKR ¶
func SetupPSKR(suite CipherSuite, skR KEMPrivateKey, enc, psk, pskID, info []byte) (*DecryptContext, error)
type EncryptContext ¶
type EncryptContext struct {
// contains filtered or unexported fields
}
func SetupAuthPSKS ¶
func SetupAuthPSKS(suite CipherSuite, rand io.Reader, pkR KEMPublicKey, skS KEMPrivateKey, psk, pskID, info []byte) ([]byte, *EncryptContext, error)
func SetupAuthS ¶
func SetupAuthS(suite CipherSuite, rand io.Reader, pkR KEMPublicKey, skS KEMPrivateKey, info []byte) ([]byte, *EncryptContext, error)
func SetupBaseS ¶
func SetupBaseS(suite CipherSuite, rand io.Reader, pkR KEMPublicKey, info []byte) ([]byte, *EncryptContext, error)
func SetupPSKS ¶
func SetupPSKS(suite CipherSuite, rand io.Reader, pkR KEMPublicKey, psk, pskID, info []byte) ([]byte, *EncryptContext, error)
func (*EncryptContext) Seal ¶
func (ctx *EncryptContext) Seal(aad, pt []byte) []byte
type KEMPrivateKey ¶
type KEMPrivateKey interface {
PublicKey() KEMPublicKey
}
type KEMPublicKey ¶
type KEMPublicKey interface{}
type KEMScheme ¶
type KEMScheme interface { ID() KEMID GenerateKeyPair(rand io.Reader) (KEMPrivateKey, KEMPublicKey, error) Marshal(pk KEMPublicKey) []byte Unmarshal(enc []byte) (KEMPublicKey, error) Encap(rand io.Reader, pkR KEMPublicKey) ([]byte, []byte, error) Decap(enc []byte, skR KEMPrivateKey) ([]byte, error) PublicKeySize() int MarshalPrivate(sk KEMPrivateKey) []byte UnmarshalPrivate(enc []byte) (KEMPrivateKey, error) // contains filtered or unexported methods }
Click to show internal directories.
Click to hide internal directories.