Skip to content

Support SecureRandom strong algorithms in FIPS mode - #1056

Draft
Mohit-Rajbhar100698 wants to merge 1 commit into
ibmruntimes:openj9from
Mohit-Rajbhar100698:backport/11/fips-secureRandom-strongAlgo
Draft

Support SecureRandom strong algorithms in FIPS mode#1056
Mohit-Rajbhar100698 wants to merge 1 commit into
ibmruntimes:openj9from
Mohit-Rajbhar100698:backport/11/fips-secureRandom-strongAlgo

Conversation

@Mohit-Rajbhar100698

@Mohit-Rajbhar100698 Mohit-Rajbhar100698 commented Jul 2, 2026

Copy link
Copy Markdown

This change overrides the default securerandom.strongAlgorithms
configuration used by SecureRandom.getInstanceStrong() when it
runs in FIPS mode.

This PR also includes two additional backports. One removes the
provider-specific condition from the SecureRandom strongAlgorithms
test. The other handles the Windows-specific SecureRandom
strongAlgorithms defaults used by the test.

Back-ported from: #1187 #1225 #1232

Signed-off-by: Mohit Rajbhar mohit.rajbhar@ibm.com

@pshipton
pshipton marked this pull request as draft July 7, 2026 13:15
@Mohit-Rajbhar100698
Mohit-Rajbhar100698 marked this pull request as ready for review July 15, 2026 13:01
@Mohit-Rajbhar100698
Mohit-Rajbhar100698 force-pushed the backport/11/fips-secureRandom-strongAlgo branch from 1c1995a to 6c672c6 Compare July 15, 2026 13:07
@Mohit-Rajbhar100698

Copy link
Copy Markdown
Author

Hi @keithc-ca
could you review this PR whenever you have a chance?

@keithc-ca
keithc-ca self-requested a review July 16, 2026 20:00
@keithc-ca
keithc-ca marked this pull request as draft July 16, 2026 20:41
private static Stream<Arguments> patternMatches_strongAlgorithms() {
Stream.Builder<Arguments> tests = Stream.builder();

if (isProviderPresent("OpenJCEPlusFIPS")) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this condition present here (and on line 332), but not in 25 and later versions?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, @keithc-ca. That condition was removed in another PR: ibmruntimes/openj9-openjdk-jdk#1225.

Once this PR is merged, I'll immediately raise the corresponding backport to remove that condition as well.

Or
If you want I can give that change in this PR also.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, let's keep the three changes separate; see ibmruntimes/openj9-openjdk-jdk21#446 (comment).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, @keithc-ca , got it.

We'll keep the three changes as separate PRs. One PR has already been raised. Once that is merged, I'll raise the remaining two consecutively.

I've also resolved all the merge conflicts on the backports (for jdk21,jdk17,jdk11). Whenever you have a chance, could you please review it?

@Mohit-Rajbhar100698
Mohit-Rajbhar100698 force-pushed the backport/11/fips-secureRandom-strongAlgo branch 2 times, most recently from 39234fb to 2117cd2 Compare July 24, 2026 22:49
@Mohit-Rajbhar100698

Copy link
Copy Markdown
Author

Hi @keithc-ca , is there anything left for me to address in this PR?

@keithc-ca

Copy link
Copy Markdown
Member

Yes, this should not be merged before ibmruntimes/openj9-openjdk-jdk17#620.

This change overrides the default securerandom.strongAlgorithms
configuration used by SecureRandom.getInstanceStrong() when it
runs in FIPS mode.

This PR also includes two additional backports. One removes the
provider-specific condition from the SecureRandom strongAlgorithms
test(#1225). The other handles the Windows-specific SecureRandom
strongAlgorithms defaults used by the test(#1232).

Signed-off-by: Mohit Rajbhar <mohit.rajbhar@ibm.com>
@Mohit-Rajbhar100698
Mohit-Rajbhar100698 force-pushed the backport/11/fips-secureRandom-strongAlgo branch from 7629bf7 to bb85e28 Compare July 31, 2026 20:53
@Mohit-Rajbhar100698

Copy link
Copy Markdown
Author

Updated this also with all backports

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants