summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/doc/EVP_OpenInit.pod
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/doc/EVP_OpenInit.pod')
-rw-r--r--src/lib/libcrypto/doc/EVP_OpenInit.pod28
1 files changed, 20 insertions, 8 deletions
diff --git a/src/lib/libcrypto/doc/EVP_OpenInit.pod b/src/lib/libcrypto/doc/EVP_OpenInit.pod
index 50edb124e4..2e710da945 100644
--- a/src/lib/libcrypto/doc/EVP_OpenInit.pod
+++ b/src/lib/libcrypto/doc/EVP_OpenInit.pod
@@ -10,9 +10,9 @@ EVP_OpenInit, EVP_OpenUpdate, EVP_OpenFinal - EVP envelope decryption
10 10
11 int EVP_OpenInit(EVP_CIPHER_CTX *ctx,EVP_CIPHER *type,unsigned char *ek, 11 int EVP_OpenInit(EVP_CIPHER_CTX *ctx,EVP_CIPHER *type,unsigned char *ek,
12 int ekl,unsigned char *iv,EVP_PKEY *priv); 12 int ekl,unsigned char *iv,EVP_PKEY *priv);
13 void EVP_OpenUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, 13 int EVP_OpenUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
14 int *outl, unsigned char *in, int inl); 14 int *outl, unsigned char *in, int inl);
15 void EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, 15 int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out,
16 int *outl); 16 int *outl);
17 17
18=head1 DESCRIPTION 18=head1 DESCRIPTION
@@ -21,7 +21,7 @@ The EVP envelope routines are a high level interface to envelope
21decryption. They decrypt a public key encrypted symmetric key and 21decryption. They decrypt a public key encrypted symmetric key and
22then decrypt data using it. 22then decrypt data using it.
23 23
24EVP_OpenInit() initialises a cipher context B<ctx> for decryption 24EVP_OpenInit() initializes a cipher context B<ctx> for decryption
25with cipher B<type>. It decrypts the encrypted symmetric key of length 25with cipher B<type>. It decrypts the encrypted symmetric key of length
26B<ekl> bytes passed in the B<ek> parameter using the private key B<priv>. 26B<ekl> bytes passed in the B<ek> parameter using the private key B<priv>.
27The IV is supplied in the B<iv> parameter. 27The IV is supplied in the B<iv> parameter.
@@ -29,20 +29,32 @@ The IV is supplied in the B<iv> parameter.
29EVP_OpenUpdate() and EVP_OpenFinal() have exactly the same properties 29EVP_OpenUpdate() and EVP_OpenFinal() have exactly the same properties
30as the EVP_DecryptUpdate() and EVP_DecryptFinal() routines, as 30as the EVP_DecryptUpdate() and EVP_DecryptFinal() routines, as
31documented on the L<EVP_EncryptInit(3)|EVP_EncryptInit(3)> manual 31documented on the L<EVP_EncryptInit(3)|EVP_EncryptInit(3)> manual
32page. 32page.
33
34=head1 NOTES
35
36It is possible to call EVP_OpenInit() twice in the same way as
37EVP_DecryptInit(). The first call should have B<priv> set to NULL
38and (after setting any cipher parameters) it should be called again
39with B<type> set to NULL.
40
41If the cipher passed in the B<type> parameter is a variable length
42cipher then the key length will be set to the value of the recovered
43key length. If the cipher is a fixed length cipher then the recovered
44key length must match the fixed cipher length.
33 45
34=head1 RETURN VALUES 46=head1 RETURN VALUES
35 47
36EVP_OpenInit() returns -1 on error or an non zero integer (actually the 48EVP_OpenInit() returns 0 on error or a non zero integer (actually the
37recovered secret key size) if successful. 49recovered secret key size) if successful.
38 50
39EVP_SealUpdate() does not return a value. 51EVP_OpenUpdate() returns 1 for success or 0 for failure.
40 52
41EVP_SealFinal() returns 0 if the decrypt failed or 1 for success. 53EVP_OpenFinal() returns 0 if the decrypt failed or 1 for success.
42 54
43=head1 SEE ALSO 55=head1 SEE ALSO
44 56
45L<evp(3)|evp(3)>, 57L<evp(3)|evp(3)>, L<rand(3)|rand(3)>,
46L<EVP_EncryptInit(3)|EVP_EncryptInit(3)>, 58L<EVP_EncryptInit(3)|EVP_EncryptInit(3)>,
47L<EVP_SealInit(3)|EVP_SealInit(3)> 59L<EVP_SealInit(3)|EVP_SealInit(3)>
48 60