Skip to content

Fix DH leading-zero-bytes issue.#3603

Merged
jyao1 merged 1 commit intoDMTF:mainfrom
jyao1:ffdhe
Apr 14, 2026
Merged

Fix DH leading-zero-bytes issue.#3603
jyao1 merged 1 commit intoDMTF:mainfrom
jyao1:ffdhe

Conversation

@jyao1
Copy link
Copy Markdown
Member

@jyao1 jyao1 commented Apr 14, 2026

Fix #3557

SPDM spec requires to follow section 7.4 of RFC 8446 defines.

RFC 8446 requires fixed-length unsigned integer in the byte order of the group size (padded with zeros on the left).

@jyao1 jyao1 requested a review from steven-bellock as a code owner April 14, 2026 06:27
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
@steven-bellock
Copy link
Copy Markdown
Contributor

@jyao1 does this truly fix #3557? How did you find this?

@jyao1
Copy link
Copy Markdown
Member Author

jyao1 commented Apr 14, 2026

I cannot know if it will truly fix. I just know this is a bug that will cause the test failure, because there is a minor chance that the key will have leading bytes 0 and cause the final key length to be shorter.

Copy link
Copy Markdown
Contributor

@steven-bellock steven-bellock left a comment

Choose a reason for hiding this comment

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

Ok. We will need to keep an eye on intermittent test failures still.

@jyao1 jyao1 merged commit 7badc66 into DMTF:main Apr 14, 2026
97 checks passed
@jyao1 jyao1 deleted the ffdhe branch April 27, 2026 02:35
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.

Intermittent failure in spdm_crypt_lib_tests

2 participants