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

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