bignum_mod_raw testsuite: Refactored `mpi_mod_raw_neg()`.
@@ -568,9 +568,8 @@ void mpi_mod_raw_neg( char * input_N, char * input_A, char * input_X )
ASSERT_COMPARE( R, bytes, X, bytes );
/* Neg( A ): alias A to R => Correct result */
- memcpy( R, A, bytes );
- mbedtls_mpi_mod_raw_neg( R, R, &m );
- ASSERT_COMPARE( R, bytes, X, bytes );
+ mbedtls_mpi_mod_raw_neg( A, A, &m );
+ ASSERT_COMPARE( A, bytes, X, bytes );
exit:
mbedtls_mpi_mod_modulus_free( &m );
mbedtls_free( N );
