Codebase list openssl / 408cb4c
Change default RSA, DSA and DH size to 2048 bit Fixes: #8737 Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> Reviewed-by: Richard Levitte <levitte@openssl.org> GH: #8741 (cherry picked from commit 70b0b977f73cd70e17538af3095d18e0cf59132e) Kurt Roeckx 4 years ago
5 changed file(s) with 15 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
88
99 Changes between 1.1.1b and 1.1.1c [xx XXX xxxx]
1010
11 *)
11 *) Change the default RSA, DSA and DH size to 2048 bit instead of 1024.
12 This changes the size when using the genpkey app when no size is given. It
13 fixes an omission in earlier changes that changed all RSA, DSA and DH
14 generation apps to use 2048 bits by default.
15 [Kurt Roeckx]
1216
1317 Changes between 1.1.1a and 1.1.1b [26 Feb 2019]
1418
5353 DHerr(DH_F_PKEY_DH_INIT, ERR_R_MALLOC_FAILURE);
5454 return 0;
5555 }
56 dctx->prime_len = 1024;
56 dctx->prime_len = 2048;
5757 dctx->subprime_len = -1;
5858 dctx->generator = 2;
5959 dctx->kdf_type = EVP_PKEY_DH_KDF_NONE;
1919
2020 typedef struct {
2121 /* Parameter gen parameters */
22 int nbits; /* size of p in bits (default: 1024) */
23 int qbits; /* size of q in bits (default: 160) */
22 int nbits; /* size of p in bits (default: 2048) */
23 int qbits; /* size of q in bits (default: 224) */
2424 const EVP_MD *pmd; /* MD for parameter generation */
2525 /* Keygen callback info */
2626 int gentmp[2];
3434
3535 if (dctx == NULL)
3636 return 0;
37 dctx->nbits = 1024;
38 dctx->qbits = 160;
37 dctx->nbits = 2048;
38 dctx->qbits = 224;
3939 dctx->pmd = NULL;
4040 dctx->md = NULL;
4141
5555
5656 if (rctx == NULL)
5757 return 0;
58 rctx->nbits = 1024;
58 rctx->nbits = 2048;
5959 rctx->primes = RSA_DEFAULT_PRIME_NUM;
6060 if (pkey_ctx_is_pss(ctx))
6161 rctx->pad_mode = RSA_PKCS1_PSS_PADDING;
117117
118118 =item B<rsa_keygen_bits:numbits>
119119
120 The number of bits in the generated key. If not specified 1024 is used.
120 The number of bits in the generated key. If not specified 2048 is used.
121121
122122 =item B<rsa_keygen_primes:numprimes>
123123
184184
185185 =item B<dsa_paramgen_bits:numbits>
186186
187 The number of bits in the generated prime. If not specified 1024 is used.
187 The number of bits in the generated prime. If not specified 2048 is used.
188188
189189 =item B<dsa_paramgen_q_bits:numbits>
190190
191191 The number of bits in the q parameter. Must be one of 160, 224 or 256. If not
192 specified 160 is used.
192 specified 224 is used.
193193
194194 =item B<dsa_paramgen_md:digest>
195195
208208
209209 =item B<dh_paramgen_prime_len:numbits>
210210
211 The number of bits in the prime parameter B<p>. The default is 1024.
211 The number of bits in the prime parameter B<p>. The default is 2048.
212212
213213 =item B<dh_paramgen_subprime_len:numbits>
214214