diff options
Diffstat (limited to 'src/lib/libcrypto/man/EVP_EncryptInit.3')
-rw-r--r-- | src/lib/libcrypto/man/EVP_EncryptInit.3 | 72 |
1 files changed, 10 insertions, 62 deletions
diff --git a/src/lib/libcrypto/man/EVP_EncryptInit.3 b/src/lib/libcrypto/man/EVP_EncryptInit.3 index ddec4e7e79..8fc615b07e 100644 --- a/src/lib/libcrypto/man/EVP_EncryptInit.3 +++ b/src/lib/libcrypto/man/EVP_EncryptInit.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: EVP_EncryptInit.3,v 1.48 2023/08/31 17:27:41 schwarze Exp $ | 1 | .\" $OpenBSD: EVP_EncryptInit.3,v 1.49 2023/12/01 10:40:21 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 |
@@ -69,14 +69,12 @@ | |||
69 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 69 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
70 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 70 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
71 | .\" | 71 | .\" |
72 | .Dd $Mdocdate: August 31 2023 $ | 72 | .Dd $Mdocdate: December 1 2023 $ |
73 | .Dt EVP_ENCRYPTINIT 3 | 73 | .Dt EVP_ENCRYPTINIT 3 |
74 | .Os | 74 | .Os |
75 | .Sh NAME | 75 | .Sh NAME |
76 | .Nm EVP_CIPHER_CTX_new , | 76 | .Nm EVP_CIPHER_CTX_new , |
77 | .Nm EVP_CIPHER_CTX_reset , | 77 | .Nm EVP_CIPHER_CTX_reset , |
78 | .Nm EVP_CIPHER_CTX_cleanup , | ||
79 | .Nm EVP_CIPHER_CTX_init , | ||
80 | .Nm EVP_CIPHER_CTX_free , | 78 | .Nm EVP_CIPHER_CTX_free , |
81 | .Nm EVP_CIPHER_CTX_copy , | 79 | .Nm EVP_CIPHER_CTX_copy , |
82 | .Nm EVP_EncryptInit_ex , | 80 | .Nm EVP_EncryptInit_ex , |
@@ -94,7 +92,6 @@ | |||
94 | .Nm EVP_DecryptFinal , | 92 | .Nm EVP_DecryptFinal , |
95 | .Nm EVP_CipherInit , | 93 | .Nm EVP_CipherInit , |
96 | .Nm EVP_CipherFinal , | 94 | .Nm EVP_CipherFinal , |
97 | .Nm EVP_Cipher , | ||
98 | .Nm EVP_CIPHER_CTX_encrypting , | 95 | .Nm EVP_CIPHER_CTX_encrypting , |
99 | .Nm EVP_get_cipherbyname , | 96 | .Nm EVP_get_cipherbyname , |
100 | .Nm EVP_get_cipherbynid , | 97 | .Nm EVP_get_cipherbynid , |
@@ -132,14 +129,6 @@ | |||
132 | .Fo EVP_CIPHER_CTX_reset | 129 | .Fo EVP_CIPHER_CTX_reset |
133 | .Fa "EVP_CIPHER_CTX *ctx" | 130 | .Fa "EVP_CIPHER_CTX *ctx" |
134 | .Fc | 131 | .Fc |
135 | .Ft int | ||
136 | .Fo EVP_CIPHER_CTX_cleanup | ||
137 | .Fa "EVP_CIPHER_CTX *ctx" | ||
138 | .Fc | ||
139 | .Ft void | ||
140 | .Fo EVP_CIPHER_CTX_init | ||
141 | .Fa "EVP_CIPHER_CTX *ctx" | ||
142 | .Fc | ||
143 | .Ft void | 132 | .Ft void |
144 | .Fo EVP_CIPHER_CTX_free | 133 | .Fo EVP_CIPHER_CTX_free |
145 | .Fa "EVP_CIPHER_CTX *ctx" | 134 | .Fa "EVP_CIPHER_CTX *ctx" |
@@ -257,13 +246,6 @@ | |||
257 | .Fa "int *outl" | 246 | .Fa "int *outl" |
258 | .Fc | 247 | .Fc |
259 | .Ft int | 248 | .Ft int |
260 | .Fo EVP_Cipher | ||
261 | .Fa "EVP_CIPHER_CTX *ctx" | ||
262 | .Fa "unsigned char *out" | ||
263 | .Fa "const unsigned char *in" | ||
264 | .Fa "unsigned int inl" | ||
265 | .Fc | ||
266 | .Ft int | ||
267 | .Fo EVP_CIPHER_CTX_encrypting | 249 | .Fo EVP_CIPHER_CTX_encrypting |
268 | .Fa "const EVP_CIPHER_CTX *ctx" | 250 | .Fa "const EVP_CIPHER_CTX *ctx" |
269 | .Fc | 251 | .Fc |
@@ -300,16 +282,6 @@ object itself, such that it can be reused for another series of calls to | |||
300 | .Fn EVP_CipherUpdate , | 282 | .Fn EVP_CipherUpdate , |
301 | and | 283 | and |
302 | .Fn EVP_CipherFinal . | 284 | .Fn EVP_CipherFinal . |
303 | .Fn EVP_CIPHER_CTX_cleanup | ||
304 | is a deprecated alias for | ||
305 | .Fn EVP_CIPHER_CTX_reset . | ||
306 | .Pp | ||
307 | .Fn EVP_CIPHER_CTX_init | ||
308 | is a deprecated function to clear a cipher context on the stack | ||
309 | before use. | ||
310 | Do not use it on a cipher context returned from | ||
311 | .Fn EVP_CIPHER_CTX_new | ||
312 | or one that was already used. | ||
313 | .Pp | 285 | .Pp |
314 | .Fn EVP_CIPHER_CTX_free | 286 | .Fn EVP_CIPHER_CTX_free |
315 | clears all information from | 287 | clears all information from |
@@ -507,28 +479,6 @@ or | |||
507 | .Fn EVP_CIPHER_CTX_free | 479 | .Fn EVP_CIPHER_CTX_free |
508 | must be called to free any context resources. | 480 | must be called to free any context resources. |
509 | .Pp | 481 | .Pp |
510 | .Fn EVP_Cipher | ||
511 | encrypts or decrypts aligned blocks of data | ||
512 | whose lengths match the cipher block size. | ||
513 | It requires that the previous encryption or decryption operation | ||
514 | using the same | ||
515 | .Fa ctx , | ||
516 | if there was any, ended exactly on a block boundary and that | ||
517 | .Fa inl | ||
518 | is an integer multiple of the cipher block size. | ||
519 | If either of these conditions is violated, | ||
520 | .Fn EVP_Cipher | ||
521 | silently produces incorrect results. | ||
522 | For that reason, using the function | ||
523 | .Fn EVP_CipherUpdate | ||
524 | instead is strongly recommended. | ||
525 | The latter can safely handle partial blocks, and even if | ||
526 | .Fa inl | ||
527 | actually is a multiple of the cipher block size for all calls, | ||
528 | the overhead incurred by using | ||
529 | .Fn EVP_CipherUpdate | ||
530 | is minimal. | ||
531 | .Pp | ||
532 | .Fn EVP_get_cipherbyname , | 482 | .Fn EVP_get_cipherbyname , |
533 | .Fn EVP_get_cipherbynid , | 483 | .Fn EVP_get_cipherbynid , |
534 | and | 484 | and |
@@ -602,7 +552,6 @@ for success or | |||
602 | for failure. | 552 | for failure. |
603 | .Pp | 553 | .Pp |
604 | .Fn EVP_CIPHER_CTX_reset , | 554 | .Fn EVP_CIPHER_CTX_reset , |
605 | .Fn EVP_CIPHER_CTX_cleanup , | ||
606 | .Fn EVP_CIPHER_CTX_copy , | 555 | .Fn EVP_CIPHER_CTX_copy , |
607 | .Fn EVP_EncryptInit_ex , | 556 | .Fn EVP_EncryptInit_ex , |
608 | .Fn EVP_EncryptUpdate , | 557 | .Fn EVP_EncryptUpdate , |
@@ -618,9 +567,8 @@ for failure. | |||
618 | .Fn EVP_DecryptInit , | 567 | .Fn EVP_DecryptInit , |
619 | .Fn EVP_DecryptFinal , | 568 | .Fn EVP_DecryptFinal , |
620 | .Fn EVP_CipherInit , | 569 | .Fn EVP_CipherInit , |
621 | .Fn EVP_CipherFinal , | ||
622 | and | 570 | and |
623 | .Fn EVP_Cipher | 571 | .Fn EVP_CipherFinal |
624 | return 1 for success or 0 for failure. | 572 | return 1 for success or 0 for failure. |
625 | .Pp | 573 | .Pp |
626 | .Fn EVP_CIPHER_CTX_encrypting | 574 | .Fn EVP_CIPHER_CTX_encrypting |
@@ -729,7 +677,9 @@ To specify any additional authenticated data (AAD), a call to | |||
729 | .Fn EVP_EncryptUpdate , | 677 | .Fn EVP_EncryptUpdate , |
730 | or | 678 | or |
731 | .Fn EVP_DecryptUpdate | 679 | .Fn EVP_DecryptUpdate |
732 | should be made with the output parameter out set to | 680 | should be made with the output parameter |
681 | .Fa out | ||
682 | set to | ||
733 | .Dv NULL . | 683 | .Dv NULL . |
734 | .Pp | 684 | .Pp |
735 | When decrypting, the return value of | 685 | When decrypting, the return value of |
@@ -775,7 +725,9 @@ by calling | |||
775 | .Fn EVP_EncryptUpdate , | 725 | .Fn EVP_EncryptUpdate , |
776 | or | 726 | or |
777 | .Fn EVP_DecryptUpdate | 727 | .Fn EVP_DecryptUpdate |
778 | with the output parameter out set to | 728 | with the output parameter |
729 | .Fa out | ||
730 | set to | ||
779 | .Dv NULL . | 731 | .Dv NULL . |
780 | Additionally, the total | 732 | Additionally, the total |
781 | plaintext or ciphertext length MUST be passed to | 733 | plaintext or ciphertext length MUST be passed to |
@@ -929,6 +881,7 @@ do_crypt(FILE *in, FILE *out, int do_encrypt) | |||
929 | .Xr EVP_chacha20 3 , | 881 | .Xr EVP_chacha20 3 , |
930 | .Xr EVP_CIPHER_CTX_ctrl 3 , | 882 | .Xr EVP_CIPHER_CTX_ctrl 3 , |
931 | .Xr EVP_CIPHER_CTX_get_cipher_data 3 , | 883 | .Xr EVP_CIPHER_CTX_get_cipher_data 3 , |
884 | .Xr EVP_CIPHER_CTX_init 3 , | ||
932 | .Xr EVP_CIPHER_CTX_set_flags 3 , | 885 | .Xr EVP_CIPHER_CTX_set_flags 3 , |
933 | .Xr EVP_CIPHER_nid 3 , | 886 | .Xr EVP_CIPHER_nid 3 , |
934 | .Xr EVP_des_cbc 3 , | 887 | .Xr EVP_des_cbc 3 , |
@@ -959,15 +912,12 @@ first appeared in SSLeay 0.5.1. | |||
959 | and | 912 | and |
960 | .Fn EVP_rc2_ofb | 913 | .Fn EVP_rc2_ofb |
961 | first appeared in SSLeay 0.5.2. | 914 | first appeared in SSLeay 0.5.2. |
962 | .Fn EVP_Cipher | ||
963 | first appeared in SSLeay 0.6.5. | ||
964 | .Fn EVP_bf_cbc , | 915 | .Fn EVP_bf_cbc , |
965 | .Fn EVP_bf_ecb , | 916 | .Fn EVP_bf_ecb , |
966 | .Fn EVP_bf_cfb , | 917 | .Fn EVP_bf_cfb , |
967 | and | 918 | and |
968 | .Fn EVP_bf_ofb | 919 | .Fn EVP_bf_ofb |
969 | first appeared in SSLeay 0.6.6. | 920 | first appeared in SSLeay 0.6.6. |
970 | .Fn EVP_CIPHER_CTX_cleanup , | ||
971 | .Fn EVP_get_cipherbyobj , | 921 | .Fn EVP_get_cipherbyobj , |
972 | .Fn EVP_CIPHER_CTX_cipher , | 922 | .Fn EVP_CIPHER_CTX_cipher , |
973 | and | 923 | and |
@@ -975,8 +925,6 @@ and | |||
975 | first appeared in SSLeay 0.8.0. | 925 | first appeared in SSLeay 0.8.0. |
976 | .Fn EVP_get_cipherbynid | 926 | .Fn EVP_get_cipherbynid |
977 | first appeared in SSLeay 0.8.1. | 927 | first appeared in SSLeay 0.8.1. |
978 | .Fn EVP_CIPHER_CTX_init | ||
979 | first appeared in SSLeay 0.9.0. | ||
980 | All these functions have been available since | 928 | All these functions have been available since |
981 | .Ox 2.4 . | 929 | .Ox 2.4 . |
982 | .Pp | 930 | .Pp |