mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-21 21:36:21 +01:00
Cache pre-computed points for ecp_mul()
Up to 1.25 speedup on ECDSA sign for small curves, but mainly useful as a preparation for fixed-point mult (a few prototypes changed in constness).
This commit is contained in:
parent
56cd319f0e
commit
161ef968db
6 changed files with 147 additions and 47 deletions
|
|
@ -39,7 +39,7 @@
|
|||
/*
|
||||
* Generate public key: simple wrapper around ecp_gen_keypair
|
||||
*/
|
||||
int ecdh_gen_public( const ecp_group *grp, mpi *d, ecp_point *Q,
|
||||
int ecdh_gen_public( ecp_group *grp, mpi *d, ecp_point *Q,
|
||||
int (*f_rng)(void *, unsigned char *, size_t),
|
||||
void *p_rng )
|
||||
{
|
||||
|
|
@ -49,7 +49,7 @@ int ecdh_gen_public( const ecp_group *grp, mpi *d, ecp_point *Q,
|
|||
/*
|
||||
* Compute shared secret (SEC1 3.3.1)
|
||||
*/
|
||||
int ecdh_compute_shared( const ecp_group *grp, mpi *z,
|
||||
int ecdh_compute_shared( ecp_group *grp, mpi *z,
|
||||
const ecp_point *Q, const mpi *d,
|
||||
int (*f_rng)(void *, unsigned char *, size_t),
|
||||
void *p_rng )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue