Move the T++ in mbedtls_mpi_core_montmul() to within the loop body
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
This commit is contained in:
parent
1135b20064
commit
67c9247ed9
@ -411,7 +411,7 @@ void mbedtls_mpi_core_montmul( mbedtls_mpi_uint *X,
|
|||||||
{
|
{
|
||||||
memset( T, 0, ( 2 * AN_limbs + 1 ) * ciL );
|
memset( T, 0, ( 2 * AN_limbs + 1 ) * ciL );
|
||||||
|
|
||||||
for( size_t i = 0; i < AN_limbs; i++, T++ )
|
for( size_t i = 0; i < AN_limbs; i++ )
|
||||||
{
|
{
|
||||||
/* T = (T + u0*B + u1*N) / 2^biL */
|
/* T = (T + u0*B + u1*N) / 2^biL */
|
||||||
mbedtls_mpi_uint u0 = A[i];
|
mbedtls_mpi_uint u0 = A[i];
|
||||||
@ -419,6 +419,8 @@ void mbedtls_mpi_core_montmul( mbedtls_mpi_uint *X,
|
|||||||
|
|
||||||
(void) mbedtls_mpi_core_mla( T, AN_limbs + 2, B, B_limbs, u0 );
|
(void) mbedtls_mpi_core_mla( T, AN_limbs + 2, B, B_limbs, u0 );
|
||||||
(void) mbedtls_mpi_core_mla( T, AN_limbs + 2, N, AN_limbs, u1 );
|
(void) mbedtls_mpi_core_mla( T, AN_limbs + 2, N, AN_limbs, u1 );
|
||||||
|
|
||||||
|
T++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user