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

xtest: asymm signature with a too small buffer (regression 4006/4016 + pkcs11 1025) #765

Merged
merged 3 commits into from
Dec 5, 2024

Conversation

etienne-lms
Copy link
Contributor

Following the issue reported and fixed by OP-TEE/optee_os#7162, I add some tests to request asymmetric signature providing a too small signature output buffer.
Tested with both CFG_CRYPTOLIB_NAME={tomcrypt|mbedtls}`.

Changes in regression_4006 covers the RSA/ECC cases, already handled in OP-TEE even before tag 4.4.0.
Changes in regresison_4016 and pkcs11_1025 covers the ED25519 cases and require OP-TEE/optee_os#7162 (recently merged) to succeed.

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.

Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

Test that providing a too small signature output buffer makes the
GP TEE Internal Core API to return TEE_ERROR_SHORT_BUFFER as expected.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Test that providing a too small signature output buffer for an
ED25519 signature makes the GP TEE Internal Core API to return
TEE_ERROR_SHORT_BUFFER as expected and that providing a bigger
buffer returns the expected signature size.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Test that providing a too small signature output buffer for an
ED25519 sign operation makes the Cryptoki API function to return
CKR_OK (nul size case) or CKR_BUFFER_TOO_SMALL (non-nul too small size)
as expected and that providing a bigger buffer returns the expected
signature size.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
@etienne-lms
Copy link
Contributor Author

Thanks. Review tag applied.

@jforissier jforissier merged commit d5278b6 into OP-TEE:master Dec 5, 2024
1 check passed
@etienne-lms etienne-lms deleted the sign-small-buffer branch December 12, 2024 17:18
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