I want to know if JDK 1.8 supports DH key length of 4096 bits.
Everywhere I searched, I found that jdk.tls.ephemeralDHKeySize
can accept only between 1024 and 2048 bits.
I have to connect to a site which supports
"TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 (0x9e) DH 4096 bits (p: 512, g: 1, Ys: 512)".
But I am getting
"Could not generate DH keypair" Exception.
EDIT:
Adding a bit additional info,
I am using Apache httpclient-4.2.5 for connecting to the site. The server also supports
"TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 (0x9f) - 4096 bits".
When I use JDK 1.8 and try to connect the cipher suite is getting selected by the Server but JDK 1.8 is supporting only 2048 bits and my connection is failing.
EDIT:
Bouncy castle can be used as a workaround to support 4096 bits. https://bugs.java.com/bugdatabase/view_bug?bug_id=6521495