Skip to content

Fix Ed448 key/sig size, build without HAVE_ECC - #41

Open
padelsbach wants to merge 3 commits into
wolfSSL:masterfrom
padelsbach:ed448
Open

padelsbach wants to merge 3 commits into
wolfSSL:masterfrom
padelsbach:ed448

Conversation

@padelsbach

Copy link
Copy Markdown
Contributor

Changelog:

  • PSA_EXPORT_KEY_OUTPUT_SIZE and PSA_SIGN_OUTPUT_SIZE were one byte too small

  • Builds without HAVE_ECC would fail due to missing guards

Tests added.

Copilot AI balanced review requested due to automatic review settings October 31, 2026 02:37

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 Ed448 buffer-sizing and no-ECC build changes.

No open issues 🎉

What changed in this PR

This PR corrects Ed448 buffer-size calculations in wolfPSA and fixes builds where HAVE_ECC is disabled.

Changes:

  • Adjust ECC export and signature size macros to accommodate Ed448.
  • Add regression tests for signing and key export using the advertised buffer sizes.
  • Guard ECC-specific declarations and calls, and add a no-ECC shared-library CI build that rejects undefined symbols.
File Description
wolfpsa/​psa/​crypto_sizes.h Correct Ed448 key-export and signature buffer sizes.
test/​psa_server/​psa_pure_eddsa_context_test.c Test Ed25519 and Ed448 signing with macro-sized output buffers.
test/​psa_server/​psa_eddsa_mont_export_test.c Test key-pair export with the advertised output size.
src/​psa_asymmetric_api.c Guard ECC declarations and dispatch branches with HAVE_ECC.
.github/​workflows/​build-config-matrix.yml Add a no-ECC shared-library build and undefined-symbol link checks.

Review effort: Balanced

@Frauschi Frauschi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The size and HAVE_ECC fixes look right. Both tests fail without the crypto_sizes.h change, the no-ECC build links cleanly, and it merges cleanly with #40.

Comment thread wolfpsa/psa/crypto_sizes.h Resolved
Comment thread wolfpsa/psa/crypto_sizes.h Resolved
Comment thread src/psa_asymmetric_api.c Resolved
modifiers: "-WOLFSSL_HAVE_PRF"
# This config stays as a static library (not shared) because of a
# missing symbol in this build of wolfSSL. 'target' field and the
# LDFLAGS environment variable below can be removed after

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Dropping LDFLAGS would also drop -z defs from every lane, so only the pbkdf2 target can go. That also has to wait for a wolfSSL stable release with wolfSSL/wolfssl#11958, since the matrix still builds v5.9.4-stable.

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.

4 participants