diff --git a/tests/suites/test_suite_mpi.data b/tests/suites/test_suite_mpi.data index 627911789..7573f95a3 100644 --- a/tests/suites/test_suite_mpi.data +++ b/tests/suites/test_suite_mpi.data @@ -594,62 +594,92 @@ mbedtls_mpi_cmp_mpi:"-1230000000000000000":"":-1 Test mbedtls_mpi_cmp_mpi: large negative < 0 (1 limb) mbedtls_mpi_cmp_mpi:"-1230000000000000000":"0":-1 -Base test mbedtls_mpi_core_lt_ct #1 -mbedtls_mpi_core_lt_ct:"02B5":"02B5":0 +mbedtls_mpi_core_lt_ct: x=y (1 limb) +mpi_core_lt_ct:"02B5":"02B5":0 -Base test mbedtls_mpi_core_lt_ct #2 -mbedtls_mpi_core_lt_ct:"02B5":"02B4":0 +mbedtls_mpi_core_lt_ct: x>y (1 limb) +mpi_core_lt_ct:"02B5":"02B4":0 -Base test mbedtls_mpi_core_lt_ct #3 -mbedtls_mpi_core_lt_ct:"02B5":"02B6":1 +mbedtls_mpi_core_lt_ct: xy (63 bit x, y first byte greater) +mpi_core_lt_ct:"7FFFFFFFFFFFFFFF":"FF":0 -Base test mbedtls_mpi_core_lt_ct (corner case - 64 bit) #2 -mbedtls_mpi_core_lt_ct:"8000000000000000":"7FFFFFFFFFFFFFFF":0 +mbedtls_mpi_core_lt_ct: xy (64 bit x, y=x-1) +mpi_core_lt_ct:"8000000000000000":"7FFFFFFFFFFFFFFF":0 -Base test mbedtls_mpi_core_lt_ct (corner case - 64 bit) #4 -mbedtls_mpi_core_lt_ct:"8000000000000000":"00":0 +mbedtls_mpi_core_lt_ct: xy (64 bit x, y=1) +mpi_core_lt_ct:"8000000000000000":"01":0 -Base test mbedtls_mpi_core_lt_ct (corner case - 32 bit) #1 -mbedtls_mpi_core_lt_ct:"7FFFFFFF":"FF":0 +mbedtls_mpi_core_lt_ct: xy (64 bit x, y=0) +mpi_core_lt_ct:"8000000000000000":"00":0 -Base test mbedtls_mpi_core_lt_ct (corner case - 32 bit) #3 -mbedtls_mpi_core_lt_ct:"80000000":"01":0 +mbedtls_mpi_core_lt_ct: xy (64 bit x, first bytes equal) +mpi_core_lt_ct:"FFFFFFFFFFFFFFFF":"FF":0 -Base test mbedtls_mpi_core_lt_ct (corner case - 32 bit) #5 -mbedtls_mpi_core_lt_ct:"FFFFFFFF":"FF":0 +mbedtls_mpi_core_lt_ct: xy (31 bit x, y first byte greater) +mpi_core_lt_ct:"7FFFFFFF":"FF":0 -Multi-limb mbedtls_mpi_core_lt_ct (X>Y, equal MS limbs) -mbedtls_mpi_core_lt_ct:"EEFFFFFFFFFFFFFFFF":"EEFFFFFFFFFFFFFFF1":0 +mbedtls_mpi_core_lt_ct: xy (32 bit x, y=x-1) +mpi_core_lt_ct:"80000000":"7FFFFFFF":0 -Multi-limb mbedtls_mpi_core_lt_ct (Alternating limbs) #1 -mbedtls_mpi_core_lt_ct:"11FFFFFFFFFFFFFFFF":"FF1111111111111111":1 +mbedtls_mpi_core_lt_ct: xy (32 bit x, y=1) +mpi_core_lt_ct:"80000000":"01":0 + +mbedtls_mpi_core_lt_ct: xy (32 bit x, y=0) +mpi_core_lt_ct:"80000000":"00":0 + +mbedtls_mpi_core_lt_ct: xy (32 bit x, first bytes equal) +mpi_core_lt_ct:"FFFFFFFF":"FF":0 + +mbedtls_mpi_core_lt_ct: xy, equal MS limbs +mpi_core_lt_ct:"EEFFFFFFFFFFFFFFFF":"EEFFFFFFFFFFFFFFF1":0 + +mbedtls_mpi_core_lt_ct: x=y (multi-limb) +mpi_core_lt_ct:"EEFFFFFFFFFFFFFFFF":"EEFFFFFFFFFFFFFFFF":0 + +mbedtls_mpi_core_lt_ct: xy (alternating limbs) +mpi_core_lt_ct:"FF1111111111111111":"11FFFFFFFFFFFFFFFF":0 Base test mbedtls_mpi_lt_mpi_ct #1 mbedtls_mpi_lt_mpi_ct:1:"2B5":1:"2B5":0:0 diff --git a/tests/suites/test_suite_mpi.function b/tests/suites/test_suite_mpi.function index b75f0f8a0..23e270b3c 100644 --- a/tests/suites/test_suite_mpi.function +++ b/tests/suites/test_suite_mpi.function @@ -722,7 +722,7 @@ exit: /* END_CASE */ /* BEGIN_CASE */ -void mbedtls_mpi_core_lt_ct( data_t * input_X, data_t * input_Y, int input_ret ) +void mpi_core_lt_ct( data_t * input_X, data_t * input_Y, int input_ret ) { #define MAX_LEN 64 mbedtls_mpi_uint X[MAX_LEN];