Skip to content

Fix test_ts.rb in FIPS.#1056

Merged
rhenium merged 1 commit into
ruby:masterfrom
junaruga:wip/fips-test-ts
May 30, 2026
Merged

Fix test_ts.rb in FIPS.#1056
rhenium merged 1 commit into
ruby:masterfrom
junaruga:wip/fips-test-ts

Conversation

@junaruga
Copy link
Copy Markdown
Member

@junaruga junaruga commented May 21, 2026

This PR is 2 commits, and the 1st commit is the PR #1054. I intend that we review the PR #1054 first, then rebase this PR on the latest master branch, and we review this PR second.

Note this PR is the last one to fix test files in FIPS. :) After merging this PR, we can unify or refactor the rake test_fips task with rake test task in Rakefile via another PR.


2048-bit RSA keys for intermediate_key and ee_key are required for signing and encryption in FIPS.

SP 800-131A Rev. 2
3 - Digital Signatures
6 - Key Agreement and Key Transport Using RSA

https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-131Ar2.pdf
https://github.com/openssl/openssl/blob/71943544885ff364a10bcc5ffc62d0e651c9a021/providers/common/securitycheck.c#L72-L73

Comment thread test/openssl/test_ts.rb Outdated
Replace RSA keys for intermediate_key and ee_key with RSA 4096-bit keys
rsa-1.pem and rsa-2.pem. At least RSA 2048-bit keys are required for signing
and encryption in FIPS.

SP 800-131A Rev. 2
* 3. Digital Signatures
* 6. Key Agreement and Key Transport Using RSA
https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-131Ar2.pdf
https://github.com/openssl/openssl/blob/71943544885ff364a10bcc5ffc62d0e651c9a021/providers/common/securitycheck.c#L72-L73

```
$ openssl rsa -in test/openssl/fixtures/pkey/rsa-1.pem -text -noout | head -1
Private-Key: (4096 bit, 2 primes)

$ openssl rsa -in test/openssl/fixtures/pkey/rsa-2.pem -text -noout | head -1
Private-Key: (4096 bit, 2 primes)
```
@junaruga junaruga force-pushed the wip/fips-test-ts branch from a0198e1 to f130312 Compare May 29, 2026 16:42
@junaruga
Copy link
Copy Markdown
Member Author

@rhenium I rebased this PR on the latest master branch, fixing the thing reviewed by you, updating the commit message. Note I removed the code comment "RSA 2048-bit keys are required in FIPS" from the previous PR, because the rsa-1.pem and rsa-2.pem are generally used everywhere in the tests, and I think the "RSA 2048-bit keys are required in FIPS" is not the specific thing to mention in the code comment.

Could you review this PR again? Thanks.

Copy link
Copy Markdown
Member

@rhenium rhenium left a comment

Choose a reason for hiding this comment

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

Thanks!

@rhenium rhenium merged commit 9cdfb77 into ruby:master May 30, 2026
47 checks passed
@junaruga junaruga deleted the wip/fips-test-ts branch May 30, 2026 16:39
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