Skip to content

aes: add support for CCM and GCM algorithms #129

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Akshay-Belsare
Copy link

Add support for two new AES algorithms:

  • TEE_ALG_AES_CCM
  • TEE_ALG_AES_GCM

The user can now invoke:
optee_example_aes

Supported values for are:

  • TA_AES_ALGO_CCM
  • TA_AES_ALGO_GCM

Add support for two new AES algorithms:
- TEE_ALG_AES_CCM
- TEE_ALG_AES_GCM

The user can now invoke:
optee_example_aes <algo>

Supported values for <algo> are:
- TA_AES_ALGO_CCM
- TA_AES_ALGO_GCM

Signed-off-by: Amey Avinash Raghatate <[email protected]>
op.params[1].tmpref.buffer = out_buf;
op.params[1].tmpref.size = *out_sz;

op.params[2].value.a = encrypt ? 1 : 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the ternary operator needed?


op.params[2].value.a = encrypt ? 1 : 0;

op.params[3].tmpref.buffer = (void *)tag;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tag is already a void pointer.

@@ -362,6 +368,99 @@ static TEE_Result cipher_buffer(void *session, uint32_t param_types,
params[1].memref.buffer, &params[1].memref.size);
}

static TEE_Result auth_aes_op(void *session, uint32_t param_types, TEE_Param params[4])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't auth_enc_op make more sense?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants