Have mbedtls_mpi_montg_init() take the modulus, rather than just its least significant limb
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
diff --git a/tests/suites/test_suite_mpi.function b/tests/suites/test_suite_mpi.function
index bf1212a..dcc869f 100644
--- a/tests/suites/test_suite_mpi.function
+++ b/tests/suites/test_suite_mpi.function
@@ -2015,7 +2015,7 @@
TEST_EQUAL( mm.s, 1 );
/* mbedtls_mpi_montg_init() only returns a result, no error possible */
- mbedtls_mpi_uint result = mbedtls_mpi_montg_init( N.p[0] );
+ mbedtls_mpi_uint result = mbedtls_mpi_montg_init( N.p );
/* Check we got the correct result */
TEST_EQUAL( result, mm.p[0] );
@@ -2074,7 +2074,7 @@
TEST_EQUAL( mbedtls_mpi_grow( &T, limbs_AN * 2 + 1 ), 0 );
/* Calculate the Montgomery constant (this is unit tested separately) */
- mbedtls_mpi_uint mm = mbedtls_mpi_montg_init( N.p[0] );
+ mbedtls_mpi_uint mm = mbedtls_mpi_montg_init( N.p );
TEST_EQUAL( mbedtls_mpi_grow( &R, limbs_AN ), 0 ); /* ensure it's got the right number of limbs */