-
Notifications
You must be signed in to change notification settings - Fork 122
feat(libsodium): add support for PSA crypto APIs #656
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 Results40 files 40 suites 4m 2s ⏱️ For more details on these errors, see this check. Results for commit 3b7df17. ♻️ This comment has been updated with latest results. |
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 PR adds support for PSA crypto APIs to the libsodium component, enabling compatibility with mbedTLS 4.x. The implementation provides conditional compilation to maintain backward compatibility with earlier mbedTLS versions.
Key Changes:
- Add PSA crypto API implementations for SHA256 and SHA512 hash functions
- Introduce conditional compilation based on CONFIG_MBEDTLS_VER_4_X_SUPPORT flag
- Add automatic PSA crypto initialization via constructor functions
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 12 comments.
| File | Description |
|---|---|
| libsodium/port/crypto_hash_mbedtls/crypto_hash_sha512_mbedtls.c | Adds PSA crypto API support for SHA512 hashing with conditional compilation for mbedTLS 4.x |
| libsodium/port/crypto_hash_mbedtls/crypto_hash_sha256_mbedtls.c | Adds PSA crypto API support for SHA256 hashing with conditional compilation for mbedTLS 4.x |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
libsodium/port/crypto_hash_mbedtls/crypto_hash_sha512_mbedtls.c
Outdated
Show resolved
Hide resolved
libsodium/port/crypto_hash_mbedtls/crypto_hash_sha256_mbedtls.c
Outdated
Show resolved
Hide resolved
libsodium/port/crypto_hash_mbedtls/crypto_hash_sha512_mbedtls.c
Outdated
Show resolved
Hide resolved
libsodium/port/crypto_hash_mbedtls/crypto_hash_sha256_mbedtls.c
Outdated
Show resolved
Hide resolved
libsodium/port/crypto_hash_mbedtls/crypto_hash_sha512_mbedtls.c
Outdated
Show resolved
Hide resolved
libsodium/port/crypto_hash_mbedtls/crypto_hash_sha256_mbedtls.c
Outdated
Show resolved
Hide resolved
libsodium/port/crypto_hash_mbedtls/crypto_hash_sha512_mbedtls.c
Outdated
Show resolved
Hide resolved
libsodium/port/crypto_hash_mbedtls/crypto_hash_sha256_mbedtls.c
Outdated
Show resolved
Hide resolved
eb843d6 to
c31079d
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
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
libsodium/port/crypto_hash_mbedtls/crypto_hash_sha256_mbedtls.c
Outdated
Show resolved
Hide resolved
libsodium/port/crypto_hash_mbedtls/crypto_hash_sha512_mbedtls.c
Outdated
Show resolved
Hide resolved
libsodium/port/crypto_hash_mbedtls/crypto_hash_sha512_mbedtls.c
Outdated
Show resolved
Hide resolved
libsodium/port/crypto_hash_mbedtls/crypto_hash_sha256_mbedtls.c
Outdated
Show resolved
Hide resolved
c31079d to
c45952c
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
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
libsodium/port/crypto_hash_mbedtls/crypto_hash_sha512_mbedtls.c
Outdated
Show resolved
Hide resolved
libsodium/port/crypto_hash_mbedtls/crypto_hash_sha256_mbedtls.c
Outdated
Show resolved
Hide resolved
libsodium/port/crypto_hash_mbedtls/crypto_hash_sha256_mbedtls.c
Outdated
Show resolved
Hide resolved
libsodium/port/crypto_hash_mbedtls/crypto_hash_sha512_mbedtls.c
Outdated
Show resolved
Hide resolved
c45952c to
db23a71
Compare
Ashish285
left a comment
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.
Just some minor comments regarding checking the incoming pointers. Otherwise LGTM!
db23a71 to
3b7df17
Compare
Checklist
urlfield definedChange description
Please describe your change here