Skip to content
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

libutee: add TEE_ALG_ECDSA_RAW #7250

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

etienne-lms
Copy link
Contributor

Add GP TEE Internal Core API extension algorithm ID TEE_ALG_ECDSA_RAW for ECDSA signature computation and verification operations when the digest algorithm is not specified. This algorithm ID is supported upon build configuration switch CFG_CRYPTO_ECDSA_NOHASH.

Remove specific management of TEE_ALG_RSASSA_PKCS1_V1_5 in
TEE_AllocateOperation() when getting the operation class since
TEE_ALG_GET_CLASS() already handle this specific algorithm.

By the way, remove few use of TEE_ALG_GET_CLASS() where the
algorithm class was already available.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Add an assertion in __tee_alg_get_class() to ensure all implementation
specific algorithm IDs (that shall have the 4 MSBits to 0xF) are
specifically handled by the routine and 0xF tag value is not returned
to the caller.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Add GP TEE Internal Core API extension algorithm ID TEE_ALG_ECDSA_RAW
for ECDSA signature computation and verification operations when the
digest algorithm is not specified. This algorithm ID is supported
upon build configuration switch CFG_CRYPTO_ECDSA_NOHASH.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Copy link
Contributor

@jenswi-linaro jenswi-linaro left a comment

Choose a reason for hiding this comment

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

This feature is summarized as either "RAW" or "NOHASH", can we pick only one?

@@ -78,6 +79,9 @@ static inline uint32_t __tee_alg_get_class(uint32_t algo)
if (algo == TEE_ALG_RSAES_PKCS1_OAEP_MGF1_MD5)
return TEE_OPERATION_ASYMMETRIC_CIPHER;

/* Implementation defined algorithm IDs must be specifically handled */
assert(((algo >> 28) & 0xF) != 0xF);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we return __TEE_OPERATION_UNDEFINED (with the value 0) or such instead of asserting?

Copy link

github-actions bot commented Mar 3, 2025

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 Mar 3, 2025
@etienne-lms
Copy link
Contributor Author

Please keep alive. I'll work back on this topic soon...

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.

2 participants