Reduce scope of local variables in mpi_montmul()
Signed-off-by: Hanno Becker <hanno.becker@arm.com>
This commit is contained in:
parent
9137b9c587
commit
0235f7512f
1 changed files with 5 additions and 3 deletions
|
@ -1886,8 +1886,8 @@ static void mpi_montg_init( mbedtls_mpi_uint *mm, const mbedtls_mpi *N )
|
|||
static void mpi_montmul( mbedtls_mpi *A, const mbedtls_mpi *B, const mbedtls_mpi *N, mbedtls_mpi_uint mm,
|
||||
const mbedtls_mpi *T )
|
||||
{
|
||||
size_t i, n, m;
|
||||
mbedtls_mpi_uint u0, u1, *d;
|
||||
size_t n, m;
|
||||
mbedtls_mpi_uint *d;
|
||||
|
||||
memset( T->p, 0, T->n * ciL );
|
||||
|
||||
|
@ -1895,8 +1895,10 @@ static void mpi_montmul( mbedtls_mpi *A, const mbedtls_mpi *B, const mbedtls_mpi
|
|||
n = N->n;
|
||||
m = ( B->n < n ) ? B->n : n;
|
||||
|
||||
for( i = 0; i < n; i++ )
|
||||
for( size_t i = 0; i < n; i++ )
|
||||
{
|
||||
mbedtls_mpi_uint u0, u1;
|
||||
|
||||
/*
|
||||
* T = (T + u0*B + u1*N) / 2^biL
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue