mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2026-04-04 14:08:39 +00:00
static initialize comb table
MBEDTLS_ECP_FIXED_POINT_OPTIM aims to speed up ecc multiplication performance. We compute the comb table in runtime now. It is a costly operation. This patch add a pre-computed table to initialize well-known curves. It speed up ECDSA signature verify process in runtime by using more ROM size. Signed-off-by: kXuan <kxuanobj@gmail.com>
This commit is contained in:
parent
6d84e917bb
commit
ba9cb76e9f
4 changed files with 4035 additions and 27 deletions
|
|
@ -251,7 +251,11 @@ static int myrand( void *rng_state, unsigned char *output, size_t len )
|
|||
#if defined(MBEDTLS_ECP_C)
|
||||
void ecp_clear_precomputed( mbedtls_ecp_group *grp )
|
||||
{
|
||||
if( grp->T != NULL )
|
||||
if( grp->T != NULL
|
||||
#if MBEDTLS_ECP_FIXED_POINT_OPTIM == 1
|
||||
&& grp->T_size != 0
|
||||
#endif
|
||||
)
|
||||
{
|
||||
size_t i;
|
||||
for( i = 0; i < grp->T_size; i++ )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue