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
1 changed files with 20 additions and 0 deletions
|
@ -532,6 +532,26 @@ exit:
|
|||
}
|
||||
/* 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 */
|
||||
void mpi_core_add_and_add_if(char *input_A, char *input_B,
|
||||
char *input_S, int carry)
|
||||
|
|
Loading…
Reference in a new issue