diff options
Diffstat (limited to 'src/lib/libcrypto')
| -rw-r--r-- | src/lib/libcrypto/man/RSA_pkey_ctx_ctrl.3 | 95 |
1 files changed, 45 insertions, 50 deletions
diff --git a/src/lib/libcrypto/man/RSA_pkey_ctx_ctrl.3 b/src/lib/libcrypto/man/RSA_pkey_ctx_ctrl.3 index 866c63ad81..dea7fe754e 100644 --- a/src/lib/libcrypto/man/RSA_pkey_ctx_ctrl.3 +++ b/src/lib/libcrypto/man/RSA_pkey_ctx_ctrl.3 | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | .\" $OpenBSD: RSA_pkey_ctx_ctrl.3,v 1.1 2019/11/01 12:02:58 schwarze Exp $ | 1 | .\" $OpenBSD: RSA_pkey_ctx_ctrl.3,v 1.2 2019/11/01 12:45:36 schwarze Exp $ |
| 2 | .\" full merge up to: | 2 | .\" full merge up to: |
| 3 | .\" OpenSSL man3/EVP_PKEY_CTX_ctrl 99d63d46 Oct 26 13:56:48 2016 -0400 | 3 | .\" OpenSSL man3/EVP_PKEY_CTX_ctrl.pod 99d63d46 Oct 26 13:56:48 2016 -0400 |
| 4 | .\" selective merge up to: | 4 | .\" selective merge up to: |
| 5 | .\" OpenSSL man3/EVP_PKEY_CTX_ctrl df75c2b f Dec 9 01:02:36 2018 +0100 | 5 | .\" OpenSSL man3/EVP_PKEY_CTX_ctrl.pod df75c2b f Dec 9 01:02:36 2018 +0100 |
| 6 | .\" | 6 | .\" |
| 7 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org> | 7 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org> |
| 8 | .\" and Antoine Salon <asalon@vmware.com>. | 8 | .\" and Antoine Salon <asalon@vmware.com>. |
| @@ -60,8 +60,6 @@ | |||
| 60 | .Nm RSA_pkey_ctx_ctrl , | 60 | .Nm RSA_pkey_ctx_ctrl , |
| 61 | .Nm EVP_PKEY_CTX_set_rsa_padding , | 61 | .Nm EVP_PKEY_CTX_set_rsa_padding , |
| 62 | .Nm EVP_PKEY_CTX_get_rsa_padding , | 62 | .Nm EVP_PKEY_CTX_get_rsa_padding , |
| 63 | .Nm EVP_PKEY_CTX_set_rsa_pss_saltlen , | ||
| 64 | .Nm EVP_PKEY_CTX_get_rsa_pss_saltlen , | ||
| 65 | .Nm EVP_PKEY_CTX_set_rsa_keygen_bits , | 63 | .Nm EVP_PKEY_CTX_set_rsa_keygen_bits , |
| 66 | .Nm EVP_PKEY_CTX_set_rsa_keygen_pubexp , | 64 | .Nm EVP_PKEY_CTX_set_rsa_keygen_pubexp , |
| 67 | .Nm EVP_PKEY_CTX_set_rsa_mgf1_md , | 65 | .Nm EVP_PKEY_CTX_set_rsa_mgf1_md , |
| @@ -69,7 +67,9 @@ | |||
| 69 | .Nm EVP_PKEY_CTX_set_rsa_oaep_md , | 67 | .Nm EVP_PKEY_CTX_set_rsa_oaep_md , |
| 70 | .Nm EVP_PKEY_CTX_get_rsa_oaep_md , | 68 | .Nm EVP_PKEY_CTX_get_rsa_oaep_md , |
| 71 | .Nm EVP_PKEY_CTX_set0_rsa_oaep_label , | 69 | .Nm EVP_PKEY_CTX_set0_rsa_oaep_label , |
| 72 | .Nm EVP_PKEY_CTX_get0_rsa_oaep_label | 70 | .Nm EVP_PKEY_CTX_get0_rsa_oaep_label , |
| 71 | .Nm EVP_PKEY_CTX_set_rsa_pss_saltlen , | ||
| 72 | .Nm EVP_PKEY_CTX_get_rsa_pss_saltlen | ||
| 73 | .Nd RSA private key control operations | 73 | .Nd RSA private key control operations |
| 74 | .Sh SYNOPSIS | 74 | .Sh SYNOPSIS |
| 75 | .In openssl/rsa.h | 75 | .In openssl/rsa.h |
| @@ -92,16 +92,6 @@ | |||
| 92 | .Fa "int *ppad" | 92 | .Fa "int *ppad" |
| 93 | .Fc | 93 | .Fc |
| 94 | .Ft int | 94 | .Ft int |
| 95 | .Fo EVP_PKEY_CTX_set_rsa_pss_saltlen | ||
| 96 | .Fa "EVP_PKEY_CTX *ctx" | ||
| 97 | .Fa "int len" | ||
| 98 | .Fc | ||
| 99 | .Ft int | ||
| 100 | .Fo EVP_PKEY_CTX_get_rsa_pss_saltlen | ||
| 101 | .Fa "EVP_PKEY_CTX *ctx" | ||
| 102 | .Fa "int *plen" | ||
| 103 | .Fc | ||
| 104 | .Ft int | ||
| 105 | .Fo EVP_PKEY_CTX_set_rsa_keygen_bits | 95 | .Fo EVP_PKEY_CTX_set_rsa_keygen_bits |
| 106 | .Fa "EVP_PKEY_CTX *ctx" | 96 | .Fa "EVP_PKEY_CTX *ctx" |
| 107 | .Fa "int mbits" | 97 | .Fa "int mbits" |
| @@ -142,6 +132,16 @@ | |||
| 142 | .Fa "EVP_PKEY_CTX *ctx" | 132 | .Fa "EVP_PKEY_CTX *ctx" |
| 143 | .Fa "unsigned char **plabel" | 133 | .Fa "unsigned char **plabel" |
| 144 | .Fc | 134 | .Fc |
| 135 | .Ft int | ||
| 136 | .Fo EVP_PKEY_CTX_set_rsa_pss_saltlen | ||
| 137 | .Fa "EVP_PKEY_CTX *ctx" | ||
| 138 | .Fa "int len" | ||
| 139 | .Fc | ||
| 140 | .Ft int | ||
| 141 | .Fo EVP_PKEY_CTX_get_rsa_pss_saltlen | ||
| 142 | .Fa "EVP_PKEY_CTX *ctx" | ||
| 143 | .Fa "int *plen" | ||
| 144 | .Fc | ||
| 145 | .Sh DESCRIPTION | 145 | .Sh DESCRIPTION |
| 146 | The function | 146 | The function |
| 147 | .Fn RSA_pkey_ctx_ctrl | 147 | .Fn RSA_pkey_ctx_ctrl |
| @@ -175,7 +175,7 @@ for X9.31 padding (signature operations only) and | |||
| 175 | (sign and verify only). | 175 | (sign and verify only). |
| 176 | .Pp | 176 | .Pp |
| 177 | Two RSA padding modes behave differently if | 177 | Two RSA padding modes behave differently if |
| 178 | .Fn EVP_PKEY_CTX_set_signature_md | 178 | .Xr EVP_PKEY_CTX_set_signature_md 3 |
| 179 | is used. | 179 | is used. |
| 180 | If this macro is called for PKCS#1 padding, the plaintext buffer is an | 180 | If this macro is called for PKCS#1 padding, the plaintext buffer is an |
| 181 | actual digest value and is encapsulated in a | 181 | actual digest value and is encapsulated in a |
| @@ -195,26 +195,6 @@ macro retrieves the RSA padding mode for | |||
| 195 | .Fa ctx . | 195 | .Fa ctx . |
| 196 | .Pp | 196 | .Pp |
| 197 | The | 197 | The |
| 198 | .Fn EVP_PKEY_CTX_set_rsa_pss_saltlen | ||
| 199 | macro sets the RSA PSS salt length to | ||
| 200 | .Fa len . | ||
| 201 | As its name implies, it is only supported for PSS padding. | ||
| 202 | Two special values are supported: -1 sets the salt length to the digest | ||
| 203 | length. | ||
| 204 | When signing -2 sets the salt length to the maximum permissible value. | ||
| 205 | When verifying -2 causes the salt length to be automatically determined | ||
| 206 | based on the PSS block structure. | ||
| 207 | If this macro is not called a salt length value of -2 is used by | ||
| 208 | default. | ||
| 209 | .Pp | ||
| 210 | The | ||
| 211 | .Fn EVP_PKEY_CTX_get_rsa_pss_saltlen | ||
| 212 | macro retrieves the RSA PSS salt length for | ||
| 213 | .Fa ctx . | ||
| 214 | The padding mode must have been set to | ||
| 215 | .Dv RSA_PKCS1_PSS_PADDING . | ||
| 216 | .Pp | ||
| 217 | The | ||
| 218 | .Fn EVP_PKEY_CTX_set_rsa_keygen_bits | 198 | .Fn EVP_PKEY_CTX_set_rsa_keygen_bits |
| 219 | macro sets the RSA key length for RSA key generation to | 199 | macro sets the RSA key length for RSA key generation to |
| 220 | .Fa mbits . | 200 | .Fa mbits . |
| @@ -251,20 +231,19 @@ The padding mode must have been set to | |||
| 251 | .Dv RSA_PKCS1_OAEP_PADDING | 231 | .Dv RSA_PKCS1_OAEP_PADDING |
| 252 | or | 232 | or |
| 253 | .Dv RSA_PKCS1_PSS_PADDING . | 233 | .Dv RSA_PKCS1_PSS_PADDING . |
| 234 | .Ss Optimal asymmetric encryption padding | ||
| 235 | The following macros require that the padding mode was set to | ||
| 236 | .Dv RSA_PKCS1_OAEP_PADDING . | ||
| 254 | .Pp | 237 | .Pp |
| 255 | The | 238 | The |
| 256 | .Fn EVP_PKEY_CTX_set_rsa_oaep_md | 239 | .Fn EVP_PKEY_CTX_set_rsa_oaep_md |
| 257 | macro sets the message digest type used in RSA OAEP to | 240 | macro sets the message digest type used in RSA OAEP to |
| 258 | .Fa md . | 241 | .Fa md . |
| 259 | The padding mode must have been set to | ||
| 260 | .Dv RSA_PKCS1_OAEP_PADDING . | ||
| 261 | .Pp | 242 | .Pp |
| 262 | The | 243 | The |
| 263 | .Fn EVP_PKEY_CTX_get_rsa_oaep_md | 244 | .Fn EVP_PKEY_CTX_get_rsa_oaep_md |
| 264 | macro gets the message digest type used in RSA OAEP to | 245 | macro gets the message digest type used in RSA OAEP to |
| 265 | .Pf * Fa md . | 246 | .Pf * Fa pmd . |
| 266 | The padding mode must have been set to | ||
| 267 | .Dv RSA_PKCS1_OAEP_PADDING . | ||
| 268 | .Pp | 247 | .Pp |
| 269 | The | 248 | The |
| 270 | .Fn EVP_PKEY_CTX_set0_rsa_oaep_label | 249 | .Fn EVP_PKEY_CTX_set0_rsa_oaep_label |
| @@ -282,18 +261,34 @@ is 0, the label is cleared. | |||
| 282 | The library takes ownership of the label so the caller should not | 261 | The library takes ownership of the label so the caller should not |
| 283 | free the original memory pointed to by | 262 | free the original memory pointed to by |
| 284 | .Fa label . | 263 | .Fa label . |
| 285 | The padding mode must have been set to | ||
| 286 | .Dv RSA_PKCS1_OAEP_PADDING . | ||
| 287 | .Pp | 264 | .Pp |
| 288 | The | 265 | The |
| 289 | .Fn EVP_PKEY_CTX_get0_rsa_oaep_label | 266 | .Fn EVP_PKEY_CTX_get0_rsa_oaep_label |
| 290 | macro gets the RSA OAEP label to | 267 | macro gets the RSA OAEP label to |
| 291 | .Pf * Fa plabel . | 268 | .Pf * Fa plabel . |
| 292 | The return value is the label length. | 269 | The return value is the label length. |
| 293 | The padding mode must have been set to | ||
| 294 | .Dv RSA_PKCS1_OAEP_PADDING . | ||
| 295 | The resulting pointer is owned by the library and should not be | 270 | The resulting pointer is owned by the library and should not be |
| 296 | freed by the caller. | 271 | freed by the caller. |
| 272 | .Ss Probabilistic signature scheme | ||
| 273 | The following macros require that the padding mode was set to | ||
| 274 | .Dv RSA_PKCS1_PSS_PADDING . | ||
| 275 | .Pp | ||
| 276 | The | ||
| 277 | .Fn EVP_PKEY_CTX_set_rsa_pss_saltlen | ||
| 278 | macro sets the RSA PSS salt length to | ||
| 279 | .Fa len . | ||
| 280 | Two special values are supported: -1 sets the salt length to the digest | ||
| 281 | length. | ||
| 282 | When signing -2 sets the salt length to the maximum permissible value. | ||
| 283 | When verifying -2 causes the salt length to be automatically determined | ||
| 284 | based on the PSS block structure. | ||
| 285 | If this macro is not called a salt length value of -2 is used by | ||
| 286 | default. | ||
| 287 | .Pp | ||
| 288 | The | ||
| 289 | .Fn EVP_PKEY_CTX_get_rsa_pss_saltlen | ||
| 290 | macro retrieves the RSA PSS salt length for | ||
| 291 | .Fa ctx . | ||
| 297 | .Sh RETURN VALUES | 292 | .Sh RETURN VALUES |
| 298 | These functions return a positive value for success or 0 or a negative | 293 | These functions return a positive value for success or 0 or a negative |
| 299 | value for failure. | 294 | value for failure. |
| @@ -315,19 +310,19 @@ supported by the public key algorithm. | |||
| 315 | .Sh HISTORY | 310 | .Sh HISTORY |
| 316 | The functions | 311 | The functions |
| 317 | .Fn EVP_PKEY_CTX_set_rsa_padding , | 312 | .Fn EVP_PKEY_CTX_set_rsa_padding , |
| 318 | .Fn EVP_PKEY_CTX_set_rsa_pss_saltlen , | ||
| 319 | .Fn EVP_PKEY_CTX_set_rsa_keygen_bits , | 313 | .Fn EVP_PKEY_CTX_set_rsa_keygen_bits , |
| 314 | .Fn EVP_PKEY_CTX_set_rsa_keygen_pubexp , | ||
| 320 | and | 315 | and |
| 321 | .Fn EVP_PKEY_CTX_set_rsa_keygen_pubexp | 316 | .Fn EVP_PKEY_CTX_set_rsa_pss_saltlen |
| 322 | first appeared in OpenSSL 1.0.0 and have been available since | 317 | first appeared in OpenSSL 1.0.0 and have been available since |
| 323 | .Ox 4.9 . | 318 | .Ox 4.9 . |
| 324 | .Pp | 319 | .Pp |
| 325 | The functions | 320 | The functions |
| 326 | .Fn EVP_PKEY_CTX_get_rsa_padding , | 321 | .Fn EVP_PKEY_CTX_get_rsa_padding , |
| 327 | .Fn EVP_PKEY_CTX_get_rsa_pss_saltlen , | ||
| 328 | .Fn EVP_PKEY_CTX_set_rsa_mgf1_md , | 322 | .Fn EVP_PKEY_CTX_set_rsa_mgf1_md , |
| 323 | .Fn EVP_PKEY_CTX_get_rsa_mgf1_md , | ||
| 329 | and | 324 | and |
| 330 | .Fn EVP_PKEY_CTX_get_rsa_mgf1_md | 325 | .Fn EVP_PKEY_CTX_get_rsa_pss_saltlen |
| 331 | first appeared in OpenSSL 1.0.1 and have been available since | 326 | first appeared in OpenSSL 1.0.1 and have been available since |
| 332 | .Ox 5.3 . | 327 | .Ox 5.3 . |
| 333 | .Pp | 328 | .Pp |
