EVP_SIGNATURE-RSA.pod 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. =pod
  2. =head1 NAME
  3. EVP_SIGNATURE-RSA
  4. - The EVP_PKEY RSA signature implementation
  5. =head1 DESCRIPTION
  6. Support for computing RSA signatures.
  7. See L<EVP_PKEY-RSA(7)> for information related to RSA keys.
  8. =head2 Signature Parameters
  9. The following signature parameters can be set using EVP_PKEY_CTX_set_params().
  10. This may be called after EVP_PKEY_sign_init() or EVP_PKEY_verify_init(),
  11. and before calling EVP_PKEY_sign() or EVP_PKEY_verify().
  12. =over 4
  13. =item "digest" (B<OSSL_SIGNATURE_PARAM_DIGEST>) <UTF8 string>
  14. =item "properties" (B<OSSL_SIGNATURE_PARAM_PROPERTIES>) <UTF8 string>
  15. These common parameters are described in L<provider-signature(7)>.
  16. =item "pad-mode" (B<OSSL_SIGNATURE_PARAM_PAD_MODE>) <UTF8 string>
  17. The type of padding to be used. Its value can be one of the following:
  18. =over 4
  19. =item "none" (B<OSSL_PKEY_RSA_PAD_MODE_NONE>)
  20. =item "pkcs1" (B<OSSL_PKEY_RSA_PAD_MODE_PKCSV15>)
  21. =item "x931" (B<OSSL_PKEY_RSA_PAD_MODE_X931>)
  22. =item "pss" (B<OSSL_PKEY_RSA_PAD_MODE_PSS>)
  23. =back
  24. =item "mgf1-digest" (B<OSSL_SIGNATURE_PARAM_MGF1_DIGEST>) <UTF8 string>
  25. The digest algorithm name to use for the maskGenAlgorithm used by "pss" mode.
  26. =item "mgf1-properties" (B<OSSL_SIGNATURE_PARAM_MGF1_PROPERTIES>) <UTF8 string>
  27. Sets the name of the property query associated with the "mgf1-digest" algorithm.
  28. NULL is used if this optional value is not set.
  29. =item "saltlen" (B<OSSL_SIGNATURE_PARAM_PSS_SALTLEN>) <integer> or <UTF8 string>
  30. The "pss" mode minimum salt length. The value can either be an integer,
  31. a string value representing a number or one of the following string values:
  32. =over 4
  33. =item "digest" (B<OSSL_PKEY_RSA_PSS_SALT_LEN_DIGEST>)
  34. Use the same length as the digest size.
  35. =item "max" (B<OSSL_PKEY_RSA_PSS_SALT_LEN_MAX>)
  36. Use the maximum salt length.
  37. =item "auto" (B<OSSL_PKEY_RSA_PSS_SALT_LEN_AUTO>)
  38. Auto detect the salt length.
  39. =item "auto-digestmax" (B<OSSL_PKEY_RSA_PSS_SALT_LEN_AUTO_DIGEST_MAX>)
  40. Auto detect the salt length when verifying. Maximize the salt length up to the
  41. digest size when signing to comply with FIPS 186-4 section 5.5.
  42. =back
  43. =back
  44. The following signature parameters can be retrieved using
  45. EVP_PKEY_CTX_get_params().
  46. =over 4
  47. =item "algorithm-id" (B<OSSL_SIGNATURE_PARAM_ALGORITHM_ID>) <octet string>
  48. This common parameter is described in L<provider-signature(7)>.
  49. =item "digest" (B<OSSL_SIGNATURE_PARAM_DIGEST>) <UTF8 string>
  50. =item "pad-mode" (B<OSSL_SIGNATURE_PARAM_PAD_MODE>) <UTF8 string>
  51. =item "mgf1-digest" (B<OSSL_SIGNATURE_PARAM_MGF1_DIGEST>) <UTF8 string>
  52. =item "saltlen" (B<OSSL_SIGNATURE_PARAM_PSS_SALTLEN>) <integer> or <UTF8 string>
  53. These parameters are as described above.
  54. =back
  55. =head1 SEE ALSO
  56. L<EVP_PKEY_CTX_set_params(3)>,
  57. L<EVP_PKEY_sign(3)>,
  58. L<EVP_PKEY_verify(3)>,
  59. L<provider-signature(7)>,
  60. =head1 COPYRIGHT
  61. Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
  62. Licensed under the Apache License 2.0 (the "License"). You may not use
  63. this file except in compliance with the License. You can obtain a copy
  64. in the file LICENSE in the source distribution or at
  65. L<https://www.openssl.org/source/license.html>.
  66. =cut