Initialize envelope decryption: unwrap ek with priv and set up type.
Declared in <openssl/evp.h>
int
EVP_OpenInit(
EVP_CIPHER_CTX* ctx,
EVP_CIPHER const* type,
unsigned char const* ek,
int ekl,
unsigned char const* iv,
EVP_PKEY* priv);
1 on success, or 0 on error.
| Name | Description |
|---|---|
| ctx | Cipher context to initialize for decryption. |
| type | Content-encryption cipher, or NULL to defer until a later call. |
| ek | Encrypted content-encryption key. |
| ekl | Length of ek in bytes. |
| iv | IV for type, or NULL if not required yet. |
| priv | Recipient private key used to decrypt ek. |