Add merge slots to Bignum files

Legacy Bignum is excluded as it doesn't get regular extensions like new
ones.

Each slot uses comments of their respective filetype. Since .data files
don't have a syntax for comments, dummy test cases are used. (These test
cases will never be executed and no noise will be added to tests.)

Signed-off-by: Janos Follath <janos.follath@arm.com>
This commit is contained in:
Janos Follath 2022-11-02 14:35:17 +00:00
parent 2a8bcf8c6f
commit 5933f691a2
12 changed files with 601 additions and 0 deletions

View File

@ -494,4 +494,44 @@ int mbedtls_mpi_core_fill_random( mbedtls_mpi_uint *X, size_t X_limbs,
int (*f_rng)(void *, unsigned char *, size_t),
void *p_rng );
/* BEGIN MERGE SLOT 1 */
/* END MERGE SLOT 1 */
/* BEGIN MERGE SLOT 2 */
/* END MERGE SLOT 2 */
/* BEGIN MERGE SLOT 3 */
/* END MERGE SLOT 3 */
/* BEGIN MERGE SLOT 4 */
/* END MERGE SLOT 4 */
/* BEGIN MERGE SLOT 5 */
/* END MERGE SLOT 5 */
/* BEGIN MERGE SLOT 6 */
/* END MERGE SLOT 6 */
/* BEGIN MERGE SLOT 7 */
/* END MERGE SLOT 7 */
/* BEGIN MERGE SLOT 8 */
/* END MERGE SLOT 8 */
/* BEGIN MERGE SLOT 9 */
/* END MERGE SLOT 9 */
/* BEGIN MERGE SLOT 10 */
/* END MERGE SLOT 10 */
#endif /* MBEDTLS_BIGNUM_CORE_H */

View File

@ -184,4 +184,44 @@ exit:
return( ret );
}
/* BEGIN MERGE SLOT 1 */
/* END MERGE SLOT 1 */
/* BEGIN MERGE SLOT 2 */
/* END MERGE SLOT 2 */
/* BEGIN MERGE SLOT 3 */
/* END MERGE SLOT 3 */
/* BEGIN MERGE SLOT 4 */
/* END MERGE SLOT 4 */
/* BEGIN MERGE SLOT 5 */
/* END MERGE SLOT 5 */
/* BEGIN MERGE SLOT 6 */
/* END MERGE SLOT 6 */
/* BEGIN MERGE SLOT 7 */
/* END MERGE SLOT 7 */
/* BEGIN MERGE SLOT 8 */
/* END MERGE SLOT 8 */
/* BEGIN MERGE SLOT 9 */
/* END MERGE SLOT 9 */
/* BEGIN MERGE SLOT 10 */
/* END MERGE SLOT 10 */
#endif /* MBEDTLS_BIGNUM_C */

View File

