summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.382
1 files changed, 69 insertions, 13 deletions
diff --git a/src/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 b/src/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3
index 8462da6d46..a49c31cd67 100644
--- a/src/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3
+++ b/src/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3
@@ -1,9 +1,9 @@
1.\" $OpenBSD: EVP_PKEY_CTX_ctrl.3,v 1.11 2018/03/23 23:18:17 schwarze Exp $ 1.\" $OpenBSD: EVP_PKEY_CTX_ctrl.3,v 1.12 2018/12/21 23:51:42 schwarze Exp $
2.\" OpenSSL EVP_PKEY_CTX_ctrl.pod 1722496f Jun 8 15:18:38 2017 -0400 2.\" full merge up to: OpenSSL e03af178 Dec 11 17:05:57 2014 -0500
3.\" OpenSSL EVP_PKEY_CTX_ctrl.pod e03af178 Dec 11 17:05:57 2014 -0500 3.\" selective merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +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) 2006, 2009, 2013, 2014, 2015 The OpenSSL Project. 6.\" Copyright (c) 2006, 2009, 2013, 2014, 2015, 2018 The OpenSSL Project.
7.\" All rights reserved. 7.\" All rights reserved.
8.\" 8.\"
9.\" Redistribution and use in source and binary forms, with or without 9.\" Redistribution and use in source and binary forms, with or without
@@ -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: March 23 2018 $ 53.Dd $Mdocdate: December 21 2018 $
54.Dt EVP_PKEY_CTX_CTRL 3 54.Dt EVP_PKEY_CTX_CTRL 3
55.Os 55.Os
56.Sh NAME 56.Sh NAME
@@ -58,9 +58,13 @@
58.Nm EVP_PKEY_CTX_ctrl_str , 58.Nm EVP_PKEY_CTX_ctrl_str ,
59.Nm EVP_PKEY_CTX_set_signature_md , 59.Nm EVP_PKEY_CTX_set_signature_md ,
60.Nm EVP_PKEY_CTX_set_rsa_padding , 60.Nm EVP_PKEY_CTX_set_rsa_padding ,
61.Nm EVP_PKEY_CTX_get_rsa_padding ,
61.Nm EVP_PKEY_CTX_set_rsa_pss_saltlen , 62.Nm EVP_PKEY_CTX_set_rsa_pss_saltlen ,
63.Nm EVP_PKEY_CTX_get_rsa_pss_saltlen ,
62.Nm EVP_PKEY_CTX_set_rsa_keygen_bits , 64.Nm EVP_PKEY_CTX_set_rsa_keygen_bits ,
63.Nm EVP_PKEY_CTX_set_rsa_keygen_pubexp , 65.Nm EVP_PKEY_CTX_set_rsa_keygen_pubexp ,
66.Nm EVP_PKEY_CTX_set_rsa_mgf1_md ,
67.Nm EVP_PKEY_CTX_get_rsa_mgf1_md ,
64.Nm EVP_PKEY_CTX_set_dsa_paramgen_bits , 68.Nm EVP_PKEY_CTX_set_dsa_paramgen_bits ,
65.Nm EVP_PKEY_CTX_set_dh_paramgen_prime_len , 69.Nm EVP_PKEY_CTX_set_dh_paramgen_prime_len ,
66.Nm EVP_PKEY_CTX_set_dh_paramgen_generator , 70.Nm EVP_PKEY_CTX_set_dh_paramgen_generator ,
@@ -83,23 +87,33 @@
83.Fa "const char *type" 87.Fa "const char *type"
84.Fa "const char *value" 88.Fa "const char *value"
85.Fc 89.Fc
86.In openssl/rsa.h
87.Ft int 90.Ft int
88.Fo EVP_PKEY_CTX_set_signature_md 91.Fo EVP_PKEY_CTX_set_signature_md
89.Fa "EVP_PKEY_CTX *ctx" 92.Fa "EVP_PKEY_CTX *ctx"
90.Fa "const EVP_MD *md" 93.Fa "const EVP_MD *md"
91.Fc 94.Fc
95.In openssl/rsa.h
92.Ft int 96.Ft int
93.Fo EVP_PKEY_CTX_set_rsa_padding 97.Fo EVP_PKEY_CTX_set_rsa_padding
94.Fa "EVP_PKEY_CTX *ctx" 98.Fa "EVP_PKEY_CTX *ctx"
95.Fa "int pad" 99.Fa "int pad"
96.Fc 100.Fc
97.Ft int 101.Ft int
102.Fo EVP_PKEY_CTX_get_rsa_padding
103.Fa "EVP_PKEY_CTX *ctx"
104.Fa "int *ppad"
105.Fc
106.Ft int
98.Fo EVP_PKEY_CTX_set_rsa_pss_saltlen 107.Fo EVP_PKEY_CTX_set_rsa_pss_saltlen
99.Fa "EVP_PKEY_CTX *ctx" 108.Fa "EVP_PKEY_CTX *ctx"
100.Fa "int len" 109.Fa "int len"
101.Fc 110.Fc
102.Ft int 111.Ft int
112.Fo EVP_PKEY_CTX_get_rsa_pss_saltlen
113.Fa "EVP_PKEY_CTX *ctx"
114.Fa "int *plen"
115.Fc
116.Ft int
103.Fo EVP_PKEY_CTX_set_rsa_keygen_bits 117.Fo EVP_PKEY_CTX_set_rsa_keygen_bits
104.Fa "EVP_PKEY_CTX *ctx" 118.Fa "EVP_PKEY_CTX *ctx"
105.Fa "int mbits" 119.Fa "int mbits"
@@ -109,6 +123,16 @@
109.Fa "EVP_PKEY_CTX *ctx" 123.Fa "EVP_PKEY_CTX *ctx"
110.Fa "BIGNUM *pubexp" 124.Fa "BIGNUM *pubexp"
111.Fc 125.Fc
126.Ft int
127.Fo EVP_PKEY_CTX_set_rsa_mgf1_md
128.Fa "EVP_PKEY_CTX *ctx"
129.Fa "const EVP_MD *md"
130.Fc
131.Ft int
132.Fo EVP_PKEY_CTX_get_rsa_mgf1_md
133.Fa "EVP_PKEY_CTX *ctx"
134.Fa "const EVP_MD **pmd"
135.Fc
112.In openssl/dsa.h 136.In openssl/dsa.h
113.Ft int 137.Ft int
114.Fo EVP_PKEY_CTX_set_dsa_paramgen_bits 138.Fo EVP_PKEY_CTX_set_dsa_paramgen_bits
@@ -179,12 +203,11 @@ All the remaining "functions" are implemented as macros.
179The 203The
180.Fn EVP_PKEY_CTX_set_signature_md 204.Fn EVP_PKEY_CTX_set_signature_md
181macro sets the message digest type used in a signature. 205macro sets the message digest type used in a signature.
182It can be used with any public key algorithm supporting signature 206It can be used with the RSA, DSA, and ECDSA algorithms.
183operations. 207.Ss RSA parameters
184.Pp 208The
185The macro
186.Fn EVP_PKEY_CTX_set_rsa_padding 209.Fn EVP_PKEY_CTX_set_rsa_padding
187sets the RSA padding mode for 210macro sets the RSA padding mode for
188.Fa ctx . 211.Fa ctx .
189The 212The
190.Fa pad 213.Fa pad
@@ -216,6 +239,11 @@ If it is not called then the first byte of the plaintext buffer is
216expected to be the algorithm identifier byte. 239expected to be the algorithm identifier byte.
217.Pp 240.Pp
218The 241The
242.Fn EVP_PKEY_CTX_get_rsa_padding
243macro retrieves the RSA padding mode for
244.Fa ctx .
245.Pp
246The
219.Fn EVP_PKEY_CTX_set_rsa_pss_saltlen 247.Fn EVP_PKEY_CTX_set_rsa_pss_saltlen
220macro sets the RSA PSS salt length to 248macro sets the RSA PSS salt length to
221.Fa len . 249.Fa len .
@@ -229,6 +257,13 @@ If this macro is not called a salt length value of -2 is used by
229default. 257default.
230.Pp 258.Pp
231The 259The
260.Fn EVP_PKEY_CTX_get_rsa_pss_saltlen
261macro retrieves the RSA PSS salt length for
262.Fa ctx .
263The padding mode must have been set to
264.Dv RSA_PKCS1_PSS_PADDING .
265.Pp
266The
232.Fn EVP_PKEY_CTX_set_rsa_keygen_bits 267.Fn EVP_PKEY_CTX_set_rsa_keygen_bits
233macro sets the RSA key length for RSA key generation to 268macro sets the RSA key length for RSA key generation to
234.Fa mbits . 269.Fa mbits .
@@ -245,17 +280,38 @@ pointer is used internally by this function, so it should not be modified
245or freed after the call. 280or freed after the call.
246If this macro is not called, then 65537 is used. 281If this macro is not called, then 65537 is used.
247.Pp 282.Pp
283The
284.Fn EVP_PKEY_CTX_set_rsa_mgf1_md
285macro sets the MGF1 digest for RSA padding schemes to
286.Fa md .
287Unless explicitly specified, the signing digest is used.
288The padding mode must have been set to
289.Dv RSA_PKCS1_OAEP_PADDING
290or
291.Dv RSA_PKCS1_PSS_PADDING .
292.Pp
293The
294.Fn EVP_PKEY_CTX_get_rsa_mgf1_md
295macro retrieves the MGF1 digest for
296.Fa ctx .
297Unless explicitly specified, the signing digest is used.
298The padding mode must have been set to
299.Dv RSA_PKCS1_OAEP_PADDING
300or
301.Dv RSA_PKCS1_PSS_PADDING .
302.Ss DSA parameters
248The macro 303The macro
249.Fn EVP_PKEY_CTX_set_dsa_paramgen_bits 304.Fn EVP_PKEY_CTX_set_dsa_paramgen_bits
250sets the number of bits used for DSA parameter generation to 305sets the number of bits used for DSA parameter generation to
251.Fa nbits . 306.Fa nbits .
252If not specified, 1024 is used. 307If not specified, 1024 is used.
253.Pp 308.Ss DH parameters
254The macro 309The macro
255.Fn EVP_PKEY_CTX_set_dh_paramgen_prime_len 310.Fn EVP_PKEY_CTX_set_dh_paramgen_prime_len
256sets the length of the DH prime parameter 311sets the length of the DH prime parameter
257.Fa len 312.Fa len
258for DH parameter generation. 313for DH parameter generation.
314It only accepts lengths greater than or equal to 256.
259If this macro is not called, then 1024 is used. 315If this macro is not called, then 1024 is used.
260.Pp 316.Pp
261The 317The
@@ -264,7 +320,7 @@ macro sets DH generator to
264.Fa gen 320.Fa gen
265for DH parameter generation. 321for DH parameter generation.
266If not specified, 2 is used. 322If not specified, 2 is used.
267.Pp 323.Ss EC parameters
268The 324The
269.Fn EVP_PKEY_CTX_set_ec_paramgen_curve_nid 325.Fn EVP_PKEY_CTX_set_ec_paramgen_curve_nid
270sets the EC curve for EC parameter generation to 326sets the EC curve for EC parameter generation to