Skip to content

ecx: report mandatory digest for Ed25519/Ed448 - #515

Open
ColtonWilley wants to merge 2 commits into
wolfSSL:masterfrom
ColtonWilley:fix/ecx-mandatory-digest
Open

ColtonWilley wants to merge 2 commits into
wolfSSL:masterfrom
ColtonWilley:fix/ecx-mandatory-digest

Conversation

@ColtonWilley

Copy link
Copy Markdown
Contributor

Ed25519/Ed448 keys didn't report OSSL_PKEY_PARAM_MANDATORY_DIGEST, so openssl dgst -sign/-verify, pkeyutl -sign -rawin and CMS signing fell back to streaming, which EdDSA can't do, and failed. Ed keys now report an empty mandatory digest, as the default provider does.

Ed keys now return MANDATORY_DIGEST "" like the default provider, so
EVP_PKEY_get_default_digest_name() gives 2/"UNDEF". Without it openssl
dgst, pkeyutl and cms don't select one-shot EdDSA signing and fail.
Check EVP_PKEY_get_default_digest_name() and the gettable params for Ed
and X keys against the default provider.
Copilot AI balanced review requested due to automatic review settings October 26, 2026 20:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are identified for the Ed25519/Ed448 digest-reporting changes.

No open issues 🎉

What changed in this PR

This PR aligns wolfProvider’s Ed25519/Ed448 digest reporting with OpenSSL’s default provider, allowing callers to recognize that these keys require signing without an external digest.

Changes:

  • Reports an empty mandatory digest for Ed25519/Ed448 while preserving X25519/X448 behavior.
  • Separates gettable parameter lists for Ed and X keys.
  • Adds regression tests for digest reporting and parameter availability.
File Description
test/​unit.h Declares the ECX default-digest test.
test/​unit.c Registers the new test.
test/​test_ecx.c Checks digest reporting across OpenSSL and wolfProvider.
src/​wp_ecx_kmgmt.c Exposes and returns the mandatory digest parameter for Ed keys.

Review effort: Balanced

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