如何在java 8中将DH密钥大小扩展到2048 [英] How to expand DH key size to 2048 in java 8

查看:2553
本文介绍了如何在java 8中将DH密钥大小扩展到2048的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读了很多帖子说在java 8中可以将DH密钥大小扩展到2048.他们说可以通过更改以下值来从系统属性:
jdk.tls.ephemeralDHKeySize 到2048.我试图弄清楚在哪里以及如何做到这一点并找不到。我在哪里可以找到这个变量或属性?哪个文件?路径?我正在使用Windows。

I read a lot of posts saying that in java 8 it is possible to expand the DH key size to 2048. They say it is possible from the system property by changing the value of: jdk.tls.ephemeralDHKeySize to 2048. I tried to figure out where and how to do this and could not find. Where can I find this variable or property? which file? path? I am using windows.

推荐答案

这是系统属性,因此您可以通过 -Djdk进行设置.tls.ephemeralDHKeySize = 2048 作为JVM参数或通过代码中的 System.setProperty 。 (我没有检查过这个属性,但是一些属性只能由使用它们的库读取一次,然后在JVM的执行期间永久缓存,所以你通常希望尽早设置该设置,如果你在代码中设置它。)

This is a system property, so you could set it via -Djdk.tls.ephemeralDHKeySize=2048 as a JVM argument or via System.setProperty within the code. (I haven't checked for this property, but some properties are read only once by the library that uses them, and then cached permanently during the execution time of the JVM, so you'd generally want to set that setting early enough if you set it within the code.)

可接受的值记录在 JSSE参考指南:自定义短暂的Diffie-Hellman密钥的大小

The acceptable values are documented in the JSSE reference guide: "Customizing Size of Ephemeral Diffie-Hellman Keys".

这篇关于如何在java 8中将DH密钥大小扩展到2048的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