mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-30 00:46:22 -04:00
bignum_core_test_suite: Added mpi_core_shift_l()
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
parent
ec09e25251
commit
cfb5a5fade
@ -532,6 +532,26 @@ exit:
|
|||||||
}
|
}
|
||||||
/* END_CASE */
|
/* END_CASE */
|
||||||
|
|
||||||
|
/* BEGIN_CASE */
|
||||||
|
void mpi_core_shift_l(char *input, int count, char *result)
|
||||||
|
{
|
||||||
|
mbedtls_mpi_uint *X = NULL;
|
||||||
|
mbedtls_mpi_uint *Y = NULL;
|
||||||
|
size_t limbs, n;
|
||||||
|
|
||||||
|
TEST_EQUAL(0, mbedtls_test_read_mpi_core(&X, &limbs, input));
|
||||||
|
TEST_EQUAL(0, mbedtls_test_read_mpi_core(&Y, &n, result));
|
||||||
|
TEST_EQUAL(limbs, n);
|
||||||
|
|
||||||
|
mbedtls_mpi_core_shift_l(X, limbs, count);
|
||||||
|
ASSERT_COMPARE(X, limbs * ciL, Y, limbs * ciL);
|
||||||
|
|
||||||
|
exit:
|
||||||
|
mbedtls_free(X);
|
||||||
|
mbedtls_free(Y);
|
||||||
|
}
|
||||||
|
/* END_CASE */
|
||||||
|
|
||||||
/* BEGIN_CASE */
|
/* BEGIN_CASE */
|
||||||
void mpi_core_add_and_add_if(char *input_A, char *input_B,
|
void mpi_core_add_and_add_if(char *input_A, char *input_B,
|
||||||
char *input_S, int carry)
|
char *input_S, int carry)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user