-
Notifications
You must be signed in to change notification settings - Fork 573
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
Implementation of GCM AES #6334
base: master
Are you sure you want to change the base?
Conversation
dec.data_len = 16; | ||
|
||
ST_EXPECT_EQ(SECLINK_OK, sl_set_key(g_hnd, HAL_KEY_AES_128, ST_AES_ENC_KEY_IDX, &aes_key, NULL)); | ||
ST_EXPECT_EQ(SECLINK_OK, sl_gcm_encrypt(g_hnd, &dec, ¶m, ST_AES_ENC_KEY_IDX, &enc)); |
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.
Hello @ZhenBei-Sin
I tested with this tesetcode, but I got error while calling sl_gcm_encrypt
.
[ RUN ] gcm_aes repeat: 1
keymgr request cmd(2580) (0) key(32) isempty(1)
hal_result_e : 0
hal_result_e : 255
security level: 0
===========================================================
Assertion details
===========================================================
print_assert_detail: Assertion Failed CPU0 at file: src/seclink/seclink.c line 130 task: sl_test pid: 20
print_assert_detail: Assert location (PC) : 0x0e179d83
check_assert_location: Code asserted in normal thread!
The location if assert is below.
https://github.com/Samsung/TizenRT/blob/master/framework/src/seclink/seclink.c#L129
When sl_gcm_encrypt called, it returns 255, not the defined value in res_table.
Would you please kindly let me know what I set wrong?
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.
Hi @jylee9613
In this PR was missing the secure bl32.bin. (This image contains the SE API which support AES GCM mode).
Thank You.
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.
OMG...Thank you for checking:)
I confirmed AES GCM runs properly in AIDual.
I'll also check with TP1x, and let you know the result.
Thank you
d477a42
to
355e0f6
Compare
Support GCM mode for RTL8721CSM
There is a hang when enable all below configs ``` CONFIG_DEBUG_WARN=y CONFIG_DEBUG_VERBOSE=y CONFIG_DEBUG_SECURE_ELEMENT_ERROR=y CONFIG_DEBUG_SECURE_ELEMENT_INFO=y ``` To avoid this hang, this commit changes vdbg to dbg.
a0eaa87
to
efc5c60
Compare
Add GCM mode in seclink and security - sl_gcm_encrypt / sl_gcm_decrypt - crypto_gcm_encryption / crypto_gcm_decryption Signed-off-by: Jaeyong Lee <jaeyong1.lee@samsung.com>
Add UTC and examples of GCM API Keys should be generated before encryption/decryption. Factory key is not available in GCM mode. 1) sl_crypto_test - Example of sl_gcm_encrypt / sl_gcm_decrypt 2) utc_crypto - UTC of crypto_gcm_encryption / crypto_gcm_decryption Signed-off-by: Jaeyong Lee <jaeyong1.lee@samsung.com>
efc5c60
to
32bfdc7
Compare
Implementation of GCM mode