mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-16 08:42:50 +00:00
Check all of the limbs of result
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
This commit is contained in:
parent
1ae7ca435b
commit
c81272461e
@ -1563,7 +1563,7 @@ void ecp_mod_mul_inv(char *input_A, int id, int ctype, int iret)
|
|||||||
mbedtls_mpi_uint *A_inverse = NULL;
|
mbedtls_mpi_uint *A_inverse = NULL;
|
||||||
mbedtls_mpi_uint *A = NULL;
|
mbedtls_mpi_uint *A = NULL;
|
||||||
mbedtls_mpi_uint *bufx = NULL;
|
mbedtls_mpi_uint *bufx = NULL;
|
||||||
const mbedtls_mpi_uint one = 1;
|
const mbedtls_mpi_uint one[2] = {1, 0};
|
||||||
|
|
||||||
((void) iret);
|
((void) iret);
|
||||||
|
|
||||||
@ -1592,7 +1592,7 @@ void ecp_mod_mul_inv(char *input_A, int id, int ctype, int iret)
|
|||||||
TEST_EQUAL(mbedtls_mpi_mod_write(&rX, &m, (unsigned char *) bufx,
|
TEST_EQUAL(mbedtls_mpi_mod_write(&rX, &m, (unsigned char *) bufx,
|
||||||
limbs * sizeof(mbedtls_mpi_uint),
|
limbs * sizeof(mbedtls_mpi_uint),
|
||||||
MBEDTLS_MPI_MOD_EXT_REP_LE), 0);
|
MBEDTLS_MPI_MOD_EXT_REP_LE), 0);
|
||||||
TEST_EQUAL(memcmp(bufx, &one, sizeof(mbedtls_mpi_uint)), 0);
|
TEST_EQUAL(memcmp(bufx, one, sizeof(one)), 0);
|
||||||
|
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user