mbedtls/tests
Jaeden Amero c17f29309f psa: Support RSA signature without MBEDTLS_GENPRIME
On space-constrained platforms, it is a useful configuration to be able
to import/export and perform RSA key pair operations, but to exclude RSA
key generation, potentially saving flash space. It is not possible to
express this with the PSA_WANT_ configuration system at the present
time. However, in previous versions of Mbed TLS (v2.24.0 and earlier) it
was possible to configure a software PSA implementation which was
capable of making RSA signatures but not capable of generating RSA keys.
To do this, one unset MBEDTLS_GENPRIME.

Since the addition of MBEDTLS_PSA_BUILTIN_KEY_TYPE_RSA_KEY_PAIR, this
expressivity was lost. Expressing that you wanted to work with RSA key
pairs forced you to include the ability to generate key pairs as well.

Change psa_crypto_rsa.c to only call mbedtls_rsa_gen_key() if
MBEDTLS_GENPRIME is also set. This restores the configuration behavior
present in Mbed TLS v2.24.0 and earlier versions.

It left as a future exercise to add the ability to PSA to be able to
express a desire for a software or accelerator configuration that
includes RSA key pair operations, like signature, but excludes key pair
generation.

Without this change, linker errors will occur when attempts to call,
which doesn't exist when MBEDTLS_GENPRIME is unset.
    psa_crypto_rsa.c.obj: in function `rsa_generate_key':
    psa_crypto_rsa.c:320: undefined reference to `mbedtls_rsa_gen_key'

Fixes #4512

Signed-off-by: Jaeden Amero <jaeden.amero@arm.com>
2021-05-21 10:21:27 +01:00
..
.jenkins Add a Jenkinsfile for PR job testing 2018-10-19 16:41:54 +01:00
configs Update copyright notices to use Linux Foundation guidance 2020-08-19 10:35:41 +02:00
data_files More precise testing of dhm_min_len 2021-04-01 14:18:31 +02:00
docker/bionic Update copyright notices to use Linux Foundation guidance 2020-08-19 10:35:41 +02:00
git-scripts Update copyright notices to use Linux Foundation guidance 2020-08-19 10:35:41 +02:00
include/test Merge pull request #4357 from gabor-mezei-arm/3267_Implement_psa_sign_message_and_verify 2021-05-17 10:14:46 +02:00
scripts psa: Support RSA signature without MBEDTLS_GENPRIME 2021-05-21 10:21:27 +01:00
src Merge pull request #4357 from gabor-mezei-arm/3267_Implement_psa_sign_message_and_verify 2021-05-17 10:14:46 +02:00
suites psa: Add missing RSA test dependency 2021-05-21 10:20:41 +01:00
.gitignore Apply feedback from PR review 2020-09-07 14:01:52 +02:00
CMakeLists.txt MPS Reader Tests: Test basic feed-get-commit-reclaim cycle 2021-03-29 14:19:32 +01:00
compat-in-docker.sh Update copyright notices to use Linux Foundation guidance 2020-08-19 10:35:41 +02:00
compat.sh Fix SSL tests scripts with recent OpenSSL server with Diffie-Hellman 2021-04-01 14:06:41 +02:00
context-info.sh Merge pull request #3614 from gilles-peskine-arm/ssl-opt-gnutls-printf-development 2020-11-04 17:55:42 +01:00
Descriptions.txt Revert "Remove tests that depend on TLS or X.509" 2020-03-19 14:17:54 +01:00
make-in-docker.sh Update copyright notices to use Linux Foundation guidance 2020-08-19 10:35:41 +02:00
Makefile Use Python 3 instead of Python 2 to generate test files 2021-04-22 00:25:09 +02:00
ssl-opt-in-docker.sh Update copyright notices to use Linux Foundation guidance 2020-08-19 10:35:41 +02:00
ssl-opt.sh Merge pull request #4289 from gilles-peskine-arm/openssl-dhparam-robustness-development 2021-05-21 10:16:18 +02:00