Decrypt ciphertext with AEAD using secrets derived by a prior OSSL_HPKE_decap().
Declared in <openssl/hpke.h>
int
OSSL_HPKE_open(
OSSL_HPKE_CTX* ctx,
unsigned char* pt,
size_t* ptlen,
unsigned char const* aad,
size_t aadlen,
unsigned char const* ct,
size_t ctlen);
1 on success, or 0 on error.
| Name | Description |
|---|---|
| ctx | Receiver HPKE context after successful decapsulation. |
| pt | Destination plaintext buffer; on input *ptlen is its capacity. |
| ptlen | In/out plaintext length (updated with bytes written). |
| aad | Optional additional authenticated data, or NULL if aadlen is 0. |
| aadlen | Length of aad in bytes. |
| ct | Ciphertext to decrypt (same order as produced by OSSL_HPKE_seal()). |
| ctlen | Length of ct in bytes. |