From 9345c8a014c8db9de0d383d0c68a673889691aa6 Mon Sep 17 00:00:00 2001 From: Chun-Chieh Li Date: Fri, 20 May 2022 17:34:52 +0800 Subject: [PATCH] Mbed TLS: Fix wrong MPI N in ECP Curve448 curve In loading Curve448, MPI N is in uninitialized state and its sign flag N.s isn't initialized to 1. This is fixed by following: https://github.com/Mbed-TLS/mbedtls/pull/5811 --- connectivity/mbedtls/source/ecp_curves.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/connectivity/mbedtls/source/ecp_curves.c b/connectivity/mbedtls/source/ecp_curves.c index 839fb5e36e9..72dfacd9af7 100644 --- a/connectivity/mbedtls/source/ecp_curves.c +++ b/connectivity/mbedtls/source/ecp_curves.c @@ -770,6 +770,8 @@ int mbedtls_ecp_group_load( mbedtls_ecp_group *grp, mbedtls_ecp_group_id id ) ECP_VALIDATE_RET( grp != NULL ); mbedtls_ecp_group_free( grp ); + mbedtls_ecp_group_init( grp ); + grp->id = id; switch( id )