Lines Matching refs:chain
53 c448_dsword_t chain = 0; in sc_subx() local
58 chain = (chain + accum[i]) - sub->limb[i]; in sc_subx()
59 out->limb[i] = (c448_word_t)chain; in sc_subx()
60 chain >>= WBITS; in sc_subx()
62 borrow = (c448_word_t)chain + extra; /* = 0 or -1 */ in sc_subx()
64 chain = 0; in sc_subx()
66 chain = (chain + out->limb[i]) + (p->limb[i] & borrow); in sc_subx()
67 out->limb[i] = (c448_word_t)chain; in sc_subx()
68 chain >>= WBITS; in sc_subx()
83 c448_dword_t chain = 0; in sc_montmul() local
85 chain += ((c448_dword_t) mand) * mier[j] + accum[j]; in sc_montmul()
86 accum[j] = (c448_word_t)chain; in sc_montmul()
87 chain >>= WBITS; in sc_montmul()
89 accum[j] = (c448_word_t)chain; in sc_montmul()
92 chain = 0; in sc_montmul()
95 chain += (c448_dword_t) mand *mier[j] + accum[j]; in sc_montmul()
97 accum[j - 1] = (c448_word_t)chain; in sc_montmul()
98 chain >>= WBITS; in sc_montmul()
100 chain += accum[j]; in sc_montmul()
101 chain += hi_carry; in sc_montmul()
102 accum[j - 1] = (c448_word_t)chain; in sc_montmul()
103 hi_carry = chain >> WBITS; in sc_montmul()
127 c448_dword_t chain = 0; in ossl_curve448_scalar_add() local
131 chain = (chain + a->limb[i]) + b->limb[i]; in ossl_curve448_scalar_add()
132 out->limb[i] = (c448_word_t)chain; in ossl_curve448_scalar_add()
133 chain >>= WBITS; in ossl_curve448_scalar_add()
135 sc_subx(out, out->limb, sc_p, sc_p, (c448_word_t)chain); in ossl_curve448_scalar_add()
229 c448_dword_t chain = 0; in ossl_curve448_scalar_halve() local
233 chain = (chain + a->limb[i]) + (sc_p->limb[i] & mask); in ossl_curve448_scalar_halve()
234 out->limb[i] = (c448_word_t)chain; in ossl_curve448_scalar_halve()
235 chain >>= C448_WORD_BITS; in ossl_curve448_scalar_halve()
239 out->limb[i] = out->limb[i] >> 1 | (c448_word_t)(chain << (WBITS - 1)); in ossl_curve448_scalar_halve()