TLS 1.2 - 密钥对大小和加密密钥长度
TLS 1.2 - key-pair size and encryption key length
假设一个(基于java 的)服务器使用java 1.8 和一个(基于java 的)客户端也使用java 8。
鉴于 java 8 默认支持 TLS 1.2。
是否保证将使用 512 位加密?如果不是什么会影响对称密钥的大小?
另一个关于 RSA 密钥(1024 或 2048)的问题。 RSA 密钥是证书的一部分还是在 TLS 握手期间确定 RSA 密钥?
非常感谢
盖伊
(对称)数据加密的密钥大小作为密码套件的一部分进行协商,例如,TLS_RSA_WITH_AES_256_CBC_SHA 使用具有 256 位密钥的 AES 而 TLS_RSA_WITH_AES_128_CBC_SHA 使用具有 128 位密钥的 AES。 Java 来自 Oracle(以及之前的 Sun)的包 out-of-the-box 仅限于 128 位强度的对称加密;要使用 AES-256 密码套件,您需要安装 'Unlimited Strength' 策略,请参阅 但 OpenJDK 没有此限制。请注意,强度与大小不同; SSL/TLS(键控选项 1)中使用的 3DES 具有密钥 size 168,但 strength 只有 112,并且在 'limited'政策。
任何 SSL/TLS 中根本没有使用“512 位加密”算法。请注意,在我们当前的太阳系中无法通过常规方式突破 AES-256 等 256 位强度;你至少需要在数十亿年内控制银河系的大部分地区,而对于这样的对手来说,你的猫视频、银行账户,甚至商业策略都是完全无趣的。 Quantum 可能会改变这一点,但没有人知道这是否会奏效、何时奏效或效果如何。
是的,RSA 密钥在证书中,如果您使用 RSA,这是最常见的选择,但不是唯一的选择。 (除了在一些故意破坏的 'export' 密码套件中存在临时 RSA 密钥,您永远不想使用这些密码套件,并且在 TLSv1.1 2006 和 TLSv1.2 2008 中被正式禁止,并且 Java 自从 Java7 大约 2011 年以来,默认情况下已完全禁用。) Public 自 2013 年以来,像 Symantec GoDaddy 等 CA 就没有为小于 2048 位的 RSA 密钥颁发证书;如果您使用自签名证书或 运行 您自己的个人 CA,您可以这样做,但浏览器可能会给出错误或警告。
请注意,RSA-1024 只有大约 80 位的强度(这就是它不再被认为是安全的原因)而 RSA-2048 大约有 112 位;参见 https://www.keylength.com 和
https://crypto.stackexchange.com/questions/1978/how-big-an-rsa-key-is-considered-secure-today
https://crypto.stackexchange.com/questions/6236/why-does-the-recommended-key-size-between-symmetric-and-assymetric-encryption-
https://crypto.stackexchange.com/questions/8687/security-strength-of-rsa-in-relation-with-the-modulus-size
SSL Labs 有一个 github 页面,自 2013 年以来,他们一直在该页面上就此类问题提出建议:https://github.com/ssllabs/research/wiki/SSL-and-TLS-Deployment-Best-Practices
你问题的具体答案在这里:
https://github.com/ssllabs/research/wiki/SSL-and-TLS-Deployment-Best-Practices#11-use-2048-bit-private-keys
我把它粘贴在下面,但我知道我的答案可能会过时,而他们的文档会继续更新:
1.1 Use 2048-Bit Private Keys.
For most web sites, security provided by 2,048-bit RSA keys is sufficient. The RSA public key algorithm is widely supported, which makes keys of this type a safe default choice. At 2,048 bits, such keys provide about 112 bits of security. If you want more security than this, note that RSA keys don't scale very well. To get 128 bits of security, you need 3,072-bit RSA keys, which are noticeably slower. ECDSA keys provide an alternative that offers better security and better performance. At 256 bits, ECDSA keys provide 128 bits of security. A small number of older clients don't support ECDSA, but modern clients do. It's possible to get the best of both worlds and deploy with RSA and ECDSA keys simultaneously if you don't mind the overhead of managing such a setup.
假设一个(基于java 的)服务器使用java 1.8 和一个(基于java 的)客户端也使用java 8。 鉴于 java 8 默认支持 TLS 1.2。 是否保证将使用 512 位加密?如果不是什么会影响对称密钥的大小?
另一个关于 RSA 密钥(1024 或 2048)的问题。 RSA 密钥是证书的一部分还是在 TLS 握手期间确定 RSA 密钥?
非常感谢 盖伊
(对称)数据加密的密钥大小作为密码套件的一部分进行协商,例如,TLS_RSA_WITH_AES_256_CBC_SHA 使用具有 256 位密钥的 AES 而 TLS_RSA_WITH_AES_128_CBC_SHA 使用具有 128 位密钥的 AES。 Java 来自 Oracle(以及之前的 Sun)的包 out-of-the-box 仅限于 128 位强度的对称加密;要使用 AES-256 密码套件,您需要安装 'Unlimited Strength' 策略,请参阅
任何 SSL/TLS 中根本没有使用“512 位加密”算法。请注意,在我们当前的太阳系中无法通过常规方式突破 AES-256 等 256 位强度;你至少需要在数十亿年内控制银河系的大部分地区,而对于这样的对手来说,你的猫视频、银行账户,甚至商业策略都是完全无趣的。 Quantum 可能会改变这一点,但没有人知道这是否会奏效、何时奏效或效果如何。
是的,RSA 密钥在证书中,如果您使用 RSA,这是最常见的选择,但不是唯一的选择。 (除了在一些故意破坏的 'export' 密码套件中存在临时 RSA 密钥,您永远不想使用这些密码套件,并且在 TLSv1.1 2006 和 TLSv1.2 2008 中被正式禁止,并且 Java 自从 Java7 大约 2011 年以来,默认情况下已完全禁用。) Public 自 2013 年以来,像 Symantec GoDaddy 等 CA 就没有为小于 2048 位的 RSA 密钥颁发证书;如果您使用自签名证书或 运行 您自己的个人 CA,您可以这样做,但浏览器可能会给出错误或警告。
请注意,RSA-1024 只有大约 80 位的强度(这就是它不再被认为是安全的原因)而 RSA-2048 大约有 112 位;参见 https://www.keylength.com 和
https://crypto.stackexchange.com/questions/1978/how-big-an-rsa-key-is-considered-secure-today
https://crypto.stackexchange.com/questions/6236/why-does-the-recommended-key-size-between-symmetric-and-assymetric-encryption-
https://crypto.stackexchange.com/questions/8687/security-strength-of-rsa-in-relation-with-the-modulus-size
SSL Labs 有一个 github 页面,自 2013 年以来,他们一直在该页面上就此类问题提出建议:https://github.com/ssllabs/research/wiki/SSL-and-TLS-Deployment-Best-Practices
你问题的具体答案在这里: https://github.com/ssllabs/research/wiki/SSL-and-TLS-Deployment-Best-Practices#11-use-2048-bit-private-keys
我把它粘贴在下面,但我知道我的答案可能会过时,而他们的文档会继续更新:
1.1 Use 2048-Bit Private Keys. For most web sites, security provided by 2,048-bit RSA keys is sufficient. The RSA public key algorithm is widely supported, which makes keys of this type a safe default choice. At 2,048 bits, such keys provide about 112 bits of security. If you want more security than this, note that RSA keys don't scale very well. To get 128 bits of security, you need 3,072-bit RSA keys, which are noticeably slower. ECDSA keys provide an alternative that offers better security and better performance. At 256 bits, ECDSA keys provide 128 bits of security. A small number of older clients don't support ECDSA, but modern clients do. It's possible to get the best of both worlds and deploy with RSA and ECDSA keys simultaneously if you don't mind the overhead of managing such a setup.