diff options
author | schwarze <> | 2019-08-15 09:36:29 +0000 |
---|---|---|
committer | schwarze <> | 2019-08-15 09:36:29 +0000 |
commit | 2e4e17f1a824885679165c9dd3263455ddc830c4 (patch) | |
tree | 17f9eda060c00f655e579d3258f8f78de679fad4 /src | |
parent | 1dd51f2552f92c979f6ec583b3e7c4868fa2b9f7 (diff) | |
download | openbsd-2e4e17f1a824885679165c9dd3263455ddc830c4.tar.gz openbsd-2e4e17f1a824885679165c9dd3263455ddc830c4.tar.bz2 openbsd-2e4e17f1a824885679165c9dd3263455ddc830c4.zip |
document but do not recommend EVP_Cipher(3);
jsing@ provided crucial help regarding the content;
tweaks and OK tb@
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/man/EVP_EncryptInit.3 | 55 |
1 files changed, 52 insertions, 3 deletions
diff --git a/src/lib/libcrypto/man/EVP_EncryptInit.3 b/src/lib/libcrypto/man/EVP_EncryptInit.3 index 986f66a591..873a09aa37 100644 --- a/src/lib/libcrypto/man/EVP_EncryptInit.3 +++ b/src/lib/libcrypto/man/EVP_EncryptInit.3 | |||
@@ -1,11 +1,28 @@ | |||
1 | .\" $OpenBSD: EVP_EncryptInit.3,v 1.35 2019/06/06 01:06:58 schwarze Exp $ | 1 | .\" $OpenBSD: EVP_EncryptInit.3,v 1.36 2019/08/15 09:36:29 schwarze Exp $ |
2 | .\" full merge up to: OpenSSL 5211e094 Nov 11 14:39:11 2014 -0800 | 2 | .\" full merge up to: OpenSSL 5211e094 Nov 11 14:39:11 2014 -0800 |
3 | .\" EVP_bf_cbc.pod EVP_cast5_cbc.pod EVP_idea_cbc.pod EVP_rc2_cbc.pod | 3 | .\" EVP_bf_cbc.pod EVP_cast5_cbc.pod EVP_idea_cbc.pod EVP_rc2_cbc.pod |
4 | .\" 7c6d372a Nov 20 13:20:01 2018 +0000 | 4 | .\" 7c6d372a Nov 20 13:20:01 2018 +0000 |
5 | .\" selective merge up to: OpenSSL 16cfc2c9 Mar 8 22:30:28 2018 +0100 | 5 | .\" selective merge up to: OpenSSL 16cfc2c9 Mar 8 22:30:28 2018 +0100 |
6 | .\" EVP_chacha20.pod 8fa4d95e Oct 21 11:59:09 2017 +0900 | 6 | .\" EVP_chacha20.pod 8fa4d95e Oct 21 11:59:09 2017 +0900 |
7 | .\" | 7 | .\" |
8 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org> | 8 | .\" This file is a derived work. |
9 | .\" The changes are covered by the following Copyright and license: | ||
10 | .\" | ||
11 | .\" Copyright (c) 2019 Ingo Schwarze <schwarze@openbsd.org> | ||
12 | .\" | ||
13 | .\" Permission to use, copy, modify, and distribute this software for any | ||
14 | .\" purpose with or without fee is hereby granted, provided that the above | ||
15 | .\" copyright notice and this permission notice appear in all copies. | ||
16 | .\" | ||
17 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
18 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
19 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
20 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
21 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
22 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
23 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
24 | .\" | ||
25 | .\" The original file was written by Dr. Stephen Henson <steve@openssl.org> | ||
9 | .\" and Richard Levitte <levitte@openssl.org>. | 26 | .\" and Richard Levitte <levitte@openssl.org>. |
10 | .\" Copyright (c) 2000-2002, 2005, 2012-2016 The OpenSSL Project. | 27 | .\" Copyright (c) 2000-2002, 2005, 2012-2016 The OpenSSL Project. |
11 | .\" All rights reserved. | 28 | .\" All rights reserved. |
@@ -54,7 +71,7 @@ | |||
54 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 71 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
55 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 72 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
56 | .\" | 73 | .\" |
57 | .Dd $Mdocdate: June 6 2019 $ | 74 | .Dd $Mdocdate: August 15 2019 $ |
58 | .Dt EVP_ENCRYPTINIT 3 | 75 | .Dt EVP_ENCRYPTINIT 3 |
59 | .Os | 76 | .Os |
60 | .Sh NAME | 77 | .Sh NAME |
@@ -78,6 +95,7 @@ | |||
78 | .Nm EVP_DecryptFinal , | 95 | .Nm EVP_DecryptFinal , |
79 | .Nm EVP_CipherInit , | 96 | .Nm EVP_CipherInit , |
80 | .Nm EVP_CipherFinal , | 97 | .Nm EVP_CipherFinal , |
98 | .Nm EVP_Cipher , | ||
81 | .Nm EVP_CIPHER_CTX_set_flags , | 99 | .Nm EVP_CIPHER_CTX_set_flags , |
82 | .Nm EVP_CIPHER_CTX_clear_flags , | 100 | .Nm EVP_CIPHER_CTX_clear_flags , |
83 | .Nm EVP_CIPHER_CTX_test_flags , | 101 | .Nm EVP_CIPHER_CTX_test_flags , |
@@ -261,6 +279,13 @@ | |||
261 | .Fa "unsigned char *outm" | 279 | .Fa "unsigned char *outm" |
262 | .Fa "int *outl" | 280 | .Fa "int *outl" |
263 | .Fc | 281 | .Fc |
282 | .Ft int | ||
283 | .Fo EVP_Cipher | ||
284 | .Fa "EVP_CIPHER_CTX *ctx" | ||
285 | .Fa "unsigned char *out" | ||
286 | .Fa "const unsigned char *in" | ||
287 | .Fa "unsigned int inl" | ||
288 | .Fc | ||
264 | .Ft void | 289 | .Ft void |
265 | .Fo EVP_CIPHER_CTX_set_flags | 290 | .Fo EVP_CIPHER_CTX_set_flags |
266 | .Fa "EVP_CIPHER_CTX *ctx" | 291 | .Fa "EVP_CIPHER_CTX *ctx" |
@@ -583,6 +608,28 @@ or | |||
583 | .Fn EVP_CIPHER_CTX_free | 608 | .Fn EVP_CIPHER_CTX_free |
584 | must be called to free any context resources. | 609 | must be called to free any context resources. |
585 | .Pp | 610 | .Pp |
611 | .Fn EVP_Cipher | ||
612 | encrypts or decrypts aligned blocks of data | ||
613 | whose lengths match the cipher block size. | ||
614 | It requires that the previous encryption or decryption operation | ||
615 | using the same | ||
616 | .Fa ctx , | ||
617 | if there was any, ended exactly on a block boundary and that | ||
618 | .Fa inl | ||
619 | is an integer multiple of the cipher block size. | ||
620 | If either of these conditions is violated, | ||
621 | .Fn EVP_Cipher | ||
622 | silently produces incorrect results. | ||
623 | For that reason, using the function | ||
624 | .Fn EVP_CipherUpdate | ||
625 | instead is strongly recommended. | ||
626 | The latter can safely handle partial blocks, and even if | ||
627 | .Fa inl | ||
628 | actually is a multiple of the cipher block size for all calls, | ||
629 | the overhead incurred by using | ||
630 | .Fn EVP_CipherUpdate | ||
631 | is minimal. | ||
632 | .Pp | ||
586 | .Fn EVP_get_cipherbyname , | 633 | .Fn EVP_get_cipherbyname , |
587 | .Fn EVP_get_cipherbynid , | 634 | .Fn EVP_get_cipherbynid , |
588 | and | 635 | and |
@@ -857,6 +904,7 @@ for failure. | |||
857 | .Fn EVP_DecryptFinal , | 904 | .Fn EVP_DecryptFinal , |
858 | .Fn EVP_CipherInit , | 905 | .Fn EVP_CipherInit , |
859 | .Fn EVP_CipherFinal , | 906 | .Fn EVP_CipherFinal , |
907 | .Fn EVP_Cipher , | ||
860 | .Fn EVP_CIPHER_CTX_set_key_length , | 908 | .Fn EVP_CIPHER_CTX_set_key_length , |
861 | and | 909 | and |
862 | .Fn EVP_CIPHER_CTX_rand_key | 910 | .Fn EVP_CIPHER_CTX_rand_key |
@@ -1226,6 +1274,7 @@ first appeared in SSLeay 0.5.1. | |||
1226 | and | 1274 | and |
1227 | .Fn EVP_rc2_ofb | 1275 | .Fn EVP_rc2_ofb |
1228 | first appeared in SSLeay 0.5.2. | 1276 | first appeared in SSLeay 0.5.2. |
1277 | .Fn EVP_Cipher , | ||
1229 | .Fn EVP_CIPHER_block_size , | 1278 | .Fn EVP_CIPHER_block_size , |
1230 | .Fn EVP_CIPHER_key_length , | 1279 | .Fn EVP_CIPHER_key_length , |
1231 | .Fn EVP_CIPHER_iv_length , | 1280 | .Fn EVP_CIPHER_iv_length , |