Decapsulate a shared secret from a KEM ciphertext using a context from EVP_PKEY_decapsulate_init().
Synopsis
Declared in <openssl/evp.h>
int
EVP_PKEY_decapsulate(
EVP_PKEY_CTX* ctx,
unsigned char* unwrapped,
size_t* unwrappedlen,
unsigned char const* wrapped,
size_t wrappedlen);
Return Value
1 on success, or a non‐positive value on failure.
Parameters
Name |
Description |
ctx |
Decapsulation context holding the private key. |
unwrapped |
Buffer for the recovered shared secret, or NULL to query size via |
unwrappedlen |
On entry, capacity of |
wrapped |
Encapsulation ciphertext bytes. |
wrappedlen |
Length of |
Created with MrDocs