mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
@ -1628,7 +1628,7 @@ int mbedtls_mpi_exp_mod(mbedtls_mpi *X, const mbedtls_mpi *A,
|
|||||||
* Allocate working memory for mbedtls_mpi_core_exp_mod()
|
* Allocate working memory for mbedtls_mpi_core_exp_mod()
|
||||||
*/
|
*/
|
||||||
size_t T_limbs = mbedtls_mpi_core_exp_mod_working_limbs(N->n, E->n);
|
size_t T_limbs = mbedtls_mpi_core_exp_mod_working_limbs(N->n, E->n);
|
||||||
mbedtls_mpi_uint *T = (mbedtls_mpi_uint*) mbedtls_calloc(T_limbs, sizeof(mbedtls_mpi_uint));
|
mbedtls_mpi_uint *T = (mbedtls_mpi_uint *) mbedtls_calloc(T_limbs, sizeof(mbedtls_mpi_uint));
|
||||||
if (T == NULL) {
|
if (T == NULL) {
|
||||||
return MBEDTLS_ERR_MPI_ALLOC_FAILED;
|
return MBEDTLS_ERR_MPI_ALLOC_FAILED;
|
||||||
}
|
}
|
||||||
|
@ -967,8 +967,8 @@ exit:
|
|||||||
|
|
||||||
/* BEGIN_CASE */
|
/* BEGIN_CASE */
|
||||||
void mpi_exp_mod_min_RR(char *input_A, char *input_E,
|
void mpi_exp_mod_min_RR(char *input_A, char *input_E,
|
||||||
char *input_N, char *input_X,
|
char *input_N, char *input_X,
|
||||||
int exp_result)
|
int exp_result)
|
||||||
{
|
{
|
||||||
mbedtls_mpi A, E, N, RR, Z, X;
|
mbedtls_mpi A, E, N, RR, Z, X;
|
||||||
int res;
|
int res;
|
||||||
|
Reference in New Issue
Block a user