# 修改Ephemeral Diffie-Hellman Keys大小

jdk.tls.ephemeralDHKeySize

-------------------------------------下面是oracle关于DH keys介绍原文-----

http://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html#customizing_dh_keys

### Customizing Size of Ephemeral Diffie-Hellman Keys

Diffie-Hellman (DH) keys of sizes less than 1024 bits have been deprecated because of their insufficient strength. In JDK 8, you can customize the ephemeral DH key size with the system property jdk.tls.ephemeralDHKeySize. This system property does not impact DH key sizes in ServerKeyExchange messages for exportable cipher suites. It impacts only the DHE_RSA, DHE_DSS, and DH_anon-based cipher suites in the JSSE Oracle provider.

You can specify one of the following values for this property:

• Undefined: A DH key of size 1024 bits will be used always for non-exportable cipher suites. This is the default value for this property.
• legacy: The JSSE Oracle provider preserves the legacy behavior (for example, using ephemeral DH keys of sizes 512 bits and 768 bits) of JDK 7 and earlier releases.
• matched: For non-exportable anonymous cipher suites, the DH key size in ServerKeyExchange messages is 1024 bits. For X.509 certificate based authentication (of non-exportable cipher suites), the DH key size matching the corresponding authentication key is used, except that the size must be between 1024 bits and 2048 bits. For example, if the public key size of an authentication certificate is 2048 bits, then the ephemeral DH key size should be 2048 bits unless the cipher suite is exportable. This key sizing scheme keeps the cryptographic strength consistent between authentication keys and key-exchange keys.
• A valid integer between 1024 and 2048, inclusively: A fixed ephemeral DH key size of the specified value, in bits, will be used for non-exportable cipher suites.

The following table summaries the minimum and maximum acceptable DH key sizes for each of the possible values for the system property jdk.tls.ephemeralDHKeySize:

Value ofjdk.tls.ephemeralDHKeySize Undefined legacy matched Integer value (fixed)
Exportable DH key size 512 512 512 512
Non-exportable anonymous cipher suites 1024 768 1024 The fixed key size is specified by a valid integer property value, which must be between 1024 and 2048, inclusively.
Authentication certificate 1024 768 The key size is the same as the authentication certificate, but must be between 1024 bits and 2048 bits, inclusively. However, the SunJCE provider only supports 2048-bit DH keys larger than 1024 bits. Consequently, you may use the values 1024 or 2048 only. The fixed key size is specified by a valid integer property value, which must be between 1024 and 2048, inclusively.

• 本文已收录于以下专栏：

## tomcat8启动慢

tomcat8在linux下安装使用一段时间后启动非常慢，6分钟左右。 原因是一个随机数生成参数导致的。 处理如下： 修改catalina.sh .配置JRE使用非阻塞的Entropy Sou...

## SSL证书生成全过程

• F2004
• 2015年05月19日 11:54
• 3352

• xqclll
• 2016年12月06日 16:41
• 1362

## Linux_修改 ~/.ssh/authorized_keys 使Xshell可以通过ssh协议登录

举报原因： 您举报文章：https之DHE keys 大小修改 色情 政治 抄袭 广告 招聘 骂人 其他 (最多只允许输入30个字)