@ -148,4 +148,44 @@ int mbedtls_mpi_mod_modulus_setup( mbedtls_mpi_mod_modulus *m,
*/
void mbedtls_mpi_mod_modulus_free( mbedtls_mpi_mod_modulus *m );
/* BEGIN MERGE SLOT 1 */
/* END MERGE SLOT 1 */
/* BEGIN MERGE SLOT 2 */
/* END MERGE SLOT 2 */
/* BEGIN MERGE SLOT 3 */
/* END MERGE SLOT 3 */
/* BEGIN MERGE SLOT 4 */
/* END MERGE SLOT 4 */
/* BEGIN MERGE SLOT 5 */
/* END MERGE SLOT 5 */
/* BEGIN MERGE SLOT 6 */
/* END MERGE SLOT 6 */
/* BEGIN MERGE SLOT 7 */
/* END MERGE SLOT 7 */
/* BEGIN MERGE SLOT 8 */
/* END MERGE SLOT 8 */
/* BEGIN MERGE SLOT 9 */
/* END MERGE SLOT 9 */
/* BEGIN MERGE SLOT 10 */
/* END MERGE SLOT 10 */
#endif /* MBEDTLS_BIGNUM_MOD_H */

View File

@ -102,4 +102,44 @@ int mbedtls_mpi_mod_raw_write( const mbedtls_mpi_uint *A,
}
}
/* BEGIN MERGE SLOT 1 */
/* END MERGE SLOT 1 */
/* BEGIN MERGE SLOT 2 */
/* END MERGE SLOT 2 */
/* BEGIN MERGE SLOT 3 */
/* END MERGE SLOT 3 */
/* BEGIN MERGE SLOT 4 */
/* END MERGE SLOT 4 */
/* BEGIN MERGE SLOT 5 */
/* END MERGE SLOT 5 */
/* BEGIN MERGE SLOT 6 */
/* END MERGE SLOT 6 */
/* BEGIN MERGE SLOT 7 */
/* END MERGE SLOT 7 */
/* BEGIN MERGE SLOT 8 */
/* END MERGE SLOT 8 */
/* BEGIN MERGE SLOT 9 */
/* END MERGE SLOT 9 */
/* BEGIN MERGE SLOT 10 */
/* END MERGE SLOT 10 */
#endif /* MBEDTLS_BIGNUM_C */

View File

@ -138,4 +138,44 @@ int mbedtls_mpi_mod_raw_write( const mbedtls_mpi_uint *A,
unsigned char *output,
size_t output_length );
/* BEGIN MERGE SLOT 1 */
/* END MERGE SLOT 1 */
/* BEGIN MERGE SLOT 2 */
/* END MERGE SLOT 2 */
/* BEGIN MERGE SLOT 3 */
/* END MERGE SLOT 3 */
/* BEGIN MERGE SLOT 4 */
/* END MERGE SLOT 4 */
/* BEGIN MERGE SLOT 5 */
/* END MERGE SLOT 5 */
/* BEGIN MERGE SLOT 6 */
/* END MERGE SLOT 6 */
/* BEGIN MERGE SLOT 7 */
/* END MERGE SLOT 7 */
/* BEGIN MERGE SLOT 8 */
/* END MERGE SLOT 8 */
/* BEGIN MERGE SLOT 9 */
/* END MERGE SLOT 9 */
/* BEGIN MERGE SLOT 10 */
/* END MERGE SLOT 10 */
#endif /* MBEDTLS_BIGNUM_MOD_RAW_H */

View File

@ -815,3 +815,44 @@ def mpi_modmul_case_generate() -> None:
)
i += 1
print(generated_inputs)
# BEGIN MERGE SLOT 1
# END MERGE SLOT 1
# BEGIN MERGE SLOT 2
# END MERGE SLOT 2
# BEGIN MERGE SLOT 3
# END MERGE SLOT 3
# BEGIN MERGE SLOT 4
# END MERGE SLOT 4
# BEGIN MERGE SLOT 5
# END MERGE SLOT 5
# BEGIN MERGE SLOT 6
# END MERGE SLOT 6
# BEGIN MERGE SLOT 7
# END MERGE SLOT 7
# BEGIN MERGE SLOT 8
# END MERGE SLOT 8
# BEGIN MERGE SLOT 9
# END MERGE SLOT 9
# BEGIN MERGE SLOT 10
# END MERGE SLOT 10

View File

@ -1045,3 +1045,43 @@ exit:
mbedtls_free( X );
}
/* END_CASE */
/* BEGIN MERGE SLOT 1 */
/* END MERGE SLOT 1 */
/* BEGIN MERGE SLOT 2 */
/* END MERGE SLOT 2 */
/* BEGIN MERGE SLOT 3 */
/* END MERGE SLOT 3 */
/* BEGIN MERGE SLOT 4 */
/* END MERGE SLOT 4 */
/* BEGIN MERGE SLOT 5 */
/* END MERGE SLOT 5 */
/* BEGIN MERGE SLOT 6 */
/* END MERGE SLOT 6 */
/* BEGIN MERGE SLOT 7 */
/* END MERGE SLOT 7 */
/* BEGIN MERGE SLOT 8 */
/* END MERGE SLOT 8 */
/* BEGIN MERGE SLOT 9 */
/* END MERGE SLOT 9 */
/* BEGIN MERGE SLOT 10 */
/* END MERGE SLOT 10 */

