summaryrefslogtreecommitdiff
path: root/src/lib/libssl/src/doc/crypto/EVP_SealInit.pod
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/src/doc/crypto/EVP_SealInit.pod')
-rw-r--r--src/lib/libssl/src/doc/crypto/EVP_SealInit.pod18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/lib/libssl/src/doc/crypto/EVP_SealInit.pod b/src/lib/libssl/src/doc/crypto/EVP_SealInit.pod
index 42beed33bd..0451eb648a 100644
--- a/src/lib/libssl/src/doc/crypto/EVP_SealInit.pod
+++ b/src/lib/libssl/src/doc/crypto/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
22using public key encryption. Data can then be encrypted using this 22using public key encryption. Data can then be encrypted using this
23key. 23key.
24 24
25EVP_SealInit() initialises a cipher context B<ctx> for encryption 25EVP_SealInit() initializes a cipher context B<ctx> for encryption
26with cipher B<type> using a random secret key and IV supplied in 26with cipher B<type> using a random secret key and IV supplied in
27the B<iv> parameter. B<type> is normally supplied by a function such 27the B<iv> parameter. B<type> is normally supplied by a function such
28as EVP_des_cbc(). The secret key is encrypted using one or more public 28as 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
44EVP_SealInit() returns -1 on error or B<npubk> if successful. 44EVP_SealInit() returns 0 on error or B<npubk> if successful.
45 45
46EVP_SealUpdate() and EVP_SealFinal() do not return values. 46EVP_SealUpdate() and EVP_SealFinal() return 1 for success and 0 for
47failure.
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
59bulk encryption and the small random symmetric key used is transferred 60bulk encryption and the small random symmetric key used is transferred
60using public key encryption. 61using public key encryption.
61 62
63It is possible to call EVP_SealInit() twice in the same way as
64EVP_EncryptInit(). The first call should have B<npubk> set to 0
65and (after setting any cipher parameters) it should be called again
66with B<type> set to NULL.
67
62=head1 SEE ALSO 68=head1 SEE ALSO
63 69
64L<evp(3)|evp(3)>, 70L<evp(3)|evp(3)>, L<rand(3)|rand(3)>,
65L<EVP_EncryptInit(3)|EVP_EncryptInit(3)>, 71L<EVP_EncryptInit(3)|EVP_EncryptInit(3)>,
66L<EVP_OpenInit(3)|EVP_OpenInit(3)> 72L<EVP_OpenInit(3)|EVP_OpenInit(3)>
67 73