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