EVP_OpenInit(3) OpenSSL EVP_OpenInit(3) NNAAMMEE EVP_OpenInit, EVP_OpenUpdate, EVP_OpenFinal - EVP envelope decryption SSYYNNOOPPSSIISS #include int EVP_OpenInit(EVP_CIPHER_CTX *ctx,EVP_CIPHER *type,unsigned char *ek, int ekl,unsigned char *iv,EVP_PKEY *priv); int EVP_OpenUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, unsigned char *in, int inl); int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); DDEESSCCRRIIPPTTIIOONN The EVP envelope routines are a high level interface to envelope decryption. They decrypt a public key encrypted symmetric key and then decrypt data using it. _E_V_P___O_p_e_n_I_n_i_t_(_) initializes a cipher context ccttxx for decryption with cipher ttyyppee. It decrypts the encrypted symmetric key of length eekkll bytes passed in the eekk parameter using the private key pprriivv. The IV is supplied in the iivv parameter. _E_V_P___O_p_e_n_U_p_d_a_t_e_(_) and _E_V_P___O_p_e_n_F_i_n_a_l_(_) have exactly the same properties as the _E_V_P___D_e_c_r_y_p_t_U_p_d_a_t_e_(_) and _E_V_P___D_e_c_r_y_p_t_F_i_n_a_l_(_) routines, as docu- mented on the _E_V_P___E_n_c_r_y_p_t_I_n_i_t(3) manual page. NNOOTTEESS It is possible to call _E_V_P___O_p_e_n_I_n_i_t_(_) twice in the same way as _E_V_P___D_e_c_r_y_p_t_I_n_i_t_(_). The first call should have pprriivv set to NULL and (after setting any cipher parameters) it should be called again with ttyyppee set to NULL. If the cipher passed in the ttyyppee parameter is a variable length cipher then the key length will be set to the value of the recovered key length. If the cipher is a fixed length cipher then the recovered key length must match the fixed cipher length. RREETTUURRNN VVAALLUUEESS _E_V_P___O_p_e_n_I_n_i_t_(_) returns 0 on error or a non zero integer (actually the recovered secret key size) if successful. _E_V_P___O_p_e_n_U_p_d_a_t_e_(_) returns 1 for success or 0 for failure. _E_V_P___O_p_e_n_F_i_n_a_l_(_) returns 0 if the decrypt failed or 1 for success. SSEEEE AALLSSOO _e_v_p(3), _r_a_n_d(3), _E_V_P___E_n_c_r_y_p_t_I_n_i_t(3), _E_V_P___S_e_a_l_I_n_i_t(3) HHIISSTTOORRYY 1.0.2u 2019-12-20 EVP_OpenInit(3)