View File

@ -430,3 +430,83 @@ mpi_core_fill_random:42:0:-1:0:MBEDTLS_ERR_MPI_BAD_INPUT_DATA
Fill random core: 42 bytes, 5 missing limbs
mpi_core_fill_random:42:0:-5:0:MBEDTLS_ERR_MPI_BAD_INPUT_DATA
BEGIN MERGE SLOT 1
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_core_io_null
END MERGE SLOT 1
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_core_io_null
BEGIN MERGE SLOT 2
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_core_io_null
END MERGE SLOT 2
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_core_io_null
BEGIN MERGE SLOT 3
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_core_io_null
END MERGE SLOT 3
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_core_io_null
BEGIN MERGE SLOT 4
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_core_io_null
END MERGE SLOT 4
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_core_io_null
BEGIN MERGE SLOT 5
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_core_io_null
END MERGE SLOT 5
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_core_io_null
BEGIN MERGE SLOT 6
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_core_io_null
END MERGE SLOT 6
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_core_io_null
BEGIN MERGE SLOT 7
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_core_io_null
END MERGE SLOT 7
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_core_io_null
BEGIN MERGE SLOT 8
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_core_io_null
END MERGE SLOT 8
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_core_io_null
BEGIN MERGE SLOT 9
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_core_io_null
END MERGE SLOT 9
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_core_io_null
BEGIN MERGE SLOT 10
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_core_io_null
END MERGE SLOT 10
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_core_io_null

View File

