Lines Matching defs:mask

41 /* Convenience method for getting an 8-bit mask. */
50 /* Convenience method for getting an 8-bit mask. */
56 /* Convenience method for getting an 8-bit mask. */
58 /* Convenience method for getting a 32-bit mask. */
64 /* Convenience method for getting an 8-bit mask. */
69 /* Convenience method for getting an 8-bit mask. */
73 * Returns (mask & a) | (~mask & b).
75 * When |mask| is all 1s or all 0s (as returned by the methods above),
76 * the select methods return either |a| (if |mask| is nonzero) or |b|
77 * (if |mask| is zero).
79 static ossl_inline unsigned int constant_time_select(unsigned int mask,
83 static ossl_inline unsigned char constant_time_select_8(unsigned char mask,
88 static ossl_inline uint32_t constant_time_select_32(uint32_t mask, uint32_t a,
92 static ossl_inline uint64_t constant_time_select_64(uint64_t mask, uint64_t a,
95 static ossl_inline int constant_time_select_int(unsigned int mask, int a,
219 * possible value range of the mask and ~mask in the select
270 static ossl_inline unsigned int constant_time_select(unsigned int mask,
274 return (value_barrier(mask) & a) | (value_barrier(~mask) & b);
277 static ossl_inline size_t constant_time_select_s(size_t mask,
281 return (value_barrier_s(mask) & a) | (value_barrier_s(~mask) & b);
284 static ossl_inline unsigned char constant_time_select_8(unsigned char mask,
288 return (unsigned char)constant_time_select(mask, a, b);
291 static ossl_inline int constant_time_select_int(unsigned int mask, int a,
294 return (int)constant_time_select(mask, (unsigned)(a), (unsigned)(b));
297 static ossl_inline int constant_time_select_int_s(size_t mask, int a, int b)
299 return (int)constant_time_select((unsigned)mask, (unsigned)(a),
303 static ossl_inline uint32_t constant_time_select_32(uint32_t mask, uint32_t a,
306 return (value_barrier_32(mask) & a) | (value_barrier_32(~mask) & b);
309 static ossl_inline uint64_t constant_time_select_64(uint64_t mask, uint64_t a,
312 return (value_barrier_64(mask) & a) | (value_barrier_64(~mask) & b);
316 * mask must be 0xFFFFFFFF or 0x00000000.
318 * if (mask) {
325 static ossl_inline void constant_time_cond_swap_32(uint32_t mask, uint32_t *a,
330 xor &= mask;
336 * mask must be 0xFFFFFFFF or 0x00000000.
338 * if (mask) {
345 static ossl_inline void constant_time_cond_swap_64(uint64_t mask, uint64_t *a,
350 xor &= mask;
369 unsigned char mask;
375 mask = (unsigned char)constant_time_is_zero_s(idx);
377 *(outc + j) |= constant_time_select_8(mask, *(tablec++), 0);