Merge branch 'feature/support_mbedtls_ecp_fixed_point_configurable_v5.0' into 'release/v5.0'

feat(mbedtls): support ecp fixed-point multiplication configurable (backport v5.0)

See merge request espressif/esp-idf!25287
This commit is contained in:
Mahavir Jain
2023-08-10 11:44:14 +08:00
3 changed files with 25 additions and 0 deletions

View File

@ -959,6 +959,16 @@ menu "mbedTLS"
Disabling this option saves some code size.
config MBEDTLS_ECP_FIXED_POINT_OPTIM
bool "Enable fixed-point multiplication optimisations"
depends on MBEDTLS_ECP_C
default y
help
This configuration option enables optimizations to speedup (about 3 ~ 4 times) the ECP
fixed point multiplication using pre-computed tables in the flash memory.
Disabling this configuration option saves flash footprint (about 29KB if all Elliptic Curve selected)
in the application binary.
# end of Elliptic Curve options
config MBEDTLS_POLY1305_C

View File

@ -487,6 +487,19 @@
#undef MBEDTLS_ECP_NIST_OPTIM
#endif
/**
* \def MBEDTLS_ECP_FIXED_POINT_OPTIM
*
* Enable speed up fixed-point multiplication.
*
* Comment this macro to disable FIXED POINT curves optimisation.
*/
#ifdef CONFIG_MBEDTLS_ECP_FIXED_POINT_OPTIM
#define MBEDTLS_ECP_FIXED_POINT_OPTIM 1
#else
#define MBEDTLS_ECP_FIXED_POINT_OPTIM 0
#endif
/**
* \def MBEDTLS_ECDSA_DETERMINISTIC
*

View File

@ -391,6 +391,8 @@ These include:
- :ref:`CONFIG_MBEDTLS_CCM_C`
- :ref:`CONFIG_MBEDTLS_GCM_C`
- :ref:`CONFIG_MBEDTLS_ECP_C` (Alternatively: Leave this option enabled but disable some of the elliptic curves listed in the sub-menu.)
- :ref:`CONFIG_MBEDTLS_ECP_NIST_OPTIM`
- :ref:`CONFIG_MBEDTLS_ECP_FIXED_POINT_OPTIM`
- Change :ref:`CONFIG_MBEDTLS_TLS_MODE` if both server & client functionalities are not needed
- Consider disabling some ciphersuites listed in the "TLS Key Exchange Methods" sub-menu (i.e. :ref:`CONFIG_MBEDTLS_KEY_EXCHANGE_RSA`)