1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

fix comment, ChangeLog & migration-guide for MBEDTLS_ECP_FIXED_POINT_OPTIM

Signed-off-by: kXuan <kxuanobj@gmail.com>
This commit is contained in:
kXuan
2021-06-02 16:53:42 +08:00
parent 22fc906d57
commit 782c2b9f36
3 changed files with 14 additions and 10 deletions

View File

@ -1,4 +1,4 @@
API changes API changes
* The option `MBEDTLS_ECP_FIXED_POINT_OPTIM` use pre-computed comb tables * The option MBEDTLS_ECP_FIXED_POINT_OPTIM use pre-computed comb tables
instead of computing tables in runtime. Thus, this option now use more instead of computing tables in runtime. Thus, this option now increase
ROM, and it does not increase RAM usage in runtime anymore. code size, and it does not increase RAM usage in runtime anymore.

View File

@ -1,8 +1,11 @@
Change MBEDTLS_ECP_FIXED_POINT_OPTIM behaviour Change MBEDTLS_ECP_FIXED_POINT_OPTIM behaviour
------------------------------------------------------ ------------------------------------------------------
The option MBEDTLS_ECP_FIXED_POINT_OPTIM now use more ROM and does not increase The option `MBEDTLS_ECP_FIXED_POINT_OPTIM` now increase code size and it does
peak RAM usage anymore. not increase peak RAM usage anymore.
If you are limited by code size, you can define `MBEDTLS_ECP_FIXED_POINT_OPTIM`
to `0` in your config file. The impact depends on the number and size of
enabled curves. For example, for P-256 the difference is 1KB; see the documentation
of this option for details.
If you are limited by ROM space, you can define MBEDTLS_ECP_FIXED_POINT_OPTIM
to `0` in your config file. This will save about 50 KiB ROM space.

View File

@ -276,15 +276,16 @@ mbedtls_ecp_group;
#if !defined(MBEDTLS_ECP_FIXED_POINT_OPTIM) #if !defined(MBEDTLS_ECP_FIXED_POINT_OPTIM)
/* /*
* Trade ROM usage for speed on fixed-point multiplication. * Trade code size for speed on fixed-point multiplication.
* *
* This speeds up repeated multiplication of the generator (that is, the * This speeds up repeated multiplication of the generator (that is, the
* multiplication in ECDSA signatures, and half of the multiplications in * multiplication in ECDSA signatures, and half of the multiplications in
* ECDSA verification and ECDHE) by a factor roughly 3 to 4. * ECDSA verification and ECDHE) by a factor roughly 3 to 4.
* *
* The cost is increasing ROM usage by a factor roughly 2. * For each n-bit Short Weierstrass curve that is enabled, this adds 4n bytes
* of code size if n < 384 and 8n otherwise.
* *
* Change this value to 0 to reduce ROM usage. * Change this value to 0 to reduce code size.
*/ */
#define MBEDTLS_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up. */ #define MBEDTLS_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up. */
#endif /* MBEDTLS_ECP_FIXED_POINT_OPTIM */ #endif /* MBEDTLS_ECP_FIXED_POINT_OPTIM */