2 * Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the OpenSSL license (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
11 #include "internal/cryptlib.h"
12 #include <openssl/asn1t.h>
13 #include <openssl/x509.h>
14 #include <openssl/rsa.h>
15 #include <openssl/bn.h>
16 #include <openssl/evp.h>
17 #include <openssl/x509v3.h>
18 #include <openssl/cms.h>
19 #include "internal/evp_int.h"
22 /* RSA pkey context structure */
25 /* Key gen parameters */
29 /* Keygen callback info */
31 /* RSA padding mode */
35 /* message digest for MGF1 */
39 /* Minimum salt length or -1 if no PSS parameter restriction */
44 unsigned char *oaep_label;
48 /* True if PSS parameters are restricted */
49 #define rsa_pss_restricted(rctx) (rctx->min_saltlen != -1)
51 static int pkey_rsa_init(EVP_PKEY_CTX *ctx)
53 RSA_PKEY_CTX *rctx = OPENSSL_zalloc(sizeof(*rctx));
58 rctx->primes = RSA_DEFAULT_PRIME_NUM;
59 if (pkey_ctx_is_pss(ctx))
60 rctx->pad_mode = RSA_PKCS1_PSS_PADDING;
62 rctx->pad_mode = RSA_PKCS1_PADDING;
63 /* Maximum for sign, auto for verify */
64 rctx->saltlen = RSA_PSS_SALTLEN_AUTO;
65 rctx->min_saltlen = -1;
67 ctx->keygen_info = rctx->gentmp;
68 ctx->keygen_info_count = 2;
73 static int pkey_rsa_copy(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src)
75 RSA_PKEY_CTX *dctx, *sctx;
77 if (!pkey_rsa_init(dst))
81 dctx->nbits = sctx->nbits;
83 dctx->pub_exp = BN_dup(sctx->pub_exp);
87 dctx->pad_mode = sctx->pad_mode;
89 dctx->mgf1md = sctx->mgf1md;
90 if (sctx->oaep_label) {
91 OPENSSL_free(dctx->oaep_label);
92 dctx->oaep_label = OPENSSL_memdup(sctx->oaep_label, sctx->oaep_labellen);
93 if (!dctx->oaep_label)
95 dctx->oaep_labellen = sctx->oaep_labellen;
100 static int setup_tbuf(RSA_PKEY_CTX *ctx, EVP_PKEY_CTX *pk)
102 if (ctx->tbuf != NULL)
104 if ((ctx->tbuf = OPENSSL_malloc(EVP_PKEY_size(pk->pkey))) == NULL) {
105 RSAerr(RSA_F_SETUP_TBUF, ERR_R_MALLOC_FAILURE);
111 static void pkey_rsa_cleanup(EVP_PKEY_CTX *ctx)
113 RSA_PKEY_CTX *rctx = ctx->data;
115 BN_free(rctx->pub_exp);
116 OPENSSL_free(rctx->tbuf);
117 OPENSSL_free(rctx->oaep_label);
122 static int pkey_rsa_sign(EVP_PKEY_CTX *ctx, unsigned char *sig,
123 size_t *siglen, const unsigned char *tbs,
127 RSA_PKEY_CTX *rctx = ctx->data;
128 RSA *rsa = ctx->pkey->pkey.rsa;
131 if (tbslen != (size_t)EVP_MD_size(rctx->md)) {
132 RSAerr(RSA_F_PKEY_RSA_SIGN, RSA_R_INVALID_DIGEST_LENGTH);
136 if (EVP_MD_type(rctx->md) == NID_mdc2) {
138 if (rctx->pad_mode != RSA_PKCS1_PADDING)
140 ret = RSA_sign_ASN1_OCTET_STRING(0,
141 tbs, tbslen, sig, &sltmp, rsa);
146 } else if (rctx->pad_mode == RSA_X931_PADDING) {
147 if ((size_t)EVP_PKEY_size(ctx->pkey) < tbslen + 1) {
148 RSAerr(RSA_F_PKEY_RSA_SIGN, RSA_R_KEY_SIZE_TOO_SMALL);
151 if (!setup_tbuf(rctx, ctx)) {
152 RSAerr(RSA_F_PKEY_RSA_SIGN, ERR_R_MALLOC_FAILURE);
155 memcpy(rctx->tbuf, tbs, tbslen);
156 rctx->tbuf[tbslen] = RSA_X931_hash_id(EVP_MD_type(rctx->md));
157 ret = RSA_private_encrypt(tbslen + 1, rctx->tbuf,
158 sig, rsa, RSA_X931_PADDING);
159 } else if (rctx->pad_mode == RSA_PKCS1_PADDING) {
161 ret = RSA_sign(EVP_MD_type(rctx->md),
162 tbs, tbslen, sig, &sltmp, rsa);
166 } else if (rctx->pad_mode == RSA_PKCS1_PSS_PADDING) {
167 if (!setup_tbuf(rctx, ctx))
169 if (!RSA_padding_add_PKCS1_PSS_mgf1(rsa,
171 rctx->md, rctx->mgf1md,
174 ret = RSA_private_encrypt(RSA_size(rsa), rctx->tbuf,
175 sig, rsa, RSA_NO_PADDING);
180 ret = RSA_private_encrypt(tbslen, tbs, sig, ctx->pkey->pkey.rsa,
189 static int pkey_rsa_verifyrecover(EVP_PKEY_CTX *ctx,
190 unsigned char *rout, size_t *routlen,
191 const unsigned char *sig, size_t siglen)
194 RSA_PKEY_CTX *rctx = ctx->data;
197 if (rctx->pad_mode == RSA_X931_PADDING) {
198 if (!setup_tbuf(rctx, ctx))
200 ret = RSA_public_decrypt(siglen, sig,
201 rctx->tbuf, ctx->pkey->pkey.rsa,
206 if (rctx->tbuf[ret] != RSA_X931_hash_id(EVP_MD_type(rctx->md))) {
207 RSAerr(RSA_F_PKEY_RSA_VERIFYRECOVER,
208 RSA_R_ALGORITHM_MISMATCH);
211 if (ret != EVP_MD_size(rctx->md)) {
212 RSAerr(RSA_F_PKEY_RSA_VERIFYRECOVER,
213 RSA_R_INVALID_DIGEST_LENGTH);
217 memcpy(rout, rctx->tbuf, ret);
218 } else if (rctx->pad_mode == RSA_PKCS1_PADDING) {
220 ret = int_rsa_verify(EVP_MD_type(rctx->md),
221 NULL, 0, rout, &sltmp,
222 sig, siglen, ctx->pkey->pkey.rsa);
230 ret = RSA_public_decrypt(siglen, sig, rout, ctx->pkey->pkey.rsa,
239 static int pkey_rsa_verify(EVP_PKEY_CTX *ctx,
240 const unsigned char *sig, size_t siglen,
241 const unsigned char *tbs, size_t tbslen)
243 RSA_PKEY_CTX *rctx = ctx->data;
244 RSA *rsa = ctx->pkey->pkey.rsa;
248 if (rctx->pad_mode == RSA_PKCS1_PADDING)
249 return RSA_verify(EVP_MD_type(rctx->md), tbs, tbslen,
251 if (tbslen != (size_t)EVP_MD_size(rctx->md)) {
252 RSAerr(RSA_F_PKEY_RSA_VERIFY, RSA_R_INVALID_DIGEST_LENGTH);
255 if (rctx->pad_mode == RSA_X931_PADDING) {
256 if (pkey_rsa_verifyrecover(ctx, NULL, &rslen, sig, siglen) <= 0)
258 } else if (rctx->pad_mode == RSA_PKCS1_PSS_PADDING) {
260 if (!setup_tbuf(rctx, ctx))
262 ret = RSA_public_decrypt(siglen, sig, rctx->tbuf,
263 rsa, RSA_NO_PADDING);
266 ret = RSA_verify_PKCS1_PSS_mgf1(rsa, tbs,
267 rctx->md, rctx->mgf1md,
268 rctx->tbuf, rctx->saltlen);
276 if (!setup_tbuf(rctx, ctx))
278 rslen = RSA_public_decrypt(siglen, sig, rctx->tbuf,
279 rsa, rctx->pad_mode);
284 if ((rslen != tbslen) || memcmp(tbs, rctx->tbuf, rslen))
291 static int pkey_rsa_encrypt(EVP_PKEY_CTX *ctx,
292 unsigned char *out, size_t *outlen,
293 const unsigned char *in, size_t inlen)
296 RSA_PKEY_CTX *rctx = ctx->data;
298 if (rctx->pad_mode == RSA_PKCS1_OAEP_PADDING) {
299 int klen = RSA_size(ctx->pkey->pkey.rsa);
300 if (!setup_tbuf(rctx, ctx))
302 if (!RSA_padding_add_PKCS1_OAEP_mgf1(rctx->tbuf, klen,
306 rctx->md, rctx->mgf1md))
308 ret = RSA_public_encrypt(klen, rctx->tbuf, out,
309 ctx->pkey->pkey.rsa, RSA_NO_PADDING);
311 ret = RSA_public_encrypt(inlen, in, out, ctx->pkey->pkey.rsa,
320 static int pkey_rsa_decrypt(EVP_PKEY_CTX *ctx,
321 unsigned char *out, size_t *outlen,
322 const unsigned char *in, size_t inlen)
325 RSA_PKEY_CTX *rctx = ctx->data;
327 if (rctx->pad_mode == RSA_PKCS1_OAEP_PADDING) {
328 if (!setup_tbuf(rctx, ctx))
330 ret = RSA_private_decrypt(inlen, in, rctx->tbuf,
331 ctx->pkey->pkey.rsa, RSA_NO_PADDING);
334 ret = RSA_padding_check_PKCS1_OAEP_mgf1(out, ret, rctx->tbuf,
338 rctx->md, rctx->mgf1md);
340 ret = RSA_private_decrypt(inlen, in, out, ctx->pkey->pkey.rsa,
349 static int check_padding_md(const EVP_MD *md, int padding)
356 mdnid = EVP_MD_type(md);
358 if (padding == RSA_NO_PADDING) {
359 RSAerr(RSA_F_CHECK_PADDING_MD, RSA_R_INVALID_PADDING_MODE);
363 if (padding == RSA_X931_PADDING) {
364 if (RSA_X931_hash_id(mdnid) == -1) {
365 RSAerr(RSA_F_CHECK_PADDING_MD, RSA_R_INVALID_X931_DIGEST);
370 /* List of all supported RSA digests */
389 RSAerr(RSA_F_CHECK_PADDING_MD, RSA_R_INVALID_DIGEST);
398 static int pkey_rsa_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
400 RSA_PKEY_CTX *rctx = ctx->data;
403 case EVP_PKEY_CTRL_RSA_PADDING:
404 if ((p1 >= RSA_PKCS1_PADDING) && (p1 <= RSA_PKCS1_PSS_PADDING)) {
405 if (!check_padding_md(rctx->md, p1))
407 if (p1 == RSA_PKCS1_PSS_PADDING) {
408 if (!(ctx->operation &
409 (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_VERIFY)))
412 rctx->md = EVP_sha1();
413 } else if (pkey_ctx_is_pss(ctx)) {
416 if (p1 == RSA_PKCS1_OAEP_PADDING) {
417 if (!(ctx->operation & EVP_PKEY_OP_TYPE_CRYPT))
420 rctx->md = EVP_sha1();
426 RSAerr(RSA_F_PKEY_RSA_CTRL,
427 RSA_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE);
430 case EVP_PKEY_CTRL_GET_RSA_PADDING:
431 *(int *)p2 = rctx->pad_mode;
434 case EVP_PKEY_CTRL_RSA_PSS_SALTLEN:
435 case EVP_PKEY_CTRL_GET_RSA_PSS_SALTLEN:
436 if (rctx->pad_mode != RSA_PKCS1_PSS_PADDING) {
437 RSAerr(RSA_F_PKEY_RSA_CTRL, RSA_R_INVALID_PSS_SALTLEN);
440 if (type == EVP_PKEY_CTRL_GET_RSA_PSS_SALTLEN) {
441 *(int *)p2 = rctx->saltlen;
443 if (p1 < RSA_PSS_SALTLEN_MAX)
445 if (rsa_pss_restricted(rctx)) {
446 if (p1 == RSA_PSS_SALTLEN_AUTO
447 && ctx->operation == EVP_PKEY_OP_VERIFY) {
448 RSAerr(RSA_F_PKEY_RSA_CTRL, RSA_R_INVALID_PSS_SALTLEN);
451 if ((p1 == RSA_PSS_SALTLEN_DIGEST
452 && rctx->min_saltlen > EVP_MD_size(rctx->md))
453 || (p1 >= 0 && p1 < rctx->min_saltlen)) {
454 RSAerr(RSA_F_PKEY_RSA_CTRL, RSA_R_PSS_SALTLEN_TOO_SMALL);
462 case EVP_PKEY_CTRL_RSA_KEYGEN_BITS:
463 if (p1 < RSA_MIN_MODULUS_BITS) {
464 RSAerr(RSA_F_PKEY_RSA_CTRL, RSA_R_KEY_SIZE_TOO_SMALL);
470 case EVP_PKEY_CTRL_RSA_KEYGEN_PUBEXP:
471 if (p2 == NULL || !BN_is_odd((BIGNUM *)p2) || BN_is_one((BIGNUM *)p2)) {
472 RSAerr(RSA_F_PKEY_RSA_CTRL, RSA_R_BAD_E_VALUE);
475 BN_free(rctx->pub_exp);
479 case EVP_PKEY_CTRL_RSA_KEYGEN_PRIMES:
480 if (p1 < RSA_DEFAULT_PRIME_NUM || p1 > RSA_MAX_PRIME_NUM) {
481 RSAerr(RSA_F_PKEY_RSA_CTRL, RSA_R_KEY_PRIME_NUM_INVALID);
487 case EVP_PKEY_CTRL_RSA_OAEP_MD:
488 case EVP_PKEY_CTRL_GET_RSA_OAEP_MD:
489 if (rctx->pad_mode != RSA_PKCS1_OAEP_PADDING) {
490 RSAerr(RSA_F_PKEY_RSA_CTRL, RSA_R_INVALID_PADDING_MODE);
493 if (type == EVP_PKEY_CTRL_GET_RSA_OAEP_MD)
494 *(const EVP_MD **)p2 = rctx->md;
499 case EVP_PKEY_CTRL_MD:
500 if (!check_padding_md(p2, rctx->pad_mode))
502 if (rsa_pss_restricted(rctx)) {
503 if (EVP_MD_type(rctx->md) == EVP_MD_type(p2))
505 RSAerr(RSA_F_PKEY_RSA_CTRL, RSA_R_DIGEST_NOT_ALLOWED);
511 case EVP_PKEY_CTRL_GET_MD:
512 *(const EVP_MD **)p2 = rctx->md;
515 case EVP_PKEY_CTRL_RSA_MGF1_MD:
516 case EVP_PKEY_CTRL_GET_RSA_MGF1_MD:
517 if (rctx->pad_mode != RSA_PKCS1_PSS_PADDING
518 && rctx->pad_mode != RSA_PKCS1_OAEP_PADDING) {
519 RSAerr(RSA_F_PKEY_RSA_CTRL, RSA_R_INVALID_MGF1_MD);
522 if (type == EVP_PKEY_CTRL_GET_RSA_MGF1_MD) {
524 *(const EVP_MD **)p2 = rctx->mgf1md;
526 *(const EVP_MD **)p2 = rctx->md;
528 if (rsa_pss_restricted(rctx)) {
529 if (EVP_MD_type(rctx->mgf1md) == EVP_MD_type(p2))
531 RSAerr(RSA_F_PKEY_RSA_CTRL, RSA_R_MGF1_DIGEST_NOT_ALLOWED);
538 case EVP_PKEY_CTRL_RSA_OAEP_LABEL:
539 if (rctx->pad_mode != RSA_PKCS1_OAEP_PADDING) {
540 RSAerr(RSA_F_PKEY_RSA_CTRL, RSA_R_INVALID_PADDING_MODE);
543 OPENSSL_free(rctx->oaep_label);
545 rctx->oaep_label = p2;
546 rctx->oaep_labellen = p1;
548 rctx->oaep_label = NULL;
549 rctx->oaep_labellen = 0;
553 case EVP_PKEY_CTRL_GET_RSA_OAEP_LABEL:
554 if (rctx->pad_mode != RSA_PKCS1_OAEP_PADDING) {
555 RSAerr(RSA_F_PKEY_RSA_CTRL, RSA_R_INVALID_PADDING_MODE);
558 *(unsigned char **)p2 = rctx->oaep_label;
559 return rctx->oaep_labellen;
561 case EVP_PKEY_CTRL_DIGESTINIT:
562 case EVP_PKEY_CTRL_PKCS7_SIGN:
563 #ifndef OPENSSL_NO_CMS
564 case EVP_PKEY_CTRL_CMS_SIGN:
568 case EVP_PKEY_CTRL_PKCS7_ENCRYPT:
569 case EVP_PKEY_CTRL_PKCS7_DECRYPT:
570 #ifndef OPENSSL_NO_CMS
571 case EVP_PKEY_CTRL_CMS_DECRYPT:
572 case EVP_PKEY_CTRL_CMS_ENCRYPT:
574 if (!pkey_ctx_is_pss(ctx))
577 case EVP_PKEY_CTRL_PEER_KEY:
578 RSAerr(RSA_F_PKEY_RSA_CTRL,
579 RSA_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
588 static int pkey_rsa_ctrl_str(EVP_PKEY_CTX *ctx,
589 const char *type, const char *value)
592 RSAerr(RSA_F_PKEY_RSA_CTRL_STR, RSA_R_VALUE_MISSING);
595 if (strcmp(type, "rsa_padding_mode") == 0) {
598 if (strcmp(value, "pkcs1") == 0) {
599 pm = RSA_PKCS1_PADDING;
600 } else if (strcmp(value, "sslv23") == 0) {
601 pm = RSA_SSLV23_PADDING;
602 } else if (strcmp(value, "none") == 0) {
604 } else if (strcmp(value, "oeap") == 0) {
605 pm = RSA_PKCS1_OAEP_PADDING;
606 } else if (strcmp(value, "oaep") == 0) {
607 pm = RSA_PKCS1_OAEP_PADDING;
608 } else if (strcmp(value, "x931") == 0) {
609 pm = RSA_X931_PADDING;
610 } else if (strcmp(value, "pss") == 0) {
611 pm = RSA_PKCS1_PSS_PADDING;
613 RSAerr(RSA_F_PKEY_RSA_CTRL_STR, RSA_R_UNKNOWN_PADDING_TYPE);
616 return EVP_PKEY_CTX_set_rsa_padding(ctx, pm);
619 if (strcmp(type, "rsa_pss_saltlen") == 0) {
622 if (!strcmp(value, "digest"))
623 saltlen = RSA_PSS_SALTLEN_DIGEST;
624 else if (!strcmp(value, "max"))
625 saltlen = RSA_PSS_SALTLEN_MAX;
626 else if (!strcmp(value, "auto"))
627 saltlen = RSA_PSS_SALTLEN_AUTO;
629 saltlen = atoi(value);
630 return EVP_PKEY_CTX_set_rsa_pss_saltlen(ctx, saltlen);
633 if (strcmp(type, "rsa_keygen_bits") == 0) {
634 int nbits = atoi(value);
636 return EVP_PKEY_CTX_set_rsa_keygen_bits(ctx, nbits);
639 if (strcmp(type, "rsa_keygen_pubexp") == 0) {
642 BIGNUM *pubexp = NULL;
643 if (!BN_asc2bn(&pubexp, value))
645 ret = EVP_PKEY_CTX_set_rsa_keygen_pubexp(ctx, pubexp);
651 if (strcmp(type, "rsa_keygen_primes") == 0) {
652 int nprimes = atoi(value);
654 return EVP_PKEY_CTX_set_rsa_keygen_primes(ctx, nprimes);
657 if (strcmp(type, "rsa_mgf1_md") == 0)
658 return EVP_PKEY_CTX_md(ctx,
659 EVP_PKEY_OP_TYPE_SIG | EVP_PKEY_OP_TYPE_CRYPT,
660 EVP_PKEY_CTRL_RSA_MGF1_MD, value);
662 if (pkey_ctx_is_pss(ctx)) {
664 if (strcmp(type, "rsa_pss_keygen_mgf1_md") == 0)
665 return EVP_PKEY_CTX_md(ctx, EVP_PKEY_OP_KEYGEN,
666 EVP_PKEY_CTRL_RSA_MGF1_MD, value);
668 if (strcmp(type, "rsa_pss_keygen_md") == 0)
669 return EVP_PKEY_CTX_md(ctx, EVP_PKEY_OP_KEYGEN,
670 EVP_PKEY_CTRL_MD, value);
672 if (strcmp(type, "rsa_pss_keygen_saltlen") == 0) {
673 int saltlen = atoi(value);
675 return EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen(ctx, saltlen);
679 if (strcmp(type, "rsa_oaep_md") == 0)
680 return EVP_PKEY_CTX_md(ctx, EVP_PKEY_OP_TYPE_CRYPT,
681 EVP_PKEY_CTRL_RSA_OAEP_MD, value);
683 if (strcmp(type, "rsa_oaep_label") == 0) {
688 lab = OPENSSL_hexstr2buf(value, &lablen);
691 ret = EVP_PKEY_CTX_set0_rsa_oaep_label(ctx, lab, lablen);
700 /* Set PSS parameters when generating a key, if necessary */
701 static int rsa_set_pss_param(RSA *rsa, EVP_PKEY_CTX *ctx)
703 RSA_PKEY_CTX *rctx = ctx->data;
705 if (!pkey_ctx_is_pss(ctx))
707 /* If all parameters are default values don't set pss */
708 if (rctx->md == NULL && rctx->mgf1md == NULL && rctx->saltlen == -2)
710 rsa->pss = rsa_pss_params_create(rctx->md, rctx->mgf1md,
711 rctx->saltlen == -2 ? 0 : rctx->saltlen);
712 if (rsa->pss == NULL)
717 static int pkey_rsa_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
720 RSA_PKEY_CTX *rctx = ctx->data;
724 if (rctx->pub_exp == NULL) {
725 rctx->pub_exp = BN_new();
726 if (rctx->pub_exp == NULL || !BN_set_word(rctx->pub_exp, RSA_F4))
732 if (ctx->pkey_gencb) {
733 pcb = BN_GENCB_new();
738 evp_pkey_set_cb_translate(pcb, ctx);
742 ret = RSA_generate_multi_prime_key(rsa, rctx->nbits, rctx->primes,
745 if (ret > 0 && !rsa_set_pss_param(rsa, ctx)) {
750 EVP_PKEY_assign(pkey, ctx->pmeth->pkey_id, rsa);
756 const EVP_PKEY_METHOD rsa_pkey_meth = {
758 EVP_PKEY_FLAG_AUTOARGLEN,
775 pkey_rsa_verifyrecover,
792 * Called for PSS sign or verify initialisation: checks PSS parameter
793 * sanity and sets any restrictions on key usage.
796 static int pkey_pss_init(EVP_PKEY_CTX *ctx)
799 RSA_PKEY_CTX *rctx = ctx->data;
801 const EVP_MD *mgf1md;
802 int min_saltlen, max_saltlen;
804 /* Should never happen */
805 if (!pkey_ctx_is_pss(ctx))
807 rsa = ctx->pkey->pkey.rsa;
808 /* If no restrictions just return */
809 if (rsa->pss == NULL)
811 /* Get and check parameters */
812 if (!rsa_pss_get_param(rsa->pss, &md, &mgf1md, &min_saltlen))
815 /* See if minimum salt length exceeds maximum possible */
816 max_saltlen = RSA_size(rsa) - EVP_MD_size(md);
817 if ((RSA_bits(rsa) & 0x7) == 1)
819 if (min_saltlen > max_saltlen) {
820 RSAerr(RSA_F_PKEY_PSS_INIT, RSA_R_INVALID_SALT_LENGTH);
824 rctx->min_saltlen = min_saltlen;
827 * Set PSS restrictions as defaults: we can then block any attempt to
828 * use invalid values in pkey_rsa_ctrl
832 rctx->mgf1md = mgf1md;
833 rctx->saltlen = min_saltlen;
838 const EVP_PKEY_METHOD rsa_pss_pkey_meth = {
840 EVP_PKEY_FLAG_AUTOARGLEN,
856 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,