cryptocb: add AES CryptoCB key import support and tests#9658
cryptocb: add AES CryptoCB key import support and tests#9658douzzer merged 1 commit intowolfSSL:masterfrom
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.
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.
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.
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.