RFR: 8199697: FIPS 186-4 RSA Key Generation [v2]

Valerie Peng valeriep at openjdk.java.net
Wed Oct 21 00:18:19 UTC 2020


On Tue, 20 Oct 2020 22:21:02 GMT, Xue-Lei Andrew Fan <xuelei at openjdk.org> wrote:

>> Valerie Peng has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev
>> excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since
>> the last revision:
>>  - Merge branch 'master' into JDK-8199697
>>  - 8199697: FIPS 186-4 RSA Key Generation
>>    
>>    Changed RSA key pair generation code following the guidelines from FIPS 186-4.
>
> src/java.base/share/classes/sun/security/rsa/RSAKeyPairGenerator.java line 200:
> 
>> 198:                 if (kp != null) {
>> 199:                     return kp;
>> 200:                 }
> 
> The  logic may be more clear if moving the checking of n and key generation out of the loop for q, by regenerate both p
> and q if needed.

Ok, will add an outer while-loop as in the existing code.

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

PR: https://git.openjdk.java.net/jdk/pull/420



More information about the security-dev mailing list