From 71503c0e7d69f55419ad9db770a41f84c22175ca Mon Sep 17 00:00:00 2001 From: Ingo Franzki Date: Tue, 30 Jun 2026 14:51:55 +0200 Subject: [PATCH] libseckey: Fix wrong RSA public exponent value 257 assignment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Array element key_value_structure.public_exponent[0] is written twice, but key_value_structure.public_exponent[1] is not set, leading to a wrong public exponent value (i.e. 0x01) in the key value structure. CCA key generation will fail is this case. Assisted-by: IBM Bob:2.0.0 Signed-off-by: Ingo Franzki Reviewed-by: Finn Callies Signed-off-by: Jan Höppner --- libseckey/sk_cca.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libseckey/sk_cca.c b/libseckey/sk_cca.c index 14a260e1..96f0fe12 100644 --- a/libseckey/sk_cca.c +++ b/libseckey/sk_cca.c @@ -463,7 +463,7 @@ int SK_CCA_generate_rsa_key_pair(const struct sk_ext_cca_lib *cca_lib, case 257: key_value_structure.public_exp_length = 2; key_value_structure.public_exponent[0] = 0x01; - key_value_structure.public_exponent[0] = 0x01; + key_value_structure.public_exponent[1] = 0x01; break; case 65537: key_value_structure.public_exp_length = 3;