Lines Matching refs:mask
153 BN_ULONG mask = bit < BN_BITS2 - 1 ? (kOne << (bit + 1)) - 1 : BN_MASK2; in BN_rand() local
159 rnd->d[words - 1] &= mask; in BN_rand()
200 crypto_word_t mask = 0; in bn_less_than_word_mask() local
202 mask |= a[i]; in bn_less_than_word_mask()
205 mask = constant_time_is_zero_w(mask); in bn_less_than_word_mask()
206 mask &= constant_time_lt_w(a[0], b); in bn_less_than_word_mask()
207 return mask; in bn_less_than_word_mask()
212 crypto_word_t mask = ~bn_less_than_word_mask(a, len, min_inclusive); in bn_in_range_words() local
213 return mask & bn_less_than_words(a, max_exclusive, len); in bn_in_range_words()
229 BN_ULONG mask = max_exclusive[words - 1]; in bn_range_to_mask() local
231 mask |= mask >> 1; in bn_range_to_mask()
232 mask |= mask >> 2; in bn_range_to_mask()
233 mask |= mask >> 4; in bn_range_to_mask()
234 mask |= mask >> 8; in bn_range_to_mask()
235 mask |= mask >> 16; in bn_range_to_mask()
237 mask |= mask >> 32; in bn_range_to_mask()
241 *out_mask = mask; in bn_range_to_mask()
256 BN_ULONG mask; in bn_rand_range_words() local
257 if (!bn_range_to_mask(&words, &mask, min_inclusive, max_exclusive, len)) { in bn_rand_range_words()
275 out[words - 1] &= mask; in bn_rand_range_words()
300 BN_ULONG mask; in bn_rand_secret_range() local
301 if (!bn_range_to_mask(&words, &mask, min_inclusive, max_exclusive->d, in bn_rand_secret_range()
308 assert(mask != 0); in bn_rand_secret_range()
310 if (words == 1 && min_inclusive > mask >> 1) { in bn_rand_secret_range()
317 r->d[words - 1] &= mask; in bn_rand_secret_range()
327 r->d[words - 1] &= constant_time_select_w(in_range, BN_MASK2, mask >> 1); in bn_rand_secret_range()