chantra / rpms / tpm2-tss

Forked from rpms/tpm2-tss 2 years ago
Clone

Blame SOURCES/0001-esys-fix-keysize-of-ECC-curve-TPM2_ECC_NISTP224.patch

28cd4a
From 76641c1e6b016979973fead7a24bb8fca4ee8325 Mon Sep 17 00:00:00 2001
28cd4a
From: Johannes Holland <johannes.holland@infineon.com>
28cd4a
Date: Thu, 26 Sep 2019 09:46:09 +0100
28cd4a
Subject: [PATCH] esys: fix keysize of ECC curve TPM2_ECC_NISTP224
28cd4a
28cd4a
In esys_crypto_ossl.c, for the ECC curve TPM2_ECC_NISTP244 a key size of
28cd4a
38 is selected. However, 224 bit / 8 bit/byte = 28 byte.
28cd4a
28cd4a
Signed-off-by: Johannes Holland <johannes.holland@infineon.com>
28cd4a
---
28cd4a
 src/tss2-esys/esys_crypto_ossl.c | 2 +-
28cd4a
 1 file changed, 1 insertion(+), 1 deletion(-)
28cd4a
28cd4a
diff --git a/src/tss2-esys/esys_crypto_ossl.c b/src/tss2-esys/esys_crypto_ossl.c
28cd4a
index 124501964ae7..3c5d86d69705 100644
28cd4a
--- a/src/tss2-esys/esys_crypto_ossl.c
28cd4a
+++ b/src/tss2-esys/esys_crypto_ossl.c
28cd4a
@@ -804,7 +804,7 @@ iesys_cryptossl_get_ecdh_point(TPM2B_PUBLIC *key,
28cd4a
         break;
28cd4a
     case TPM2_ECC_NIST_P224:
28cd4a
         curveId = NID_secp224r1;
28cd4a
-        key_size = 38;
28cd4a
+        key_size = 28;
28cd4a
         break;
28cd4a
     case TPM2_ECC_NIST_P256:
28cd4a
         curveId = NID_X9_62_prime256v1;
28cd4a
-- 
28cd4a
2.27.0
28cd4a