mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-05-13 02:14:40 +08:00
bignum_mod_raw testsuite: Refactored mpi_mod_raw_neg()
.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
This commit is contained in:
parent
5e8443e6ef
commit
9a60b2373b
@ -568,9 +568,8 @@ void mpi_mod_raw_neg( char * input_N, char * input_A, char * input_X )
|
|||||||
ASSERT_COMPARE( R, bytes, X, bytes );
|
ASSERT_COMPARE( R, bytes, X, bytes );
|
||||||
|
|
||||||
/* Neg( A ): alias A to R => Correct result */
|
/* Neg( A ): alias A to R => Correct result */
|
||||||
memcpy( R, A, bytes );
|
mbedtls_mpi_mod_raw_neg( A, A, &m );
|
||||||
mbedtls_mpi_mod_raw_neg( R, R, &m );
|
ASSERT_COMPARE( A, bytes, X, bytes );
|
||||||
ASSERT_COMPARE( R, bytes, X, bytes );
|
|
||||||
exit:
|
exit:
|
||||||
mbedtls_mpi_mod_modulus_free( &m );
|
mbedtls_mpi_mod_modulus_free( &m );
|
||||||
mbedtls_free( N );
|
mbedtls_free( N );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user