1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-28 00:21:48 +03:00

Add mbedtls_mpi_core_check_zero_ct() and tests

Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
This commit is contained in:
Tom Cosgrove
2022-12-12 16:54:57 +00:00
parent e9ffb6c8e9
commit 30f3b4d601
4 changed files with 57 additions and 0 deletions

View File

@ -742,6 +742,17 @@ mbedtls_mpi_uint mbedtls_mpi_core_sub_int( mbedtls_mpi_uint *X,
return( c );
}
mbedtls_mpi_uint mbedtls_mpi_core_check_zero_ct( const mbedtls_mpi_uint *A,
size_t limbs )
{
mbedtls_mpi_uint bits = 0;
for( size_t i = 0; i < limbs; i++ )
bits |= A[i];
return( bits );
}
/* END MERGE SLOT 3 */
/* BEGIN MERGE SLOT 4 */