@ -24,3 +24,83 @@ mpi_mod_setup:MBEDTLS_MPI_MOD_EXT_REP_LE:MBEDTLS_MPI_MOD_REP_OPT_RED:0
Test mbedtls_mpi_mod_setup #9 (Both representations valid)
mpi_mod_setup:MBEDTLS_MPI_MOD_EXT_REP_LE:MBEDTLS_MPI_MOD_REP_MONTGOMERY:0
BEGIN MERGE SLOT 1
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_setup:MBEDTLS_MPI_MOD_EXT_REP_LE:MBEDTLS_MPI_MOD_REP_MONTGOMERY:0
END MERGE SLOT 1
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_setup:MBEDTLS_MPI_MOD_EXT_REP_LE:MBEDTLS_MPI_MOD_REP_MONTGOMERY:0
BEGIN MERGE SLOT 2
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_setup:MBEDTLS_MPI_MOD_EXT_REP_LE:MBEDTLS_MPI_MOD_REP_MONTGOMERY:0
END MERGE SLOT 2
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_setup:MBEDTLS_MPI_MOD_EXT_REP_LE:MBEDTLS_MPI_MOD_REP_MONTGOMERY:0
BEGIN MERGE SLOT 3
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_setup:MBEDTLS_MPI_MOD_EXT_REP_LE:MBEDTLS_MPI_MOD_REP_MONTGOMERY:0
END MERGE SLOT 3
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_setup:MBEDTLS_MPI_MOD_EXT_REP_LE:MBEDTLS_MPI_MOD_REP_MONTGOMERY:0
BEGIN MERGE SLOT 4
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_setup:MBEDTLS_MPI_MOD_EXT_REP_LE:MBEDTLS_MPI_MOD_REP_MONTGOMERY:0
END MERGE SLOT 4
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_setup:MBEDTLS_MPI_MOD_EXT_REP_LE:MBEDTLS_MPI_MOD_REP_MONTGOMERY:0
BEGIN MERGE SLOT 5
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_setup:MBEDTLS_MPI_MOD_EXT_REP_LE:MBEDTLS_MPI_MOD_REP_MONTGOMERY:0
END MERGE SLOT 5
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_setup:MBEDTLS_MPI_MOD_EXT_REP_LE:MBEDTLS_MPI_MOD_REP_MONTGOMERY:0
BEGIN MERGE SLOT 6
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_setup:MBEDTLS_MPI_MOD_EXT_REP_LE:MBEDTLS_MPI_MOD_REP_MONTGOMERY:0
END MERGE SLOT 6
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_setup:MBEDTLS_MPI_MOD_EXT_REP_LE:MBEDTLS_MPI_MOD_REP_MONTGOMERY:0
BEGIN MERGE SLOT 7
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_setup:MBEDTLS_MPI_MOD_EXT_REP_LE:MBEDTLS_MPI_MOD_REP_MONTGOMERY:0
END MERGE SLOT 7
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_setup:MBEDTLS_MPI_MOD_EXT_REP_LE:MBEDTLS_MPI_MOD_REP_MONTGOMERY:0
BEGIN MERGE SLOT 8
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_setup:MBEDTLS_MPI_MOD_EXT_REP_LE:MBEDTLS_MPI_MOD_REP_MONTGOMERY:0
END MERGE SLOT 8
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_setup:MBEDTLS_MPI_MOD_EXT_REP_LE:MBEDTLS_MPI_MOD_REP_MONTGOMERY:0
BEGIN MERGE SLOT 9
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_setup:MBEDTLS_MPI_MOD_EXT_REP_LE:MBEDTLS_MPI_MOD_REP_MONTGOMERY:0
END MERGE SLOT 9
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_setup:MBEDTLS_MPI_MOD_EXT_REP_LE:MBEDTLS_MPI_MOD_REP_MONTGOMERY:0
BEGIN MERGE SLOT 10
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_setup:MBEDTLS_MPI_MOD_EXT_REP_LE:MBEDTLS_MPI_MOD_REP_MONTGOMERY:0
END MERGE SLOT 10
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_setup:MBEDTLS_MPI_MOD_EXT_REP_LE:MBEDTLS_MPI_MOD_REP_MONTGOMERY:0

View File

@ -54,3 +54,43 @@ exit:
#undef MLIMBS
}
/* END_CASE */
/* BEGIN MERGE SLOT 1 */
/* END MERGE SLOT 1 */
/* BEGIN MERGE SLOT 2 */
/* END MERGE SLOT 2 */
/* BEGIN MERGE SLOT 3 */
/* END MERGE SLOT 3 */
/* BEGIN MERGE SLOT 4 */
/* END MERGE SLOT 4 */
/* BEGIN MERGE SLOT 5 */
/* END MERGE SLOT 5 */
/* BEGIN MERGE SLOT 6 */
/* END MERGE SLOT 6 */
/* BEGIN MERGE SLOT 7 */
/* END MERGE SLOT 7 */
/* BEGIN MERGE SLOT 8 */
/* END MERGE SLOT 8 */
/* BEGIN MERGE SLOT 9 */
/* END MERGE SLOT 9 */
/* BEGIN MERGE SLOT 10 */
/* END MERGE SLOT 10 */

View File

