mbedtls_ct_mpi_uint_mask() function
Turn a value into a mask: - if \p value == 0, return the all-bits 0 mask, aka 0 - otherwise, return the all-bits 1 mask, aka (mbedtls_mpi_uint) -1 This function can be used to write constant-time code by replacing branches with bit operations using masks.
Arguments
value
The value to analyze.
Return value
Zero if \p value is zero, otherwise all-bits-one.