-
Notifications
You must be signed in to change notification settings - Fork 921
cryptocb: add AES CryptoCB key import support and tests #9658
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
|
🛟 Devin Lifeguard found 2 likely issues in this PR
@sameehj |
|
retest this please |
b3bcd1c to
fd6d469
Compare
julek-wolfssl
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.
I see "proxy-key" appearing multiple times in the PR. What does it mean?
The ORIGINAL: comments should be cleaned up.
|
Is it possible to setup a gh action that tests this with wolfHSM? At the very least this new config should be added to |
be96866 to
ea7e61d
Compare
Dropped proxy-key terminology |
5e03e8f to
b02f16b
Compare
|
retest this please |
a7d4524 to
39d2c2a
Compare
|
retest this please |
ece931c to
6e377c0
Compare
douzzer
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.
this implementation looks really strong.
I left comments with reconciliation suggestions for the conflicts, and a comment on a stray linefeed that snuck in. otherwise, LGTM!
Add CryptoCB-based AES key import support to enable Secure Element offload without exposing raw AES key material to wolfCrypt. When WOLF_CRYPTO_CB_AES_SETKEY is defined, wolfCrypt invokes a CryptoCB callback during AES key setup. Behavior is determined by the callback return value: - If callback returns 0: Key is imported to the device (aes->devCtx). Key is NOT copied to wolfCrypt RAM; GCM H/M tables are NOT generated. Full hardware offload is assumed. - If callback returns CRYPTOCB_UNAVAILABLE: Device does not support SetKey. Normal software path is used; key is copied to devKey for optional encrypt/decrypt acceleration. - Any other error: Propagated to the caller. Key points: - Add wc_CryptoCb_AesSetKey() callback for AES key import - Update AES SetKey paths to call CryptoCB and branch on return value - Skip GCM H/M table generation when callback succeeded (devCtx set) - Preserve existing behavior when devId is INVALID_DEVID or WOLF_CRYPTO_CB_AES_SETKEY is not defined Testing: - Add unit test for CryptoCB AES SetKey (verifies key isolation when callback succeeds) - Add end-to-end AES-GCM offload test (SetKey, Encrypt, Decrypt, Free via CryptoCB) - Tests use a mock SE with software AES to validate routing Enable with: CPPFLAGS="-DWOLF_CRYPTO_CB_AES_SETKEY -DWOLF_CRYPTO_CB_FREE" Signed-off-by: Sameeh Jubran <sameeh@wolfssl.com>
|
retest this please |
douzzer
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.
wolfssl-multi-test.sh ... pr-check:
final tally for 425dc1372d with build env c2c7829175: all 51 selected checks succeeded.
Uh oh!
There was an error while loading. Please reload this page.