Decapsulate a sender's encapsulated key and derive the shared HPKE secrets.
Declared in <openssl/hpke.h>
int
OSSL_HPKE_decap(
OSSL_HPKE_CTX* ctx,
unsigned char const* enc,
size_t enclen,
EVP_PKEY* recippriv,
unsigned char const* info,
size_t infolen);
1 on success, or 0 on error.
| Name | Description |
|---|---|
| ctx | Receiver HPKE context (only one successful call allowed per context). |
| enc | Encapsulated public value from OSSL_HPKE_encap(). |
| enclen | Length of enc in bytes. |
| recippriv | Recipient private key matching the suite's KEM. |
| info | Optional application info bound into key schedule, or NULL if infolen is 0. |
| infolen | Length of info in bytes. |