mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-04 13:13:31 +00:00
Hinder unwanted optimisations
We want this function to be constant time. Make it less likely that the compiler optimises it. Signed-off-by: Janos Follath <janos.follath@arm.com>
This commit is contained in:
parent
bd0a683e78
commit
30f49f19cc
@ -859,7 +859,7 @@ mbedtls_mpi_uint mbedtls_mpi_core_sub_int(mbedtls_mpi_uint *X,
|
||||
mbedtls_ct_condition_t mbedtls_mpi_core_check_zero_ct(const mbedtls_mpi_uint *A,
|
||||
size_t limbs)
|
||||
{
|
||||
mbedtls_mpi_uint bits = 0;
|
||||
volatile mbedtls_mpi_uint bits = 0;
|
||||
|
||||
for (size_t i = 0; i < limbs; i++) {
|
||||
bits |= A[i];
|
||||
|
Loading…
x
Reference in New Issue
Block a user