From 0395de165be7e9b2e455f23bc7364e99d3ddc684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 12 May 2026 11:32:13 +0200 Subject: [PATCH] bignum: update comment about users of bignum_core MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Manuel Pégourié-Gonnard --- library/bignum_core.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/library/bignum_core.h b/library/bignum_core.h index f044b33f93..e612ee9288 100644 --- a/library/bignum_core.h +++ b/library/bignum_core.h @@ -4,7 +4,13 @@ * This interface should only be used by the legacy bignum module (bignum.h) * and the modular bignum modules (bignum_mod.c, bignum_mod_raw.c). All other * modules should use the high-level modular bignum interface (bignum_mod.h) - * or the legacy bignum interface (bignum.h). + * or the legacy bignum interface (bignum.h). The only exceptions are: + * 1. In ecp_curves.c, some mbedtls_ecp_mod_pXXX_raw() functions are using + * bignum_core functions. That's because those functions are implementing a + * part of bignum_mod: the optimized reduction in mbedtls_mpi_mod_modulus. + * 2. In ecp.c, ecp_modp() is currently using bignum_core, while the rest of + * the module is using legacy bignum. That's transitional; eventually ecp.c is + * going to use bignum_mod_raw. * * This module is about processing non-negative integers with a fixed upper * bound that's of the form 2^n-1 where n is a multiple of #biL.