Lines Matching full:mask

42 /* Convenience method for getting an 8-bit mask. */
51 /* Convenience method for getting an 8-bit mask. */
57 /* Convenience method for getting an 8-bit mask. */
59 /* Convenience method for getting a 32-bit mask. */
65 /* Convenience method for getting an 8-bit mask. */
70 /* Convenience method for getting an 8-bit mask. */
74 * Returns (mask & a) | (~mask & b).
76 * When |mask| is all 1s or all 0s (as returned by the methods above),
77 * the select methods return either |a| (if |mask| is nonzero) or |b|
78 * (if |mask| is zero).
80 static ossl_inline unsigned int constant_time_select(unsigned int mask,
84 static ossl_inline unsigned char constant_time_select_8(unsigned char mask,
89 static ossl_inline uint32_t constant_time_select_32(uint32_t mask, uint32_t a,
93 static ossl_inline uint64_t constant_time_select_64(uint64_t mask, uint64_t a,
96 static ossl_inline int constant_time_select_int(unsigned int mask, int a,
248 * possible value range of the mask and ~mask in the select
299 static ossl_inline unsigned int constant_time_select(unsigned int mask,
303 return (value_barrier(mask) & a) | (value_barrier(~mask) & b);
306 static ossl_inline size_t constant_time_select_s(size_t mask,
310 return (value_barrier_s(mask) & a) | (value_barrier_s(~mask) & b);
313 static ossl_inline unsigned char constant_time_select_8(unsigned char mask,
317 return (unsigned char)constant_time_select(mask, a, b);
320 static ossl_inline int constant_time_select_int(unsigned int mask, int a,
323 return (int)constant_time_select(mask, (unsigned)(a), (unsigned)(b));
326 static ossl_inline int constant_time_select_int_s(size_t mask, int a, int b)
328 return (int)constant_time_select((unsigned)mask, (unsigned)(a),
332 static ossl_inline uint32_t constant_time_select_32(uint32_t mask, uint32_t a,
335 return (value_barrier_32(mask) & a) | (value_barrier_32(~mask) & b);
338 static ossl_inline uint64_t constant_time_select_64(uint64_t mask, uint64_t a,
341 return (value_barrier_64(mask) & a) | (value_barrier_64(~mask) & b);
345 * mask must be 0xFFFFFFFF or 0x00000000.
347 * if (mask) {
354 static ossl_inline void constant_time_cond_swap_32(uint32_t mask, uint32_t *a,
359 xor &= mask;
365 * mask must be 0xFFFFFFFF or 0x00000000.
367 * if (mask) {
374 static ossl_inline void constant_time_cond_swap_64(uint64_t mask, uint64_t *a,
379 xor &= mask;
385 * mask must be 0xFF or 0x00.
388 * if (mask) {
396 static ossl_inline void constant_time_cond_swap_buff(unsigned char mask,
406 tmp &= mask;
426 unsigned char mask;
432 mask = (unsigned char)constant_time_is_zero_s(idx);
434 *(outc + j) |= constant_time_select_8(mask, *(tablec++), 0);