diff options
| author | Quentin Schulz <[email protected]> | 2025-10-31 18:08:23 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-11-11 14:53:25 -0600 |
| commit | 360dd89b361dde2a0bbad65763538e1eea7d3c94 (patch) | |
| tree | ec9e2a1c54b887b1ccb013bf6132aab844576b66 /lib | |
| parent | 973019000c2734ae560e5f4f5a58c9cdf85cffbb (diff) | |
rsa: rename FIT_RSASSA_PSS to RSASSA_PSS and move symbols under lib/rsa
This renames FIT_RSASSA_PSS symbols to drop the FIT_ prefix to avoid
potential confusion since there's nothing FIT specific to those symbols.
It also isn't really related to booting, so boot/Kconfig is an odd place
for them to live. Since they make sense only in relation with RSA,
simply move them to lib/rsa where it makes more sense for them to
reside.
Signed-off-by: Quentin Schulz <[email protected]>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/rsa/Kconfig | 14 | ||||
| -rw-r--r-- | lib/rsa/rsa-sign.c | 2 | ||||
| -rw-r--r-- | lib/rsa/rsa-verify.c | 2 |
3 files changed, 16 insertions, 2 deletions
diff --git a/lib/rsa/Kconfig b/lib/rsa/Kconfig index 9033384e60a..904eafa9441 100644 --- a/lib/rsa/Kconfig +++ b/lib/rsa/Kconfig @@ -67,6 +67,20 @@ config SPL_RSA_VERIFY_WITH_PKEY key properties will be calculated on the fly in verification code in the SPL. +config RSASSA_PSS + bool "Support rsassa-pss signature scheme" + depends on RSA_VERIFY + help + Enable this to support the pss padding algorithm as described + in the rfc8017 (https://tools.ietf.org/html/rfc8017). + +config SPL_RSASSA_PSS + bool "Support rsassa-pss signature scheme within SPL" + depends on SPL_RSA_VERIFY + help + Enable this to support the pss padding algorithm as described + in the rfc8017 (https://tools.ietf.org/html/rfc8017) within SPL. + config RSA_SOFTWARE_EXP bool "Enable driver for RSA Modular Exponentiation in software" depends on DM diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c index 92b9d7876e5..0e38c9e802f 100644 --- a/lib/rsa/rsa-sign.c +++ b/lib/rsa/rsa-sign.c @@ -421,7 +421,7 @@ static int rsa_sign_with_key(EVP_PKEY *pkey, struct padding_algo *padding_algo, goto err_sign; } - if (CONFIG_IS_ENABLED(FIT_RSASSA_PSS) && padding_algo && + if (CONFIG_IS_ENABLED(RSASSA_PSS) && padding_algo && !strcmp(padding_algo->name, "pss")) { if (EVP_PKEY_CTX_set_rsa_padding(ckey, RSA_PKCS1_PSS_PADDING) <= 0) { diff --git a/lib/rsa/rsa-verify.c b/lib/rsa/rsa-verify.c index b65fbe44007..0d618f15ea9 100644 --- a/lib/rsa/rsa-verify.c +++ b/lib/rsa/rsa-verify.c @@ -89,7 +89,7 @@ U_BOOT_PADDING_ALGO(pkcs_15) = { }; #endif -#if CONFIG_IS_ENABLED(FIT_RSASSA_PSS) +#if CONFIG_IS_ENABLED(RSASSA_PSS) static void u32_i2osp(uint32_t val, uint8_t *buf) { buf[0] = (uint8_t)((val >> 24) & 0xff); |
