Rename MPI_CORE(add_mod) to mbedtls_mpi_mod_raw_add
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
This commit is contained in:
parent
a45b6fee91
commit
0eea827cbd
2 changed files with 22 additions and 19 deletions
|
@ -119,17 +119,16 @@ int mbedtls_mpi_mod_raw_write( const mbedtls_mpi_uint *A,
|
|||
/* END MERGE SLOT 4 */
|
||||
|
||||
/* BEGIN MERGE SLOT 5 */
|
||||
void MPI_CORE(add_mod)( mbedtls_mpi_uint *X,
|
||||
mbedtls_mpi_uint const *A,
|
||||
mbedtls_mpi_uint const *B,
|
||||
const mbedtls_mpi_uint *N,
|
||||
size_t n )
|
||||
void mbedtls_mpi_mod_raw_add( mbedtls_mpi_uint *X,
|
||||
mbedtls_mpi_uint const *A,
|
||||
mbedtls_mpi_uint const *B,
|
||||
const mbedtls_mpi_uint *N,
|
||||
size_t limbs )
|
||||
{
|
||||
size_t carry, borrow = 0, fixup;
|
||||
carry = mbedtls_mpi_core_add( X, A, B, n );
|
||||
borrow = mbedtls_mpi_core_sub( X, X, N, n);
|
||||
fixup = ( carry < borrow );
|
||||
(void) mbedtls_mpi_core_add_if( X, N, n, fixup );
|
||||
size_t carry, borrow = 0;
|
||||
carry = mbedtls_mpi_core_add( X, A, B, limbs );
|
||||
borrow = mbedtls_mpi_core_sub( X, X, N, limbs);
|
||||
(void) mbedtls_mpi_core_add_if( X, N, limbs, ( carry < borrow ) );
|
||||
}
|
||||
/* END MERGE SLOT 5 */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue