Lines Matching refs:M
1238 mbedtls_mpi M; in ecp_mod_p521() local
1248 M.s = 1; in ecp_mod_p521()
1249 M.n = N->n - ( P521_WIDTH - 1 ); in ecp_mod_p521()
1250 if( M.n > P521_WIDTH + 1 ) in ecp_mod_p521()
1251 M.n = P521_WIDTH + 1; in ecp_mod_p521()
1252 M.p = Mp; in ecp_mod_p521()
1253 memcpy( Mp, N->p + P521_WIDTH - 1, M.n * sizeof( mbedtls_mpi_uint ) ); in ecp_mod_p521()
1254 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &M, 521 % ( 8 * sizeof( mbedtls_mpi_uint ) ) ) ); in ecp_mod_p521()
1262 MBEDTLS_MPI_CHK( mbedtls_mpi_add_abs( N, N, &M ) ); in ecp_mod_p521()
1287 mbedtls_mpi M; in ecp_mod_p255() local
1294 M.s = 1; in ecp_mod_p255()
1295 M.n = N->n - ( P255_WIDTH - 1 ); in ecp_mod_p255()
1296 if( M.n > P255_WIDTH + 1 ) in ecp_mod_p255()
1298 M.p = Mp; in ecp_mod_p255()
1300 memcpy( Mp, N->p + P255_WIDTH - 1, M.n * sizeof( mbedtls_mpi_uint ) ); in ecp_mod_p255()
1301 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &M, 255 % ( 8 * sizeof( mbedtls_mpi_uint ) ) ) ); in ecp_mod_p255()
1302 M.n++; /* Make room for multiplication by 19 */ in ecp_mod_p255()
1310 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_int( &M, &M, 19 ) ); in ecp_mod_p255()
1311 MBEDTLS_MPI_CHK( mbedtls_mpi_add_abs( N, N, &M ) ); in ecp_mod_p255()
1344 mbedtls_mpi M, Q; in ecp_mod_p448() local
1351 M.s = 1; in ecp_mod_p448()
1352 M.n = N->n - ( P448_WIDTH ); in ecp_mod_p448()
1353 if( M.n > P448_WIDTH ) in ecp_mod_p448()
1356 M.p = Mp; in ecp_mod_p448()
1358 memcpy( Mp, N->p + P448_WIDTH, M.n * sizeof( mbedtls_mpi_uint ) ); in ecp_mod_p448()
1365 MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( N, N, &M ) ); in ecp_mod_p448()
1368 Q = M; in ecp_mod_p448()
1377 for( i = P224_WIDTH_MAX; i < M.n; ++i ) in ecp_mod_p448()
1379 MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &M, &M, &Q ) ); in ecp_mod_p448()
1380 M.n = P448_WIDTH + 1; /* Make room for shifted carry bit from the addition */ in ecp_mod_p448()
1381 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_l( &M, 224 ) ); in ecp_mod_p448()
1382 MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( N, N, &M ) ); in ecp_mod_p448()
1406 mbedtls_mpi M, R; in ecp_mod_koblitz() local
1418 M.s = 1; in ecp_mod_koblitz()
1419 M.p = Mp; in ecp_mod_koblitz()
1422 M.n = N->n - ( p_limbs - adjust ); in ecp_mod_koblitz()
1423 if( M.n > p_limbs + adjust ) in ecp_mod_koblitz()
1424 M.n = p_limbs + adjust; in ecp_mod_koblitz()
1426 memcpy( Mp, N->p + p_limbs - adjust, M.n * sizeof( mbedtls_mpi_uint ) ); in ecp_mod_koblitz()
1428 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &M, shift ) ); in ecp_mod_koblitz()
1429 M.n += R.n; /* Make room for multiplication by R */ in ecp_mod_koblitz()
1438 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &M, &M, &R ) ); in ecp_mod_koblitz()
1439 MBEDTLS_MPI_CHK( mbedtls_mpi_add_abs( N, N, &M ) ); in ecp_mod_koblitz()
1444 M.n = N->n - ( p_limbs - adjust ); in ecp_mod_koblitz()
1445 if( M.n > p_limbs + adjust ) in ecp_mod_koblitz()
1446 M.n = p_limbs + adjust; in ecp_mod_koblitz()
1448 memcpy( Mp, N->p + p_limbs - adjust, M.n * sizeof( mbedtls_mpi_uint ) ); in ecp_mod_koblitz()
1450 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &M, shift ) ); in ecp_mod_koblitz()
1451 M.n += R.n; /* Make room for multiplication by R */ in ecp_mod_koblitz()
1460 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &M, &M, &R ) ); in ecp_mod_koblitz()
1461 MBEDTLS_MPI_CHK( mbedtls_mpi_add_abs( N, N, &M ) ); in ecp_mod_koblitz()