1EVP_OpenInit(3)                     OpenSSL                    EVP_OpenInit(3)
2
3
4

NAME

6       EVP_OpenInit, EVP_OpenUpdate, EVP_OpenFinal - EVP envelope decryption
7

SYNOPSIS

9        #include <openssl/evp.h>
10
11        int EVP_OpenInit(EVP_CIPHER_CTX *ctx,EVP_CIPHER *type,unsigned char *ek,
12                       int ekl,unsigned char *iv,EVP_PKEY *priv);
13        int EVP_OpenUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
14                int *outl, unsigned char *in, int inl);
15        int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out,
16                int *outl);
17

DESCRIPTION

19       The EVP envelope routines are a high level interface to envelope
20       decryption. They decrypt a public key encrypted symmetric key and then
21       decrypt data using it.
22
23       EVP_OpenInit() initializes a cipher context ctx for decryption with
24       cipher type. It decrypts the encrypted symmetric key of length ekl
25       bytes passed in the ek parameter using the private key priv.  The IV is
26       supplied in the iv parameter.
27
28       EVP_OpenUpdate() and EVP_OpenFinal() have exactly the same properties
29       as the EVP_DecryptUpdate() and EVP_DecryptFinal() routines, as
30       documented on the EVP_EncryptInit(3) manual page.
31

NOTES

33       It is possible to call EVP_OpenInit() twice in the same way as
34       EVP_DecryptInit(). The first call should have priv set to NULL and
35       (after setting any cipher parameters) it should be called again with
36       type set to NULL.
37
38       If the cipher passed in the type parameter is a variable length cipher
39       then the key length will be set to the value of the recovered key
40       length. If the cipher is a fixed length cipher then the recovered key
41       length must match the fixed cipher length.
42

RETURN VALUES

44       EVP_OpenInit() returns 0 on error or a non zero integer (actually the
45       recovered secret key size) if successful.
46
47       EVP_OpenUpdate() returns 1 for success or 0 for failure.
48
49       EVP_OpenFinal() returns 0 if the decrypt failed or 1 for success.
50

SEE ALSO

52       evp(3), rand(3), EVP_EncryptInit(3), EVP_SealInit(3)
53

HISTORY

551.0.2o                            2020-08-01                   EVP_OpenInit(3)
Impressum