diff options
Diffstat (limited to 'src/lib/libcrypto/doc/EVP_SealInit.pod')
-rw-r--r-- | src/lib/libcrypto/doc/EVP_SealInit.pod | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/lib/libcrypto/doc/EVP_SealInit.pod b/src/lib/libcrypto/doc/EVP_SealInit.pod index 42beed33bd..0451eb648a 100644 --- a/src/lib/libcrypto/doc/EVP_SealInit.pod +++ b/src/lib/libcrypto/doc/EVP_SealInit.pod | |||
@@ -10,9 +10,9 @@ EVP_SealInit, EVP_SealUpdate, EVP_SealFinal - EVP envelope encryption | |||
10 | 10 | ||
11 | int EVP_SealInit(EVP_CIPHER_CTX *ctx, EVP_CIPHER *type, unsigned char **ek, | 11 | int EVP_SealInit(EVP_CIPHER_CTX *ctx, EVP_CIPHER *type, unsigned char **ek, |
12 | int *ekl, unsigned char *iv,EVP_PKEY **pubk, int npubk); | 12 | int *ekl, unsigned char *iv,EVP_PKEY **pubk, int npubk); |
13 | void EVP_SealUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, | 13 | int EVP_SealUpdate(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_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, | 15 | int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, |
16 | int *outl); | 16 | int *outl); |
17 | 17 | ||
18 | =head1 DESCRIPTION | 18 | =head1 DESCRIPTION |
@@ -22,7 +22,7 @@ encryption. They generate a random key and then "envelope" it by | |||
22 | using public key encryption. Data can then be encrypted using this | 22 | using public key encryption. Data can then be encrypted using this |
23 | key. | 23 | key. |
24 | 24 | ||
25 | EVP_SealInit() initialises a cipher context B<ctx> for encryption | 25 | EVP_SealInit() initializes a cipher context B<ctx> for encryption |
26 | with cipher B<type> using a random secret key and IV supplied in | 26 | with cipher B<type> using a random secret key and IV supplied in |
27 | the B<iv> parameter. B<type> is normally supplied by a function such | 27 | the B<iv> parameter. B<type> is normally supplied by a function such |
28 | as EVP_des_cbc(). The secret key is encrypted using one or more public | 28 | as EVP_des_cbc(). The secret key is encrypted using one or more public |
@@ -41,9 +41,10 @@ page. | |||
41 | 41 | ||
42 | =head1 RETURN VALUES | 42 | =head1 RETURN VALUES |
43 | 43 | ||
44 | EVP_SealInit() returns -1 on error or B<npubk> if successful. | 44 | EVP_SealInit() returns 0 on error or B<npubk> if successful. |
45 | 45 | ||
46 | EVP_SealUpdate() and EVP_SealFinal() do not return values. | 46 | EVP_SealUpdate() and EVP_SealFinal() return 1 for success and 0 for |
47 | failure. | ||
47 | 48 | ||
48 | =head1 NOTES | 49 | =head1 NOTES |
49 | 50 | ||
@@ -59,9 +60,14 @@ but symmetric encryption is fast. So symmetric encryption is used for | |||
59 | bulk encryption and the small random symmetric key used is transferred | 60 | bulk encryption and the small random symmetric key used is transferred |
60 | using public key encryption. | 61 | using public key encryption. |
61 | 62 | ||
63 | It is possible to call EVP_SealInit() twice in the same way as | ||
64 | EVP_EncryptInit(). The first call should have B<npubk> set to 0 | ||
65 | and (after setting any cipher parameters) it should be called again | ||
66 | with B<type> set to NULL. | ||
67 | |||
62 | =head1 SEE ALSO | 68 | =head1 SEE ALSO |
63 | 69 | ||
64 | L<evp(3)|evp(3)>, | 70 | L<evp(3)|evp(3)>, L<rand(3)|rand(3)>, |
65 | L<EVP_EncryptInit(3)|EVP_EncryptInit(3)>, | 71 | L<EVP_EncryptInit(3)|EVP_EncryptInit(3)>, |
66 | L<EVP_OpenInit(3)|EVP_OpenInit(3)> | 72 | L<EVP_OpenInit(3)|EVP_OpenInit(3)> |
67 | 73 | ||