Remove mbedtls_ prefix from bignum test cases

Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
This commit is contained in:
Tom Cosgrove 2022-09-02 10:24:55 +01:00
parent b0fb17a829
commit 1b2947a614
2 changed files with 4870 additions and 4870 deletions

File diff suppressed because it is too large Load Diff

View File

@ -182,7 +182,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_read_binary( data_t * buf, char * input_A )
void mpi_read_binary( data_t * buf, char * input_A )
{
mbedtls_mpi X;
char str[1000];
@ -202,7 +202,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_core_io_null()
void mpi_core_io_null()
{
mbedtls_mpi_uint X = 0;
int ret;
@ -233,7 +233,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_core_io_be( data_t *input, int nb_int, int nx_32_int, int iret,
void mpi_core_io_be( data_t *input, int nb_int, int nx_32_int, int iret,
int oret )
{
if( iret != 0 )
@ -290,7 +290,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_core_io_le( data_t *input, int nb_int, int nx_32_int, int iret,
void mpi_core_io_le( data_t *input, int nb_int, int nx_32_int, int iret,
int oret )
{
if( iret != 0 )
@ -345,7 +345,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_mod_setup( int ext_rep, int int_rep, int iret )
void mpi_mod_setup( int ext_rep, int int_rep, int iret )
{
#define MLIMBS 8
mbedtls_mpi_uint mp[MLIMBS];
@ -374,7 +374,7 @@ exit:
/* BEGIN_CASE */
void mbedtls_mpi_mod_raw_io( data_t *input, int nb_int, int nx_32_int,
void mpi_mod_raw_io( data_t *input, int nb_int, int nx_32_int,
int iendian, int iret, int oret )
{
if( iret != 0 )
@ -469,7 +469,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_read_binary_le( data_t * buf, char * input_A )
void mpi_read_binary_le( data_t * buf, char * input_A )
{
mbedtls_mpi X;
char str[1000];
@ -489,7 +489,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_write_binary( char * input_X, data_t * input_A,
void mpi_write_binary( char * input_X, data_t * input_A,
int output_size, int result )
{
mbedtls_mpi X;
@ -520,7 +520,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_write_binary_le( char * input_X, data_t * input_A,
void mpi_write_binary_le( char * input_X, data_t * input_A,
int output_size, int result )
{
mbedtls_mpi X;
@ -551,7 +551,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE depends_on:MBEDTLS_FS_IO */
void mbedtls_mpi_read_file( char * input_file, data_t * input_A, int result )
void mpi_read_file( char * input_file, data_t * input_A, int result )
{
mbedtls_mpi X;
unsigned char buf[1000];
@ -586,7 +586,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE depends_on:MBEDTLS_FS_IO */
void mbedtls_mpi_write_file( char * input_X, char * output_file )
void mpi_write_file( char * input_X, char * output_file )
{
mbedtls_mpi X, Y;
FILE *file_out, *file_in;
@ -616,7 +616,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_get_bit( char * input_X, int pos, int val )
void mpi_get_bit( char * input_X, int pos, int val )
{
mbedtls_mpi X;
mbedtls_mpi_init( &X );
@ -629,7 +629,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_set_bit( char * input_X, int pos, int val,
void mpi_set_bit( char * input_X, int pos, int val,
char * output_Y, int result )
{
mbedtls_mpi X, Y;
@ -651,7 +651,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_lsb( char * input_X, int nr_bits )
void mpi_lsb( char * input_X, int nr_bits )
{
mbedtls_mpi X;
mbedtls_mpi_init( &X );
@ -665,7 +665,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_bitlen( char * input_X, int nr_bits )
void mpi_bitlen( char * input_X, int nr_bits )
{
mbedtls_mpi X;
mbedtls_mpi_init( &X );
@ -679,7 +679,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_gcd( char * input_X, char * input_Y,
void mpi_gcd( char * input_X, char * input_Y,
char * input_A )
{
mbedtls_mpi A, X, Y, Z;
@ -698,7 +698,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_cmp_int( int input_X, int input_A, int result_CMP )
void mpi_cmp_int( int input_X, int input_A, int result_CMP )
{
mbedtls_mpi X;
mbedtls_mpi_init( &X );
@ -712,7 +712,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_cmp_mpi( char * input_X, char * input_Y,
void mpi_cmp_mpi( char * input_X, char * input_Y,
int input_A )
{
mbedtls_mpi X, Y;
@ -764,7 +764,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_lt_mpi_ct( int size_X, char * input_X,
void mpi_lt_mpi_ct( int size_X, char * input_X,
int size_Y, char * input_Y,
int input_ret, int input_err )
{
@ -789,7 +789,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_cmp_abs( char * input_X, char * input_Y,
void mpi_cmp_abs( char * input_X, char * input_Y,
int input_A )
{
mbedtls_mpi X, Y;
@ -805,7 +805,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_copy( char *src_hex, char *dst_hex )
void mpi_copy( char *src_hex, char *dst_hex )
{
mbedtls_mpi src, dst, ref;
mbedtls_mpi_init( &src );
@ -863,7 +863,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_swap( char *X_hex, char *Y_hex )
void mpi_swap( char *X_hex, char *Y_hex )
{
mbedtls_mpi X, Y, X0, Y0;
mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y );
@ -928,7 +928,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_shrink( int before, int used, int min, int after )
void mpi_shrink( int before, int used, int min, int after )
{
mbedtls_mpi X;
mbedtls_mpi_init( &X );
@ -949,7 +949,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_add_mpi( char * input_X, char * input_Y,
void mpi_add_mpi( char * input_X, char * input_Y,
char * input_A )
{
mbedtls_mpi X, Y, Z, A;
@ -979,7 +979,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_add_mpi_inplace( char * input_X, char * input_A )
void mpi_add_mpi_inplace( char * input_X, char * input_A )
{
mbedtls_mpi X, A;
mbedtls_mpi_init( &X ); mbedtls_mpi_init( &A );
@ -1008,7 +1008,7 @@ exit:
/* BEGIN_CASE */
void mbedtls_mpi_add_abs( char * input_X, char * input_Y,
void mpi_add_abs( char * input_X, char * input_Y,
char * input_A )
{
mbedtls_mpi X, Y, Z, A;
@ -1038,7 +1038,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_add_int( char * input_X, int input_Y,
void mpi_add_int( char * input_X, int input_Y,
char * input_A )
{
mbedtls_mpi X, Z, A;
@ -1056,7 +1056,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_sub_mpi( char * input_X, char * input_Y,
void mpi_sub_mpi( char * input_X, char * input_Y,
char * input_A )
{
mbedtls_mpi X, Y, Z, A;
@ -1086,7 +1086,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_sub_abs( char * input_X, char * input_Y,
void mpi_sub_abs( char * input_X, char * input_Y,
char * input_A, int sub_result )
{
mbedtls_mpi X, Y, Z, A;
@ -1122,7 +1122,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_sub_int( char * input_X, int input_Y,
void mpi_sub_int( char * input_X, int input_Y,
char * input_A )
{
mbedtls_mpi X, Z, A;
@ -1140,7 +1140,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_mul_mpi( char * input_X, char * input_Y,
void mpi_mul_mpi( char * input_X, char * input_Y,
char * input_A )
{
mbedtls_mpi X, Y, Z, A;
@ -1159,7 +1159,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_mul_int( char * input_X, int input_Y,
void mpi_mul_int( char * input_X, int input_Y,
char * input_A, char * result_comparison )
{
mbedtls_mpi X, Z, A;
@ -1182,7 +1182,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_div_mpi( char * input_X, char * input_Y,
void mpi_div_mpi( char * input_X, char * input_Y,
char * input_A, char * input_B,
int div_result )
{
@ -1212,7 +1212,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_div_int( char * input_X, int input_Y,
void mpi_div_int( char * input_X, int input_Y,
char * input_A, char * input_B,
int div_result )
{
@ -1241,7 +1241,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_mod_mpi( char * input_X, char * input_Y,
void mpi_mod_mpi( char * input_X, char * input_Y,
char * input_A, int div_result )
{
mbedtls_mpi X, Y, A;
@ -1265,7 +1265,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_mod_int( char * input_X, int input_Y,
void mpi_mod_int( char * input_X, int input_Y,
int input_A, int div_result )
{
mbedtls_mpi X;
@ -1287,7 +1287,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_exp_mod( char * input_A, char * input_E,
void mpi_exp_mod( char * input_A, char * input_E,
char * input_N, char * input_X,
int exp_result )
{
@ -1334,7 +1334,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_exp_mod_size( int A_bytes, int E_bytes, int N_bytes,
void mpi_exp_mod_size( int A_bytes, int E_bytes, int N_bytes,
char * input_RR, int exp_result )
{
mbedtls_mpi A, E, N, RR, Z;
@ -1368,7 +1368,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_inv_mod( char * input_X, char * input_Y,
void mpi_inv_mod( char * input_X, char * input_Y,
char * input_A, int div_result )
{
mbedtls_mpi X, Y, Z, A;
@ -1392,7 +1392,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE depends_on:MBEDTLS_GENPRIME */
void mbedtls_mpi_is_prime( char * input_X, int div_result )
void mpi_is_prime( char * input_X, int div_result )
{
mbedtls_mpi X;
int res;
@ -1408,7 +1408,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE depends_on:MBEDTLS_GENPRIME */
void mbedtls_mpi_is_prime_det( data_t * input_X, data_t * witnesses,
void mpi_is_prime_det( data_t * input_X, data_t * witnesses,
int chunk_len, int rounds )
{
mbedtls_mpi X;
@ -1441,7 +1441,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE depends_on:MBEDTLS_GENPRIME */
void mbedtls_mpi_gen_prime( int bits, int flags, int ref_ret )
void mpi_gen_prime( int bits, int flags, int ref_ret )
{
mbedtls_mpi X;
int my_ret;
@ -1479,7 +1479,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_shift_l( char * input_X, int shift_X,
void mpi_shift_l( char * input_X, int shift_X,
char * input_A )
{
mbedtls_mpi X, A;
@ -1497,7 +1497,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_shift_r( char * input_X, int shift_X,
void mpi_shift_r( char * input_X, int shift_X,
char * input_A )
{
mbedtls_mpi X, A;
@ -1721,7 +1721,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_core_add_if( char * input_l, char * input_r,
void mpi_core_add_if( char * input_l, char * input_r,
char * input_X4, int carry4,
char * input_X8, int carry8 )
{
@ -1817,7 +1817,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_core_sub( char * input_l, char * input_r,
void mpi_core_sub( char * input_l, char * input_r,
char * input_X4, char * input_X8,
int carry )
{
@ -1907,7 +1907,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_core_mla( char * input_d, char * input_s, char * input_b,
void mpi_core_mla( char * input_d, char * input_s, char * input_b,
char * input_X4, char * input_cy4,
char * input_X8, char * input_cy8 )
{
@ -1996,7 +1996,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_montg_init( char * input_N, char * input_mm )
void mpi_montg_init( char * input_N, char * input_mm )
{
mbedtls_mpi N, mm;
@ -2031,7 +2031,7 @@ exit:
/* END_CASE */
/* BEGIN_CASE */
void mbedtls_mpi_core_montmul( int limbs_AN4, int limbs_B4,
void mpi_core_montmul( int limbs_AN4, int limbs_B4,
int limbs_AN8, int limbs_B8,
char * input_A,
char * input_B,