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>
diff --git a/library/bignum_mod.h b/library/bignum_mod.h
index 60966cc..87ee015 100644
--- a/library/bignum_mod.h
+++ b/library/bignum_mod.h
@@ -125,7 +125,8 @@
} 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_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.
*