From 637c04934916779377ff5fe5719461d44285b0bf Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 15 Jun 2023 19:07:41 +0200 Subject: [PATCH] Move mbedtls_ecp_modulus_type out of the public headers This is an internal detail of the ECC arithmetic implementation, only exposed for the sake of the unit tests Mbed TLS 3.4.0 was released with the type mbedtls_ecp_modulus_type defined in a public header, but without Doxygen documentation, and without any public function or data structure using it. So removing it is not an API break. Signed-off-by: Gilles Peskine --- include/mbedtls/ecp.h | 9 --------- library/ecp_invasive.h | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/mbedtls/ecp.h b/include/mbedtls/ecp.h index 9a6717d19..fc42838bd 100644 --- a/include/mbedtls/ecp.h +++ b/include/mbedtls/ecp.h @@ -141,15 +141,6 @@ typedef enum { MBEDTLS_ECP_TYPE_MONTGOMERY, /* y^2 = x^3 + a x^2 + x */ } mbedtls_ecp_curve_type; -/* - * Curve modulus types - */ -typedef enum { - MBEDTLS_ECP_MOD_NONE = 0, - MBEDTLS_ECP_MOD_COORDINATE, - MBEDTLS_ECP_MOD_SCALAR -} mbedtls_ecp_modulus_type; - /** * Curve information, for use by other modules. * diff --git a/library/ecp_invasive.h b/library/ecp_invasive.h index 587b1737d..fdd29f102 100644 --- a/library/ecp_invasive.h +++ b/library/ecp_invasive.h @@ -31,6 +31,15 @@ #include "bignum_mod.h" #include "mbedtls/ecp.h" +/* + * Curve modulus types + */ +typedef enum { + MBEDTLS_ECP_MOD_NONE = 0, + MBEDTLS_ECP_MOD_COORDINATE, + MBEDTLS_ECP_MOD_SCALAR +} mbedtls_ecp_modulus_type; + #if defined(MBEDTLS_TEST_HOOKS) && defined(MBEDTLS_ECP_LIGHT) #if defined(MBEDTLS_ECP_MONTGOMERY_ENABLED)