ta: pkcs11: add CKM_AES_GCM key wrap/unwrap - #7864
Merged
Merged
Conversation
Contributor
Author
|
Implements #7853 |
Contributor
|
Hello @Hussainity, |
etienne-lms
reviewed
Jul 30, 2026
etienne-lms
left a comment
Contributor
There was a problem hiding this comment.
LGTM. A minor comment. Also, could you wrap lines in the commit message to 72 char/line max?
| enum pkcs11_rc rc = PKCS11_CKR_OK; | ||
| size_t final_sz = 0; | ||
| size_t update_sz = 0; | ||
| size_t required = data_sz + tee_ae_tag_size(session); |
Contributor
There was a problem hiding this comment.
I'm not fund of braces in a case instruction block. Could you move these variable to the function entry? Or alternatively implement this sequence as a local function.
Hussainity
force-pushed
the
hm/gcm-keywrap
branch
from
August 9, 2026 22:04
5be65ab to
b170b52
Compare
Contributor
Author
|
@etienne-lms , thanks for the review, I addressed your comments and confirmed against OP-TEE/optee_test#822 |
etienne-lms
reviewed
Aug 10, 2026
etienne-lms
left a comment
Contributor
There was a problem hiding this comment.
Reviewed-by: Etienne Carriere <etienne.carriere@st.com>
Permit CKM_AES_GCM in C_WrapKey/C_UnwrapKey: switch the token capability flag from CKFM_CIPHER to CKFM_CIPHER_WRAP, list the mechanism in check_created_attrs_against_processing(), and handle it in wrap_data_by_symm_enc() by driving the active AE operation and reporting plaintext+tag as the required output size. The tag length is exposed via a new tee_ae_tag_size() helper. Signed-off-by: Hussain Miyaziwala <hussain_miya@hotmail.com> Reviewed-by: Etienne Carriere <etienne.carriere@st.com>
Hussainity
force-pushed
the
hm/gcm-keywrap
branch
from
August 10, 2026 14:24
b170b52 to
a66ab8b
Compare
Contributor
Author
|
@jenswikl ready for merge |
Contributor
|
I'll merge this when the CI tests have passed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR enables using AES GCM for Key Wrapping: