Skip to content

Conversation

Akshay-Belsare
Copy link

Add new example demonstrating ECDSA algorithms:

  • TEE_ALG_ECDSA_SHA1
  • TEE_ALG_ECDSA_SHA224
  • TEE_ALG_ECDSA_SHA256
  • TEE_ALG_ECDSA_SHA384
  • TEE_ALG_ECDSA_SHA512
  • Allows users to select algorithm at runtime via: optee_example_ecdsa <algo>
  • Defaults to TA_ALG_ECDSA_SHA256 if no algorithm is specified
  • The selected algorithm is used for ECDSA operations

Add new example demonstrating ECDSA algorithms:
  - TEE_ALG_ECDSA_SHA1
  - TEE_ALG_ECDSA_SHA224
  - TEE_ALG_ECDSA_SHA256
  - TEE_ALG_ECDSA_SHA384
  - TEE_ALG_ECDSA_SHA512
- Allows users to select algorithm at runtime via:
  `optee_example_ecdsa <algo>`
- Defaults to TA_ALG_ECDSA_SHA256 if no algorithm is specified
- The selected algorithm is used for ECDSA operations

Signed-off-by: Amey Avinash Raghatate <[email protected]>
Copy link

This pull request has been marked as a stale pull request because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this pull request will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time.

@github-actions github-actions bot added the Stale label Sep 25, 2025
@Akshay-Belsare
Copy link
Author

@etienne-lms @jenswi-linaro
Please consider this change for review at your earliest convenience.
Thanks!

{
switch (param) {
case TA_ALG_ECDSA_SHA1:
*algo_id = TEE_ALG_ECDSA_SHA1;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer the client to provide this value directly to avoid translating it again. The algorithm values are defined in a GP standard, so they are "well known" and shouldn't change.

if (param_types != exp_param_types)
return TEE_ERROR_BAD_PARAMETERS;

TEE_Result res;
Copy link
Contributor

Choose a reason for hiding this comment

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

TEE_PARAM_TYPE_NONE,
TEE_PARAM_TYPE_NONE,
TEE_PARAM_TYPE_NONE);
if (param_types != exp_param_types)
Copy link
Contributor

Choose a reason for hiding this comment

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

Variables are declared first in a block, before the code.

sess->keypair = TEE_HANDLE_NULL;
sess->public_key = TEE_HANDLE_NULL;

(void)param_types;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use the __unused attribute on param_types above instead, same for params.

@github-actions github-actions bot removed the Stale label Sep 26, 2025
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