diff options
author | schwarze <> | 2018-02-14 00:19:03 +0000 |
---|---|---|
committer | schwarze <> | 2018-02-14 00:19:03 +0000 |
commit | 1424300fabc0bafbe4aa937a2e5649eb86cf8c52 (patch) | |
tree | 1a58e1a85ad983a5d494b83b3bb2d2f5256cdf02 /src/lib | |
parent | 4fd9c594edac4e91957a72dd64bb0bed589f8a6b (diff) | |
download | openbsd-1424300fabc0bafbe4aa937a2e5649eb86cf8c52.tar.gz openbsd-1424300fabc0bafbe4aa937a2e5649eb86cf8c52.tar.bz2 openbsd-1424300fabc0bafbe4aa937a2e5649eb86cf8c52.zip |
Mention two more block cipher modes that actually exist in our tree;
from Patrick dot Steuer at de dot ibm dot com
via OpenSSL commit 338ead0f Oct 9 12:16:34 2017 +0200.
Correct the EVP_EncryptUpdate(3) and EVP_DecryptUpdate(3) prototypes;
from FdaSilvaYY at gmail dot com
via OpenSSL commit 7bbb0050 Nov 22 22:00:29 2017 +0100.
Document the additional public function EVP_CIPHER_CTX_rand_key(3);
from Patrick dot Steuer at de dot ibm dot com
via OpenSSL commit 5c5eb286 Dec 5 00:36:43 2017 +0100.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/man/EVP_EncryptInit.3 | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/src/lib/libcrypto/man/EVP_EncryptInit.3 b/src/lib/libcrypto/man/EVP_EncryptInit.3 index 478e80839e..f883d1ce2a 100644 --- a/src/lib/libcrypto/man/EVP_EncryptInit.3 +++ b/src/lib/libcrypto/man/EVP_EncryptInit.3 | |||
@@ -1,6 +1,6 @@ | |||
1 | .\" $OpenBSD: EVP_EncryptInit.3,v 1.6 2017/08/20 18:41:39 schwarze Exp $ | 1 | .\" $OpenBSD: EVP_EncryptInit.3,v 1.7 2018/02/14 00:19:03 schwarze Exp $ |
2 | .\" OpenSSL EVP_EncryptInit.pod 519a5d1e Jun 27 17:38:25 2017 -0700 | 2 | .\" full merge up to: OpenSSL 5211e094 Nov 11 14:39:11 2014 -0800 |
3 | .\" OpenSSL EVP_EncryptInit.pod 5211e094 Nov 11 14:39:11 2014 -0800 | 3 | .\" selective merge up to: OpenSSL 5c5eb286 Dec 5 00:36:43 2017 +0100 |
4 | .\" | 4 | .\" |
5 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | 5 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. |
6 | .\" Copyright (c) 2000-2002, 2005, 2012-2016 The OpenSSL Project. | 6 | .\" Copyright (c) 2000-2002, 2005, 2012-2016 The OpenSSL Project. |
@@ -50,7 +50,7 @@ | |||
50 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 50 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
51 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 51 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
52 | .\" | 52 | .\" |
53 | .Dd $Mdocdate: August 20 2017 $ | 53 | .Dd $Mdocdate: February 14 2018 $ |
54 | .Dt EVP_ENCRYPTINIT 3 | 54 | .Dt EVP_ENCRYPTINIT 3 |
55 | .Os | 55 | .Os |
56 | .Sh NAME | 56 | .Sh NAME |
@@ -75,6 +75,7 @@ | |||
75 | .Nm EVP_CIPHER_CTX_set_padding , | 75 | .Nm EVP_CIPHER_CTX_set_padding , |
76 | .Nm EVP_CIPHER_CTX_set_key_length , | 76 | .Nm EVP_CIPHER_CTX_set_key_length , |
77 | .Nm EVP_CIPHER_CTX_ctrl , | 77 | .Nm EVP_CIPHER_CTX_ctrl , |
78 | .Nm EVP_CIPHER_CTX_rand_key , | ||
78 | .Nm EVP_CIPHER_CTX_cleanup , | 79 | .Nm EVP_CIPHER_CTX_cleanup , |
79 | .Nm EVP_get_cipherbyname , | 80 | .Nm EVP_get_cipherbyname , |
80 | .Nm EVP_get_cipherbynid , | 81 | .Nm EVP_get_cipherbynid , |
@@ -184,7 +185,7 @@ | |||
184 | .Fa "EVP_CIPHER_CTX *ctx" | 185 | .Fa "EVP_CIPHER_CTX *ctx" |
185 | .Fa "unsigned char *out" | 186 | .Fa "unsigned char *out" |
186 | .Fa "int *outl" | 187 | .Fa "int *outl" |
187 | .Fa "unsigned char *in" | 188 | .Fa "const unsigned char *in" |
188 | .Fa "int inl" | 189 | .Fa "int inl" |
189 | .Fc | 190 | .Fc |
190 | .Ft int | 191 | .Ft int |
@@ -206,7 +207,7 @@ | |||
206 | .Fa "EVP_CIPHER_CTX *ctx" | 207 | .Fa "EVP_CIPHER_CTX *ctx" |
207 | .Fa "unsigned char *out" | 208 | .Fa "unsigned char *out" |
208 | .Fa "int *outl" | 209 | .Fa "int *outl" |
209 | .Fa "unsigned char *in" | 210 | .Fa "const unsigned char *in" |
210 | .Fa "int inl" | 211 | .Fa "int inl" |
211 | .Fc | 212 | .Fc |
212 | .Ft int | 213 | .Ft int |
@@ -296,6 +297,11 @@ | |||
296 | .Fa "void *ptr" | 297 | .Fa "void *ptr" |
297 | .Fc | 298 | .Fc |
298 | .Ft int | 299 | .Ft int |
300 | .Fo EVP_CIPHER_CTX_rand_key | ||
301 | .Fa "EVP_CIPHER_CTX *ctx" | ||
302 | .Fa "unsigned char *key" | ||
303 | .Fc | ||
304 | .Ft int | ||
299 | .Fo EVP_CIPHER_CTX_cleanup | 305 | .Fo EVP_CIPHER_CTX_cleanup |
300 | .Fa "EVP_CIPHER_CTX *ctx" | 306 | .Fa "EVP_CIPHER_CTX *ctx" |
301 | .Fc | 307 | .Fc |
@@ -661,8 +667,10 @@ return the block cipher mode: | |||
661 | .Dv EVP_CIPH_ECB_MODE , | 667 | .Dv EVP_CIPH_ECB_MODE , |
662 | .Dv EVP_CIPH_CBC_MODE , | 668 | .Dv EVP_CIPH_CBC_MODE , |
663 | .Dv EVP_CIPH_CFB_MODE , | 669 | .Dv EVP_CIPH_CFB_MODE , |
670 | .Dv EVP_CIPH_OFB_MODE , | ||
671 | .Dv EVP_CIPH_CTR_MODE , | ||
664 | or | 672 | or |
665 | .Dv EVP_CIPH_OFB_MODE . | 673 | .Dv EVP_CIPH_XTS_MODE . |
666 | If the cipher is a stream cipher then | 674 | If the cipher is a stream cipher then |
667 | .Dv EVP_CIPH_STREAM_CIPHER | 675 | .Dv EVP_CIPH_STREAM_CIPHER |
668 | is returned. | 676 | is returned. |
@@ -707,6 +715,18 @@ allows various cipher specific parameters to be determined and set. | |||
707 | Currently only the RC2 effective key length and the number of rounds of | 715 | Currently only the RC2 effective key length and the number of rounds of |
708 | RC5 can be set. | 716 | RC5 can be set. |
709 | .Pp | 717 | .Pp |
718 | .Fn EVP_CIPHER_CTX_rand_key | ||
719 | generates a random key of the appropriate length based on the cipher | ||
720 | context. | ||
721 | The | ||
722 | .Vt EVP_CIPHER | ||
723 | can provide its own random key generation routine to support keys | ||
724 | of a specific form. | ||
725 | The | ||
726 | .Fa key | ||
727 | argument must point to a buffer at least as big as the value returned by | ||
728 | .Fn EVP_CIPHER_CTX_key_length . | ||
729 | .Pp | ||
710 | Where possible the EVP interface to symmetric ciphers should be | 730 | Where possible the EVP interface to symmetric ciphers should be |
711 | used in preference to the low level interfaces. | 731 | used in preference to the low level interfaces. |
712 | This is because the code then becomes transparent to the cipher used and | 732 | This is because the code then becomes transparent to the cipher used and |
@@ -782,8 +802,10 @@ return 1 for success and 0 for failure. | |||
782 | .Fn EVP_CipherFinal_ex | 802 | .Fn EVP_CipherFinal_ex |
783 | returns 0 for a decryption failure or 1 for success. | 803 | returns 0 for a decryption failure or 1 for success. |
784 | .Pp | 804 | .Pp |
805 | .Fn EVP_CIPHER_CTX_rand_key | ||
806 | and | ||
785 | .Fn EVP_CIPHER_CTX_cleanup | 807 | .Fn EVP_CIPHER_CTX_cleanup |
786 | returns 1 for success and 0 for failure. | 808 | return 1 for success or 0 for failure. |
787 | .Pp | 809 | .Pp |
788 | .Fn EVP_get_cipherbyname , | 810 | .Fn EVP_get_cipherbyname , |
789 | .Fn EVP_get_cipherbynid , | 811 | .Fn EVP_get_cipherbynid , |