@ -178,3 +178,83 @@ mpi_mod_raw_cond_swap:"000000001111111122222222333333334444444455555555666666667
mbedtls_mpi_mod_raw_cond_swap: copy half of the limbs
mpi_mod_raw_cond_swap:"00000000FFFFFFFF55555555AAAAAAAA":"FEDCBA9876543210FEDCBA9876543210":8
BEGIN MERGE SLOT 1
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_raw_io:"00":1:1:MBEDTLS_MPI_MOD_EXT_REP_BE:0:0
END MERGE SLOT 1
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_raw_io:"00":1:1:MBEDTLS_MPI_MOD_EXT_REP_BE:0:0
BEGIN MERGE SLOT 2
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_raw_io:"00":1:1:MBEDTLS_MPI_MOD_EXT_REP_BE:0:0
END MERGE SLOT 2
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_raw_io:"00":1:1:MBEDTLS_MPI_MOD_EXT_REP_BE:0:0
BEGIN MERGE SLOT 3
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_raw_io:"00":1:1:MBEDTLS_MPI_MOD_EXT_REP_BE:0:0
END MERGE SLOT 3
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_raw_io:"00":1:1:MBEDTLS_MPI_MOD_EXT_REP_BE:0:0
BEGIN MERGE SLOT 4
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_raw_io:"00":1:1:MBEDTLS_MPI_MOD_EXT_REP_BE:0:0
END MERGE SLOT 4
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_raw_io:"00":1:1:MBEDTLS_MPI_MOD_EXT_REP_BE:0:0
BEGIN MERGE SLOT 5
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_raw_io:"00":1:1:MBEDTLS_MPI_MOD_EXT_REP_BE:0:0
END MERGE SLOT 5
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_raw_io:"00":1:1:MBEDTLS_MPI_MOD_EXT_REP_BE:0:0
BEGIN MERGE SLOT 6
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_raw_io:"00":1:1:MBEDTLS_MPI_MOD_EXT_REP_BE:0:0
END MERGE SLOT 6
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_raw_io:"00":1:1:MBEDTLS_MPI_MOD_EXT_REP_BE:0:0
BEGIN MERGE SLOT 7
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_raw_io:"00":1:1:MBEDTLS_MPI_MOD_EXT_REP_BE:0:0
END MERGE SLOT 7
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_raw_io:"00":1:1:MBEDTLS_MPI_MOD_EXT_REP_BE:0:0
BEGIN MERGE SLOT 8
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_raw_io:"00":1:1:MBEDTLS_MPI_MOD_EXT_REP_BE:0:0
END MERGE SLOT 8
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_raw_io:"00":1:1:MBEDTLS_MPI_MOD_EXT_REP_BE:0:0
BEGIN MERGE SLOT 9
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_raw_io:"00":1:1:MBEDTLS_MPI_MOD_EXT_REP_BE:0:0
END MERGE SLOT 9
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_raw_io:"00":1:1:MBEDTLS_MPI_MOD_EXT_REP_BE:0:0
BEGIN MERGE SLOT 10
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_raw_io:"00":1:1:MBEDTLS_MPI_MOD_EXT_REP_BE:0:0
END MERGE SLOT 10
depends_on:MBEDTLS_BIGNUM_MERGE
mpi_mod_raw_io:"00":1:1:MBEDTLS_MPI_MOD_EXT_REP_BE:0:0

View File

@ -279,4 +279,44 @@ exit:
mbedtls_mpi_mod_modulus_free( &m );
mbedtls_free( buff_m );
}
/* BEGIN MERGE SLOT 1 */
/* END MERGE SLOT 1 */
/* BEGIN MERGE SLOT 2 */
/* END MERGE SLOT 2 */
/* BEGIN MERGE SLOT 3 */
/* END MERGE SLOT 3 */
/* BEGIN MERGE SLOT 4 */
/* END MERGE SLOT 4 */
/* BEGIN MERGE SLOT 5 */
/* END MERGE SLOT 5 */
/* BEGIN MERGE SLOT 6 */
/* END MERGE SLOT 6 */
/* BEGIN MERGE SLOT 7 */
/* END MERGE SLOT 7 */
/* BEGIN MERGE SLOT 8 */
/* END MERGE SLOT 8 */
/* BEGIN MERGE SLOT 9 */
/* END MERGE SLOT 9 */
/* BEGIN MERGE SLOT 10 */
/* END MERGE SLOT 10 */
/* END_CASE */