mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-12-24 17:41:01 +03:00
ecp_curves: Updated the optimised reduction function pointer.
This patch modifies the `mbedtls_mpi_opt_red_struct` to use an mpi_uint * pointer and size_t limps arguments. The methods interacting with this pointer have been updated accordingly: - mbedtls_mpi_mod_optred_modulus_setup - mbedtls_ecp_modulus_setup Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
@@ -125,7 +125,8 @@ typedef struct {
|
||||
} mbedtls_mpi_mont_struct;
|
||||
|
||||
typedef struct {
|
||||
int (*modp)(mbedtls_mpi *); /* The optimised reduction function pointer */
|
||||
int (*modp)(mbedtls_mpi_uint *X,
|
||||
size_t X_limbs); /* The optimised reduction function pointer */
|
||||
} mbedtls_mpi_opt_red_struct;
|
||||
|
||||
typedef struct {
|
||||
@@ -222,7 +223,8 @@ int mbedtls_mpi_mod_modulus_setup(mbedtls_mpi_mod_modulus *N,
|
||||
int mbedtls_mpi_mod_optred_modulus_setup(mbedtls_mpi_mod_modulus *N,
|
||||
const mbedtls_mpi_uint *p,
|
||||
size_t p_limbs,
|
||||
int (*modp)(mbedtls_mpi *));
|
||||
int (*modp)(mbedtls_mpi_uint *X,
|
||||
size_t X_limbs));
|
||||
|
||||
/** Free elements of a modulus structure.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user