-
Notifications
You must be signed in to change notification settings - Fork 122
feat(esp_encrypted_img): add support for PSA crypto interface #654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Test Results 40 files 40 suites 8m 16s ⏱️ For more details on these errors, see this check. Results for commit c486cc5. ♻️ This comment has been updated with latest results. |
954f7a4 to
255859e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds support for the PSA (Platform Security Architecture) crypto interface to the esp_encrypted_img component, enabling compatibility with mbedtls 4.x while maintaining backward compatibility with older mbedtls versions. The changes introduce conditional compilation based on CONFIG_MBEDTLS_VER_4_X_SUPPORT to use PSA APIs when available.
Key Changes:
- Abstraction layer for GCM encryption operations supporting both PSA and legacy mbedtls APIs
- PSA-based implementations for RSA key operations, ECDH key agreement, and HKDF key derivation
- New private header file to consolidate internal structures and definitions
- Updated test code to initialize PSA crypto for hardware-accelerated AES operations
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 12 comments.
| File | Description |
|---|---|
| esp_encrypted_img/private_include/esp_encrypted_img_priv.h | New private header consolidating internal types, constants, and structures with conditional PSA/mbedtls fields |
| esp_encrypted_img/src/esp_encrypted_img.c | Core implementation with GCM abstraction layer, PSA-based RSA/ECDH/HKDF operations, and integration into decrypt flow |
| esp_encrypted_img/test_apps/main/esp_encrypted_img_test.c | Updated setUp function to initialize PSA crypto for AES operations when mbedtls 4.x is enabled |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thanks for raising this PR! Tested locally with following schemes and they work as expected
EDIT:
Pushed a commit to move |
21ddf89 to
7e6b372
Compare
0953dc1 to
e56ebd2
Compare
e56ebd2 to
c486cc5
Compare
Checklist
urlfield definedChange description
Please describe your change here