mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Merge pull request #4315 from Kxuan/feat-pre-compute-tls
Static initialize comb table
This commit is contained in:
@ -229,7 +229,7 @@ typedef struct mbedtls_ecp_group
|
||||
int (*t_post)(mbedtls_ecp_point *, void *); /*!< Unused. */
|
||||
void *t_data; /*!< Unused. */
|
||||
mbedtls_ecp_point *T; /*!< Pre-computed points for ecp_mul_comb(). */
|
||||
size_t T_size; /*!< The number of pre-computed points. */
|
||||
size_t T_size; /*!< The number of dynamic allocated pre-computed points. */
|
||||
}
|
||||
mbedtls_ecp_group;
|
||||
|
||||
@ -276,15 +276,16 @@ mbedtls_ecp_group;
|
||||
|
||||
#if !defined(MBEDTLS_ECP_FIXED_POINT_OPTIM)
|
||||
/*
|
||||
* Trade memory 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
|
||||
* multiplication in ECDSA signatures, and half of the multiplications in
|
||||
* ECDSA verification and ECDHE) by a factor roughly 3 to 4.
|
||||
*
|
||||
* The cost is increasing EC peak memory 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 peak memory usage.
|
||||
* Change this value to 0 to reduce code size.
|
||||
*/
|
||||
#define MBEDTLS_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up. */
|
||||
#endif /* MBEDTLS_ECP_FIXED_POINT_OPTIM */
|
||||
|
Reference in New Issue
Block a user