RFR: 8342183: Update tests to use stronger algorithms and keys

Matthew Donovan mdonovan at openjdk.org
Tue Oct 29 09:54:44 UTC 2024


On Fri, 18 Oct 2024 08:33:36 GMT, Fernando Guallini <fguallini at openjdk.org> wrote:

> Several tests are identified to use weak/legacy algorithms. As these tests purpose is not to exercise weak algorithms, these are updated in this PR to use stronger algorithms. If the test uses a weak key, it is updated as well.

test/jdk/com/sun/crypto/provider/KeyAgreement/SupportedDHParamGens.java line 61:

> 59: 
> 60:     static DHParameterSpec FFDHE4096_SPEC =  new DHParameterSpec(
> 61:             dhGroup4096.getPrime(), dhGroup4096.getBase());

It looks like the DiffieHelmanGroup fields are just used to intialize the DHParameterSpec. It might be cleaner to create the DHParameterSpec objects in a static initializer. 

Also, the DHParameterSpec objects can be `final`

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/21578#discussion_r1813428944


More information about the security-dev mailing list