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: regression 4006: Test RSA-OAEP with a different MGF1 hash #738

Merged
merged 1 commit into from
May 13, 2024

Conversation

samitolvanen
Copy link
Contributor

Add tests for TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA256 with SHA-1 as the MGF1 hash.

Depends on OP-TEE/optee_os#6779. Note that this fails (as expected) with mbedtls.

@jforissier
Copy link
Contributor

Note that this fails (as expected) with mbedtls.

We need to have this as a separate test case (for example, regression_4006_1) so that it can be excluded from the run when MbedTLS is used as the core crypto lib:

make -j$(nproc) check CFG_CRYPTOLIB_NAME=mbedtls CFG_CRYPTOLIB_DIR=lib/libmbedtls XTEST_ARGS="-t regression -x regression_4006_1"

@jenswi-linaro
Copy link
Contributor

Note that this fails (as expected) with mbedtls.

We need to have this as a separate test case (for example, regression_4006_1) so that it can be excluded from the run when MbedTLS is used as the core crypto lib:

make -j$(nproc) check CFG_CRYPTOLIB_NAME=mbedtls CFG_CRYPTOLIB_DIR=lib/libmbedtls XTEST_ARGS="-t regression -x regression_4006_1"

Another option is to accept the TEE_ERROR_NOT_SUPPORTED error as a valid response (and skip the subtest) when TEE_ATTR_RSA_OAEP_MGF_HASH doesn't match the internal hash algorithm.

@jforissier
Copy link
Contributor

@jenswi-linaro that would work with me

@samitolvanen
Copy link
Contributor Author

Another option is to accept the TEE_ERROR_NOT_SUPPORTED error as a valid response (and skip the subtest) when TEE_ATTR_RSA_OAEP_MGF_HASH doesn't match the internal hash algorithm.

Alright, I decided to go with this option. PTAL.

@jforissier
Copy link
Contributor

Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (vexpress-qemu_armv8a)

@jenswi-linaro
Copy link
Contributor

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

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.

Acked-by: Etienne Carriere <etienne.carriere@foss.st.com> with comments addressed or not.

host/xtest/regression_4000.c Outdated Show resolved Hide resolved
host/xtest/regression_4000.c Outdated Show resolved Hide resolved
Add tests for TEE_ALG_RSAES_PKCS1_OAEP_MGF1_SHA256 with SHA-1 as
the MGF1 hash.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (vexpress-qemu_armv8a)
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
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 pull request at any time.

@github-actions github-actions bot added the Stale label May 13, 2024
@jforissier jforissier merged commit f3e46d4 into OP-TEE:master May 13, 2024
1 check passed
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.

4 participants