Silence MSVC type conversion warnings

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
Manuel Pégourié-Gonnard 2021-06-10 09:34:00 +02:00
parent 31ec1d7319
commit e22176e7e0

View file

@ -2229,7 +2229,7 @@ static int mpi_select( mbedtls_mpi *R, const mbedtls_mpi *T, size_t T_size, size
for( size_t i = 0; i < T_size; i++ ) for( size_t i = 0; i < T_size; i++ )
{ {
MBEDTLS_MPI_CHK( mbedtls_mpi_safe_cond_assign( R, &T[i], MBEDTLS_MPI_CHK( mbedtls_mpi_safe_cond_assign( R, &T[i],
mbedtls_mpi_cf_bool_eq( i, idx ) ) ); (unsigned char) mbedtls_mpi_cf_bool_eq( i, idx ) ) );
} }
cleanup: cleanup:
@ -2413,7 +2413,7 @@ int mbedtls_mpi_exp_mod( mbedtls_mpi *X, const mbedtls_mpi *A,
/* /*
* X = X * W[wbits] R^-1 mod N * X = X * W[wbits] R^-1 mod N
*/ */
MBEDTLS_MPI_CHK( mpi_select( &WW, W, 1 << wsize, wbits ) ); MBEDTLS_MPI_CHK( mpi_select( &WW, W, (size_t) 1 << wsize, wbits ) );
mpi_montmul( X, &WW, N, mm, &T ); mpi_montmul( X, &WW, N, mm, &T );
state--; state--;