Lines Matching refs:limb

64 typedef u32 limb;  typedef
66 typedef limb felem[NLIMBS];
68 static const limb kBottom28Bits = 0xfffffff;
69 static const limb kBottom29Bits = 0x1fffffff;
118 static const limb kPrecomputed[NLIMBS * 2 * 15 * 2] = {
196 static void felem_reduce_carry(felem inout, limb carry) { in felem_reduce_carry()
219 limb carry = 0; in felem_sum()
241 #define two31m3 (((limb)1) << 31) - (((limb)1) << 3)
242 #define two30m2 (((limb)1) << 30) - (((limb)1) << 2)
243 #define two30p13m2 (((limb)1) << 30) + (((limb)1) << 13) - (((limb)1) << 2)
244 #define two31m2 (((limb)1) << 31) - (((limb)1) << 2)
245 #define two31p24m2 (((limb)1) << 31) + (((limb)1) << 24) - (((limb)1) << 2)
246 #define two30m27m2 (((limb)1) << 30) - (((limb)1) << 27) - (((limb)1) << 2)
257 limb carry = 0; in felem_diff()
298 limb tmp2[18], carry, x, xMask; in felem_reduce_degree()
305 tmp2[0] = (limb)(tmp[0] & kBottom29Bits); in felem_reduce_degree()
311 tmp2[1] = ((limb) tmp[0]) >> 29; in felem_reduce_degree()
312 tmp2[1] |= (((limb)(tmp[0] >> 32)) << 3) & kBottom28Bits; in felem_reduce_degree()
313 tmp2[1] += ((limb) tmp[1]) & kBottom28Bits; in felem_reduce_degree()
318 tmp2[i] = ((limb)(tmp[i - 2] >> 32)) >> 25; in felem_reduce_degree()
319 tmp2[i] += ((limb)(tmp[i - 1])) >> 28; in felem_reduce_degree()
320 tmp2[i] += (((limb)(tmp[i - 1] >> 32)) << 4) & kBottom29Bits; in felem_reduce_degree()
321 tmp2[i] += ((limb) tmp[i]) & kBottom29Bits; in felem_reduce_degree()
329 tmp2[i] = ((limb)(tmp[i - 2] >> 32)) >> 25; in felem_reduce_degree()
330 tmp2[i] += ((limb)(tmp[i - 1])) >> 29; in felem_reduce_degree()
331 tmp2[i] += (((limb)(tmp[i - 1] >> 32)) << 3) & kBottom28Bits; in felem_reduce_degree()
332 tmp2[i] += ((limb) tmp[i]) & kBottom28Bits; in felem_reduce_degree()
338 tmp2[17] = ((limb)(tmp[15] >> 32)) >> 25; in felem_reduce_degree()
339 tmp2[17] += ((limb)(tmp[16])) >> 29; in felem_reduce_degree()
340 tmp2[17] += (((limb)(tmp[16] >> 32)) << 3); in felem_reduce_degree()
675 limb carry = 0; in felem_scalar_3()
702 limb carry = 0, next_carry; in felem_scalar_4()
733 limb carry = 0, next_carry; in felem_scalar_8()
762 limb carry; in felem_is_zero_vartime()
764 limb tmp[NLIMBS]; in felem_is_zero_vartime()
977 static void copy_conditional(felem out, const felem in, limb mask) { in copy_conditional()
981 const limb tmp = mask & (in[i] ^ out[i]); in copy_conditional()
988 static void select_affine_point(felem out_x, felem out_y, const limb* table, in select_affine_point()
989 limb index) { in select_affine_point()
990 limb i, j; in select_affine_point()
996 limb mask = i ^ index; in select_affine_point()
1013 const limb* table, limb index) { in select_jacobian_point()
1014 limb i, j; in select_jacobian_point()
1026 limb mask = i ^ index; in select_jacobian_point()
1049 limb n_is_infinity_mask = -1, p_is_noninfinite_mask, mask; in scalar_base_mult()
1071 limb index = bit0 | (bit1 << 1) | (bit2 << 2) | (bit3 << 3); in scalar_base_mult()
1119 limb n_is_infinity_mask, index, p_is_noninfinite_mask, mask; in scalar_mult()