0
0
mirror of https://github.com/openssl/openssl.git synced 2024-12-19 06:53:49 +08:00

Documentation clarification and fixes.

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2177)
This commit is contained in:
Dr. Stephen Henson 2017-01-06 22:49:01 +00:00
parent f291138bbe
commit 76951372af

View File

@ -31,9 +31,9 @@ but with some restrictions described below.
=head1 SIGNING AND VERIFICATION =head1 SIGNING AND VERIFICATION
Siging and verification is similar to the B<RSA> algorithm except the Siging and verification is similar to the B<RSA> algorithm except the
padding mode is always PSS. If the key used restricts parameters then padding mode is always PSS. If the key in use has parameter restrictions then
the corresponding signature parameters are set to the restrictions: the corresponding signature parameters are set to the restrictions:
for example if the key can only be used with digest SHA256, MGF1 SHA256 for example, if the key can only be used with digest SHA256, MGF1 SHA256
and minimum salt length 32 then the digest, MGF1 digest and salt length and minimum salt length 32 then the digest, MGF1 digest and salt length
will be set to SHA256, SHA256 and 32 respectively. will be set to SHA256, SHA256 and 32 respectively.
@ -42,13 +42,13 @@ returned if an attempt is made to set the padding mode to anything other
than B<PSS>. It is otherwise similar to the B<RSA> version. than B<PSS>. It is otherwise similar to the B<RSA> version.
The EVP_PKEY_CTX_set_rsa_pss_saltlen() macro is used to set the salt length. The EVP_PKEY_CTX_set_rsa_pss_saltlen() macro is used to set the salt length.
If the key is restricted then an error is returned if an attempt is made If the key has usage restrictionsthen an error is returned if an attempt is
to set the salt below the minimum value. It is otherwise similar to the made to set the salt length below the minimum value. It is otherwise similar
B<RSA> operation except special negative values are not supported. to the B<RSA> operation except special negative values are not supported.
The EVP_PKEY_CTX_set_signature_md() and EVP_PKEY_CTX_set_rsa_mgf1_md() macros The EVP_PKEY_CTX_set_signature_md() and EVP_PKEY_CTX_set_rsa_mgf1_md() macros
are used to set the digest and MGF1 algorithms respectively. If the key is are used to set the digest and MGF1 algorithms respectively. If the key has
restricted then an error is returned if an attempt is made to set the usage restrictions then an error is returned if an attempt is made to set the
digest to anything other than the restricted value. Otherwise these are digest to anything other than the restricted value. Otherwise these are
similar to the B<RSA> versions. similar to the B<RSA> versions.
@ -58,13 +58,13 @@ As with RSA key generation the EVP_PKEY_CTX_set_rsa_rsa_keygen_bits()
and EVP_PKEY_CTX_set_rsa_keygen_pubexp() macros are supported for RSA PSS: and EVP_PKEY_CTX_set_rsa_keygen_pubexp() macros are supported for RSA PSS:
they have exactly the same meaning as for the RSA algorithm. they have exactly the same meaning as for the RSA algorithm.
Optional parameter restrictions can be specified when generating a PSS key Optional parameter restrictions can be specified when generating a PSS key. By
by default no parameter restrictions are placed on a generate key. If any default no parameter restrictions are placed on the generated key. If any
restrictions are set (using the macros described below) then B<all> restrictions are set (using the macros described below) then B<all> parameters
parameters are restricted: e.g. setting a minimum salt length also restricts are restricted. For example, setting a minimum salt length also restricts the
the digest and MGF1 algorithms. If any restrictions are in place then digest and MGF1 algorithms. If any restrictions are in place then they are
they are reflected in the corresponding parameters of the public key reflected in the corresponding parameters of the public key when (for example)
when (for example) a certificate request is signed. a certificate request is signed.
EVP_PKEY_CTX_set_rsa_pss_keygen_md() restricts the digest algorithm the EVP_PKEY_CTX_set_rsa_pss_keygen_md() restricts the digest algorithm the
generated key can use to B<md>. generated key can use to B<md>.
@ -89,7 +89,7 @@ L<EVP_PKEY_derive(3)>
=head1 COPYRIGHT =head1 COPYRIGHT
Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the OpenSSL license (the "License"). You may not use Licensed under the OpenSSL license (the "License"). You may not use
this file except in compliance with the License. You can obtain a copy this file except in compliance with the License. You can obtain a copy