Home
last modified time | relevance | path

Searched refs:limb (Results 1 – 17 of 17) sorted by relevance

/openssl/crypto/ec/curve448/arch_32/
H A Df_impl.h28 out->limb[i] = a->limb[i] + b->limb[i]; in gf_add_RAW()
36 out->limb[i] = a->limb[i] - b->limb[i]; in gf_sub_RAW()
45 a->limb[i] += (i == NLIMBS / 2) ? co2 : co1; in gf_bias()
51 uint32_t tmp = a->limb[NLIMBS - 1] >> 28; in gf_weak_reduce()
54 a->limb[NLIMBS / 2] += tmp; in gf_weak_reduce()
56 a->limb[i] = (a->limb[i] & mask) + (a->limb[i - 1] >> 28); in gf_weak_reduce()
57 a->limb[0] = (a->limb[0] & mask) + tmp; in gf_weak_reduce()
H A Df_impl32.c26 const uint32_t *a = as->limb, *b = bs->limb;
27 uint32_t *c = cs->limb;
75 const uint32_t *a = as->limb;
76 uint32_t *c = cs->limb;
/openssl/crypto/ec/curve448/arch_64/
H A Df_impl.h26 out->limb[i] = a->limb[i] + b->limb[i]; in gf_add_RAW()
37 out->limb[i] = a->limb[i] - b->limb[i] + ((i == NLIMBS / 2) ? co2 : co1); in gf_sub_RAW()
49 uint64_t tmp = a->limb[NLIMBS - 1] >> 56; in gf_weak_reduce()
52 a->limb[NLIMBS / 2] += tmp; in gf_weak_reduce()
54 a->limb[i] = (a->limb[i] & mask) + (a->limb[i - 1] >> 56); in gf_weak_reduce()
55 a->limb[0] = (a->limb[0] & mask) + tmp; in gf_weak_reduce()
H A Df_impl64.c26 const uint64_t *a = as->limb, *b = bs->limb;
27 uint64_t *c = cs->limb;
78 const uint64_t *a = as->limb;
79 uint64_t *c = cs->limb;
104 const uint64_t *a = as->limb;
105 uint64_t *c = cs->limb;
/openssl/crypto/ec/curve448/
H A Dscalar.c59 out->limb[i] = (c448_word_t)chain; in sc_subx()
66 chain = (chain + out->limb[i]) + (p->limb[i] & borrow); in sc_subx()
80 c448_word_t mand = a->limb[i]; in sc_montmul()
93 mier = sc_p->limb; in sc_montmul()
120 sc_subx(out, a->limb, b, sc_p, 0); in ossl_curve448_scalar_sub()
131 chain = (chain + a->limb[i]) + b->limb[i]; in ossl_curve448_scalar_add()
149 s->limb[i] = out; in scalar_decode_short()
162 accum = (accum + s->limb[i] - sc_p->limb[i]) >> WBITS; in ossl_curve448_scalar_decode()
233 chain = (chain + a->limb[i]) + (sc_p->limb[i] & mask); in ossl_curve448_scalar_halve()
238 out->limb[i] = out->limb[i] >> 1 | out->limb[i + 1] << (WBITS - 1); in ossl_curve448_scalar_halve()
[all …]
H A Dfield.h36 word_t limb[NLIMBS]; member
139 x[0].limb[i] = constant_time_select_32(is_z, z[0].limb[i], in gf_cond_sel()
140 y[0].limb[i]); in gf_cond_sel()
143 x[0].limb[i] = constant_time_select_64(is_z, z[0].limb[i], in gf_cond_sel()
144 y[0].limb[i]); in gf_cond_sel()
165 constant_time_cond_swap_32(swap, &(x[0].limb[i]), &(y->limb[i])); in gf_cond_swap()
168 constant_time_cond_swap_64(swap, &(x[0].limb[i]), &(y->limb[i])); in gf_cond_swap()
H A Df_generic.c35 buffer |= ((dword_t) red->limb[LIMBPERM(j)]) << fill; in gf_serialize()
52 return 0 - (y->limb[0] & 1); in gf_hibit()
62 return 0 - (y->limb[0] & 1); in gf_lobit()
87 x->limb[LIMBPERM(i)] = (word_t) in gf_deserialize()
92 (scarry + x->limb[LIMBPERM(i)] - in gf_deserialize()
115 scarry = scarry + a->limb[LIMBPERM(i)] - MODULUS->limb[LIMBPERM(i)]; in gf_strong_reduce()
116 a->limb[LIMBPERM(i)] = scarry & LIMB_MASK(LIMBPERM(i)); in gf_strong_reduce()
132 carry + a->limb[LIMBPERM(i)] + in gf_strong_reduce()
133 (scarry_0 & MODULUS->limb[LIMBPERM(i)]); in gf_strong_reduce()
134 a->limb[LIMBPERM(i)] = carry & LIMB_MASK(LIMBPERM(i)); in gf_strong_reduce()
[all …]
H A Dpoint_448.h68 c448_word_t limb[C448_SCALAR_LIMBS]; member
H A Dcurve448.c257 (scalar1x->limb[bit / WBITS] >> (bit % WBITS) & 1) << k; in ossl_curve448_precomputed_scalarmul()
560 uint64_t current = scalar->limb[0] & 0xFFFF; in recode_wnaf()
563 const unsigned int B_OVER_16 = sizeof(scalar->limb[0]) / 2; in recode_wnaf()
580 current += (uint32_t)((scalar->limb[w / B_OVER_16] in recode_wnaf()
/openssl/crypto/ec/
H A Decp_nistp521.c131 typedef uint64_t limb; typedef
298 static const limb two62m3 = (((limb) 1) << 62) - (((limb) 1) << 5); in felem_neg()
299 static const limb two62m2 = (((limb) 1) << 62) - (((limb) 1) << 4); in felem_neg()
324 static const limb two62m3 = (((limb) 1) << 62) - (((limb) 1) << 5); in felem_diff64()
325 static const limb two62m2 = (((limb) 1) << 62) - (((limb) 1) << 4); in felem_diff64()
355 static const limb two63m6 = (((limb) 1) << 63) - (((limb) 1) << 6); in felem_diff_128_64()
356 static const limb two63m5 = (((limb) 1) << 63) - (((limb) 1) << 5); in felem_diff_128_64()
866 limb is_zero, is_p; in felem_is_zero()
944 static const limb two58 = ((limb) 1) << 58; in felem_contract()
1213 limb points_equal; in point_add()
[all …]
H A Decp_nistp256.c246 #define two105m41m9 (((limb)1) << 105) - (((limb)1) << 41) - (((limb)1) << 9)
248 #define two105m41p9 (((limb)1) << 105) - (((limb)1) << 41) + (((limb)1) << 9)
291 #define two107m43m11 (((limb)1) << 107) - (((limb)1) << 43) - (((limb)1) << 11)
293 #define two107m43p11 (((limb)1) << 107) - (((limb)1) << 43) + (((limb)1) << 11)
334 (((limb) 1) << 70) - (((limb) 1) << 8) + (((limb) 1) << 6); in longfelem_diff()
335 static const limb two70p40 = (((limb) 1) << 70) + (((limb) 1) << 40); in longfelem_diff()
336 static const limb two70 = (((limb) 1) << 70); in longfelem_diff()
338 (((limb) 1) << 70) - (((limb) 1) << 40) - (((limb) 1) << 38) + in longfelem_diff()
340 static const limb two70m6 = (((limb) 1) << 70) - (((limb) 1) << 6); in longfelem_diff()
716 #define two100m36m4 (((limb)1) << 100) - (((limb)1) << 36) - (((limb)1) << 4)
[all …]
H A Decp_nistp384.c107 typedef uint64_t limb; typedef
234 static const limb two60m52m4 = (((limb) 1) << 60) in felem_neg()
237 static const limb two60p44m12 = (((limb) 1) << 60) in felem_neg()
240 static const limb two60m28m4 = (((limb) 1) << 60) in felem_neg()
243 static const limb two60m4 = (((limb) 1) << 60) in felem_neg()
270 static const limb two60m52m4 = (((limb) 1) << 60) in felem_diff64()
273 static const limb two60p44m12 = (((limb) 1) << 60) in felem_diff64()
276 static const limb two60m28m4 = (((limb) 1) << 60) in felem_diff64()
279 static const limb two60m4 = (((limb) 1) << 60) in felem_diff64()
830 limb zero, p384; in felem_is_zero()
[all …]
H A Decp_nistp224.c75 typedef uint64_t limb; typedef
79 typedef limb felem[4];
396 static const limb two58p2 = (((limb) 1) << 58) + (((limb) 1) << 2); in felem_diff()
397 static const limb two58m2 = (((limb) 1) << 58) - (((limb) 1) << 2); in felem_diff()
398 static const limb two58m42m2 = (((limb) 1) << 58) - in felem_diff()
399 (((limb) 1) << 42) - (((limb) 1) << 2); in felem_diff()
494 limb tmp0, tmp1, tmp2; in felem_square()
681 limb zero, two224m96p1, two225m97p2; in felem_is_zero()
791 const limb copy = -icopy; in copy_conditional()
914 limb points_equal; in point_add()
[all …]
/openssl/crypto/bn/
H A Dbn_lib.c1154 BN_ULONG limb; in bn_correct_top_consttime() local
1158 limb = a->d[j]; in bn_correct_top_consttime()
1159 limb |= 0 - limb; in bn_correct_top_consttime()
1160 limb >>= BN_BITS2 - 1; in bn_correct_top_consttime()
1161 limb = 0 - limb; in bn_correct_top_consttime()
1162 mask = (unsigned int)limb; in bn_correct_top_consttime()
/openssl/test/recipes/30-test_evp_data/
H A Devpmac_poly1305.txt54 # What happens if data limb is all ones and there is carry from lower limb?
278 # limb carry
/openssl/Configurations/
H A DREADME.md230 limb size is implied in
/openssl/
H A DCHANGES.md11630 mpz_t when openssl and GMP use the same limb size. Otherwise the

Completed in 129 milliseconds