Lines Matching defs:b

22  *      if (a < b) {
25 * c = b;
28 * unsigned int lt = constant_time_lt(a, b);
29 * c = constant_time_select(lt, a, b);
39 /* Returns 0xff..f if a < b and 0 otherwise. */
41 unsigned int b);
44 unsigned int b);
46 static ossl_inline uint64_t constant_time_lt_64(uint64_t a, uint64_t b);
48 /* Returns 0xff..f if a >= b and 0 otherwise. */
50 unsigned int b);
53 unsigned int b);
62 /* Returns 0xff..f if a == b and 0 otherwise. */
64 unsigned int b);
67 unsigned int b);
69 static ossl_inline unsigned int constant_time_eq_int(int a, int b);
71 static ossl_inline unsigned char constant_time_eq_int_8(int a, int b);
74 * Returns (mask & a) | (~mask & b).
77 * the select methods return either |a| (if |mask| is nonzero) or |b|
82 unsigned int b);
86 unsigned char b);
90 uint32_t b);
94 uint64_t b);
97 int b);
122 unsigned int b)
124 return constant_time_msb(a ^ ((a ^ b) | ((a - b) ^ b)));
127 static ossl_inline size_t constant_time_lt_s(size_t a, size_t b)
129 return constant_time_msb_s(a ^ ((a ^ b) | ((a - b) ^ b)));
133 unsigned int b)
135 return (unsigned char)constant_time_lt(a, b);
138 static ossl_inline uint64_t constant_time_lt_64(uint64_t a, uint64_t b)
140 return constant_time_msb_64(a ^ ((a ^ b) | ((a - b) ^ b)));
149 static ossl_inline BN_ULONG constant_time_lt_bn(BN_ULONG a, BN_ULONG b)
151 return constant_time_msb_bn(a ^ ((a ^ b) | ((a - b) ^ b)));
160 BN_ULONG b)
162 return constant_time_is_zero_bn(a ^ b);
167 unsigned int b)
169 return ~constant_time_lt(a, b);
172 static ossl_inline size_t constant_time_ge_s(size_t a, size_t b)
174 return ~constant_time_lt_s(a, b);
178 unsigned int b)
180 return (unsigned char)constant_time_ge(a, b);
183 static ossl_inline unsigned char constant_time_ge_8_s(size_t a, size_t b)
185 return (unsigned char)constant_time_ge_s(a, b);
214 unsigned int b)
216 return constant_time_is_zero(a ^ b);
219 static ossl_inline size_t constant_time_eq_s(size_t a, size_t b)
221 return constant_time_is_zero_s(a ^ b);
225 unsigned int b)
227 return (unsigned char)constant_time_eq(a, b);
230 static ossl_inline unsigned char constant_time_eq_8_s(size_t a, size_t b)
232 return (unsigned char)constant_time_eq_s(a, b);
235 static ossl_inline unsigned int constant_time_eq_int(int a, int b)
237 return constant_time_eq((unsigned)(a), (unsigned)(b));
240 static ossl_inline unsigned char constant_time_eq_int_8(int a, int b)
242 return constant_time_eq_8((unsigned)(a), (unsigned)(b));
301 unsigned int b)
303 return (value_barrier(mask) & a) | (value_barrier(~mask) & b);
308 size_t b)
310 return (value_barrier_s(mask) & a) | (value_barrier_s(~mask) & b);
315 unsigned char b)
317 return (unsigned char)constant_time_select(mask, a, b);
321 int b)
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)
329 (unsigned)(b));
333 uint32_t b)
335 return (value_barrier_32(mask) & a) | (value_barrier_32(~mask) & b);
339 uint64_t b)
341 return (value_barrier_64(mask) & a) | (value_barrier_64(~mask) & b);
350 * *a = *b;
351 * *b = tmp;
355 uint32_t *b)
357 uint32_t xor = *a ^ *b;
361 *b ^= xor;
370 * *a = *b;
371 * *b = tmp;
375 uint64_t *b)
377 uint64_t xor = *a ^ *b;
381 *b ^= xor;
392 * memcpy(a, b);
393 * memcpy(b, tmp);
398 unsigned char *b,
405 tmp = a[i] ^ b[i];
408 b[i] ^= tmp;