Hpke

object Hpke

Hybrid Public Key Encryption according to RFC 9180.

Types

Link copied to clipboard

AEAD (Authenticated encryption with authenticated data) algorithms to use for HPKE.

Link copied to clipboard
data class CipherSuite(val kem: Hpke.Kem, val kdf: Hpke.Kdf, val aead: Hpke.Aead)

Cipher suite to use for HPKE.

Link copied to clipboard
data class Decrypter

An object which can be used for HPKE decryption.

Link copied to clipboard
data class Encrypter

An object which can be used for HPKE encryption.

Link copied to clipboard
enum Kdf : Enum<Hpke.Kdf>

Key-derivation functions to use for HPKE.

Link copied to clipboard
enum Kem : Enum<Hpke.Kem>

Key encapsulation mechanisms to use for HPKE.

Functions

Link copied to clipboard
suspend fun getDecrypter(cipherSuite: Hpke.CipherSuite, receiverPrivateKey: AsymmetricKey, encapsulatedKey: ByteArray, info: ByteArray, psk: ByteArray? = null, pskId: ByteArray? = null, authKey: EcPublicKey? = null): Hpke.Decrypter

Creates a Decrypter object for HPKE for the given cipherSuite.

Link copied to clipboard
suspend fun getEncrypter(cipherSuite: Hpke.CipherSuite, receiverPublicKey: EcPublicKey, info: ByteArray, psk: ByteArray? = null, pskId: ByteArray? = null, authKey: AsymmetricKey? = null): Hpke.Encrypter

Creates a Encrypter object for HPKE in for the given cipherSuite.