ID for key encapsulation mechanism.
Modulehpke-0.0.0Haskell2010
Crypto.HPKE
Hybrid Public Key Encryption (RFC9180).
- 16 types
- 10 values
- Packagehpke-0.0.0
- Exports37
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceHPKE.hs
IDs
14 declarationsID for key derivation function.
Constructors
ID for authenticated encryption with additional data
Constructors
Setup
0 declarationsFor mode_base and mode_auth
setupBaseS :: KEM_ID-> KDF_ID-> AEAD_ID-> Maybe EncodedSecretKeyMy ephemeral secret key. Automatically generated if Nothing
-> Maybe EncodedSecretKeyMy secret key for authentication.
mode_baseis used if Nothing.base_authis used, otherwise.-> EncodedPublicKeyPeer's public key.
-> Info-> IO (EncodedPublicKey, ContextS)
Setting up base/auth mode for a sender. This throws HPKEError.
setupBaseR :: KEM_ID-> KDF_ID-> AEAD_ID-> EncodedSecretKeyMy secret key
-> Maybe EncodedSecretKeyMy secret key for authentication.
mode_baseis used if Nothing.base_authis used, otherwise.-> EncodedPublicKeyPeer's public key.
-> Info-> IO ContextR
Setting up base/auth mode for a receiver with its key pair. This throws HPKEError.
For mode_psk and mode_auth_psk
setupPSKS :: KEM_ID-> KDF_ID-> AEAD_ID-> Maybe EncodedSecretKeyMy ephemeral secret key. Automatically generated if Nothing
-> Maybe EncodedSecretKeyMy secret key for authentication.
mode_baseis used if Nothing.base_authis used, otherwise.-> EncodedPublicKeyPeer's public key.
-> Info-> PSK-> PSK_ID-> IO (EncodedPublicKey, ContextS)
Setting up psk/auth_psk mode for a sender. This throws HPKEError.
setupPSKR :: KEM_ID-> KDF_ID-> AEAD_ID-> EncodedSecretKeyMy secret key
-> Maybe EncodedSecretKeyMy secret key for authentication.
mode_baseis used if Nothing.base_authis used, otherwise.-> EncodedPublicKeyPeer's public key.
-> Info-> PSK-> PSK_ID-> IO ContextR
Setting up psk/auth_psk mode for a receiver with its key pair. This throws HPKEError.
Encryption and Decyption
2 declarationsEncryption. This throws HPKEError.
Decryption. This throws HPKEError.
Secret export
2 declarationsExporting secret.
Exporting secret.
Types
12 declarationsContext for senders.
Context for receivers.
Encoded secret key.
Constructors
Instances3Eq, Show, IsString
Eq EncodedSecretKeyDefined in hpke-0.0.0 · Crypto.HPKE.TypesShow EncodedSecretKeyDefined in hpke-0.0.0 · Crypto.HPKE.TypesIsString EncodedSecretKeyDefined in hpke-0.0.0 · Crypto.HPKE.Types
Encoded public key.
Constructors
Instances3Eq, Show, IsString
Eq EncodedPublicKeyDefined in hpke-0.0.0 · Crypto.HPKE.TypesShow EncodedPublicKeyDefined in hpke-0.0.0 · Crypto.HPKE.TypesIsString EncodedPublicKeyDefined in hpke-0.0.0 · Crypto.HPKE.Types
Information string.
Pre-shared key.
ID for pre-shared key.
Additional authenticated data for AEAD.
Plain text.
Cipher text (including a authentication tag)
Encryption key.
Error
1 declarationErrors for HPKE
Misc
2 declarationsLength of "enc", aka sender's public key.
Length of AEAD tag.