Skip to content

Conversation

@Akshay-Belsare
Copy link

  • Introduced a new example utilizing the TEE_ALG_ECDH_DERIVE_SHARED_SECRET algorithm.
  • This example demonstrates how to establish a shared secret using Elliptic Curve Diffie-Hellman (ECDH).
  • Provides a reference for secure key exchange and cryptographic operations with ECDH in OP-TEE.

- Introduced a new example utilizing the
TEE_ALG_ECDH_DERIVE_SHARED_SECRET algorithm.
- This example demonstrates how to establish a shared secret using
Elliptic Curve Diffie-Hellman (ECDH).
- Provides a reference for secure key exchange and cryptographic
operations with ECDH in OP-TEE.

Signed-off-by: Amey Avinash Raghatate <[email protected]>
Update ecdh TA as per the review comments.

Signed-off-by: Amey Avinash Raghatate <[email protected]>
Update ecdh TA as per the review comments

Signed-off-by: Amey Avinash Raghatate <[email protected]>
Akshay-Belsare pushed a commit to Xilinx/optee_examples that referenced this pull request Sep 29, 2025
- Introduced a new example utilizing the
TEE_ALG_ECDH_DERIVE_SHARED_SECRET algorithm.
- This example demonstrates how to establish a shared secret using
Elliptic Curve Diffie-Hellman (ECDH).
- Provides a reference for secure key exchange and cryptographic
operations with ECDH in OP-TEE.

Signed-off-by: Amey Avinash Raghatate <[email protected]>
State: waiting
Link: linaro-swg#135
Copy link
Contributor

@etienne-lms etienne-lms left a comment

Choose a reason for hiding this comment

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

Sorry for the late feedback.

Update param type for the function cmd_ecdh_selftest.
Update ecdh TA and Host as per review comments.

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

@etienne-lms could you please have a look at this. Thanks!

Comment on lines +33 to +35
#define ECDH_MAX_BITS 521
#define ECDH_MAX_BYTES ((ECDH_MAX_BITS + 7) / 8)
#define ECDH_BUF_BYTES (ECDH_MAX_BYTES + 14)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think these 3 macros should not be part of the TA interface, to move to ecdh_ta.c.
They could but maybe specifying param[3].memref.buf recommended size is ECDH_BUF_BYTES but the TA API already allows CA to query the required size.
Why + 14?

@github-actions
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 Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants