From 97803abd2a85eae144bfdba63229ce0d2e308266 Mon Sep 17 00:00:00 2001 From: Gabor Mezei Date: Mon, 6 Mar 2023 16:17:02 +0100 Subject: [PATCH] Update comment Signed-off-by: Gabor Mezei --- library/ecp_curves.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/ecp_curves.c b/library/ecp_curves.c index 8f79880b88..d0d00e3679 100644 --- a/library/ecp_curves.c +++ b/library/ecp_curves.c @@ -5080,7 +5080,7 @@ int mbedtls_ecp_mod_p224_raw(mbedtls_mpi_uint *X, size_t X_limbs) RESET; /* Use 2^224 = P + 2^96 - 1 to modulo reduce the final carry */ - SUB_LAST; NEXT; // A0 += -last_c + SUB_LAST; NEXT; // A0 -= last_c ; NEXT; // A1 ; NEXT; // A2 ADD_LAST; NEXT; // A3 += last_c @@ -5088,6 +5088,9 @@ int mbedtls_ecp_mod_p224_raw(mbedtls_mpi_uint *X, size_t X_limbs) ; NEXT; // A5 // A6 + /* The carry reduction cannot generate a carry + * (see commit 73e8553 for details)*/ + LAST; return 0;