mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-20 21:39:54 +00:00
Replace comparison with XOR
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
This commit is contained in:
parent
d391b8ce61
commit
1a277d9ad6
@ -127,7 +127,7 @@ void mbedtls_mpi_mod_raw_add( mbedtls_mpi_uint *X,
|
|||||||
mbedtls_mpi_uint carry, borrow;
|
mbedtls_mpi_uint carry, borrow;
|
||||||
carry = mbedtls_mpi_core_add( X, A, B, N->limbs );
|
carry = mbedtls_mpi_core_add( X, A, B, N->limbs );
|
||||||
borrow = mbedtls_mpi_core_sub( X, X, N->p, N->limbs );
|
borrow = mbedtls_mpi_core_sub( X, X, N->p, N->limbs );
|
||||||
(void) mbedtls_mpi_core_add_if( X, N->p, N->limbs, ( carry < borrow ) );
|
(void) mbedtls_mpi_core_add_if( X, N->p, N->limbs, (unsigned char) ( carry ^ borrow ) );
|
||||||
}
|
}
|
||||||
/* END MERGE SLOT 5 */
|
/* END MERGE SLOT 5 */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user