Skip to content

Use a message in the RSASSA/RSAPSS/ECDSA FIPS self-tests - #4259

Open
jyao1 wants to merge 3 commits into
DMTF:mainfrom
jyao1:fips_update
Open

jyao1 wants to merge 3 commits into
DMTF:mainfrom
jyao1:fips_update

Conversation

@jyao1

@jyao1 jyao1 commented Oct 27, 2026

Copy link
Copy Markdown
Member

Also take the salt in the RSA-PSS FIPS API.

Change all signature vector to NIST vector

Assisted-by: Claude Code:claude-sonnet-5-5
Assisted-by: GitHub Copilot:Claude Sonnet 5

Fix #4198

@jyao1
jyao1 requested a review from steven-bellock as a code owner October 27, 2026 15:38
@jyao1 jyao1 added the 4.0 Issues and features slated for the next major revision of libspdm. label Oct 27, 2026
@steven-bellock

Copy link
Copy Markdown
Contributor

This is a major breaking change that needs an update in https://github.com/DMTF/libspdm/blob/main/doc/changelog.md.

#if LIBSPDM_FIPS_MODE

#if LIBSPDM_ECDSA_SUPPORT
#if (LIBSPDM_ECDSA_SUPPORT) && (LIBSPDM_SHA256_SUPPORT)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This reverts what was fixed in #4186. What if the Integrator only supports SHA-384 and not SHA-256?

@jyao1 jyao1 Oct 27, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

What if the Integrator only supports SHA-384 and not SHA-256?

It will not run. Since HASH algo is fixed, this is a downside.

As alternative, I could use SHA-384 by default, which matches the CNSA 1.0 requirement.
Or add all SHA-256/384/512.

What do you think?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What do you think?

It is not what I think, it is what FIPS thinks. If an SPDM endpoint supports SHA-256/384/512 then presumably it has to test all three algorithms before it establishes a connection, or it waits until ALGORITHMS finishes and tests the one algorithm selected for the connection.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

OK. I can add all.

Comment thread os_stub/cryptlib_mbedtls/pk/fips_hash.c Outdated
@@ -0,0 +1,53 @@
/**
* Copyright Notice:
* Copyright 2021-2026 DMTF. All rights reserved.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just 2026.

Comment thread os_stub/cryptlib_openssl/pk/fips_hash.c Outdated
@@ -0,0 +1,53 @@
/**
* Copyright Notice:
* Copyright 2021-2026 DMTF. All rights reserved.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just 2026.

@jyao1

jyao1 commented Oct 27, 2026

Copy link
Copy Markdown
Member Author

This is a major breaking change that needs an update in https://github.com/DMTF/libspdm/blob/main/doc/changelog.md.

Agree.

@jyao1
jyao1 force-pushed the fips_update branch 2 times, most recently from 56931ff to e614fbe Compare October 28, 2026 13:52
@jyao1
jyao1 requested a review from steven-bellock October 28, 2026 14:01
* ECDSA SigGen.txt, [P-256,SHA-256/SHA-384/SHA-512], first record.
* https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/digital-signatures
* Exactly one of SHA-256/SHA-384/SHA-512 is required for the ECDSA FIPS self-test to run;
* the strongest one enabled at build time is used.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the strongest one enabled at build time is used

The #if statements below pick the weakest at build time.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

fixed code.

jyao1 added 3 commits October 29, 2026 07:47
Also take the salt in the RSA-PSS FIPS API.

Change all signature vector to NIST vector

Support SHA-256/384/512 in ECDSA/RSA-SSA/RSA-PSS FIPS self-tests

Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Assisted-by: Claude Code:claude-sonnet-5-5
Assisted-by: GitHub Copilot:Claude Sonnet 5
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Assisted-by: GitHub Copilot:Claude Sonnet 5
Document libspdm_ecdsa_verify_fips, libspdm_rsa_pkcs1_sign_fips/
verify_fips, the libspdm_ecdsa_sign_ex rename to libspdm_ecdsa_sign_fips,
and the RSA-PSS FIPS salt/message parameter changes.

Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Assisted-by: GitHub Copilot:Claude Sonnet 5

This branch has not been deployed

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

Labels

4.0 Issues and features slated for the next major revision of libspdm.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Audit FIPS self-tests for FIPS compliancy

2 participants