Repository navigation
ecx: report mandatory digest for Ed25519/Ed448 - #515
Open
ColtonWilley wants to merge 2 commits into
Open
ColtonWilley wants to merge 2 commits into
ColtonWilley wants to merge 2 commits into
Conversation
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.
There was a problem hiding this comment.
🟢 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ed25519/Ed448 keys didn't report
OSSL_PKEY_PARAM_MANDATORY_DIGEST, soopenssl dgst -sign/-verify,pkeyutl -sign -rawinand 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.