Lines Matching refs:wvalue
503 int wvalue; // The 'value' of the window in mod_exp_recp() local
523 wvalue = 1; in mod_exp_recp()
530 wvalue <<= (i - wend); in mod_exp_recp()
531 wvalue |= 1; in mod_exp_recp()
548 if (!BN_mod_mul_reciprocal(r, r, val[wvalue >> 1], &recp, ctx)) { in mod_exp_recp()
672 int wvalue = 1; in BN_mod_exp_mont() local
676 wvalue <<= (i - wsize); in BN_mod_exp_mont()
677 wvalue |= 1; in BN_mod_exp_mont()
691 assert(wvalue & 1); in BN_mod_exp_mont()
692 assert(wvalue < (1 << window)); in BN_mod_exp_mont()
694 if (!BN_copy(r, val[wvalue >> 1])) { in BN_mod_exp_mont()
697 } else if (!BN_mod_mul_montgomery(r, r, val[wvalue >> 1], mont, ctx)) { in BN_mod_exp_mont()
776 unsigned wvalue = 1; in bn_mod_exp_mont_small() local
780 wvalue <<= (i - wsize); in bn_mod_exp_mont_small()
781 wvalue |= 1; in bn_mod_exp_mont_small()
793 assert(wvalue & 1); in bn_mod_exp_mont_small()
794 assert(wvalue < (1u << window)); in bn_mod_exp_mont_small()
796 OPENSSL_memcpy(r, val[wvalue >> 1], num * sizeof(BN_ULONG)); in bn_mod_exp_mont_small()
798 bn_mod_mul_montgomery_small(r, r, val[wvalue >> 1], num, mont); in bn_mod_exp_mont_small()
904 int i, ret = 0, window, wvalue; in BN_mod_exp_mont_consttime() local
1087 for (wvalue = 0, i = bits % 5; i >= 0; i--, bits--) { in BN_mod_exp_mont_consttime()
1088 wvalue = (wvalue << 1) + BN_is_bit_set(p, bits); in BN_mod_exp_mont_consttime()
1090 bn_gather5(tmp.d, top, powerbuf, wvalue); in BN_mod_exp_mont_consttime()
1100 for (wvalue = 0, i = 0; i < 5; i++, bits--) { in BN_mod_exp_mont_consttime()
1101 wvalue = (wvalue << 1) + BN_is_bit_set(p, bits); in BN_mod_exp_mont_consttime()
1109 bn_mul_mont_gather5(tmp.d, tmp.d, powerbuf, np, n0, top, wvalue); in BN_mod_exp_mont_consttime()
1124 wvalue = p_bytes[p->width * BN_BYTES - 1]; in BN_mod_exp_mont_consttime()
1125 wvalue >>= (bits - 4) & 7; in BN_mod_exp_mont_consttime()
1126 wvalue &= 0x1f; in BN_mod_exp_mont_consttime()
1128 bn_power5(tmp.d, tmp.d, powerbuf, np, n0, top, wvalue); in BN_mod_exp_mont_consttime()
1178 for (wvalue = 0, i = bits % window; i >= 0; i--, bits--) { in BN_mod_exp_mont_consttime()
1179 wvalue = (wvalue << 1) + BN_is_bit_set(p, bits); in BN_mod_exp_mont_consttime()
1181 if (!copy_from_prebuf(&tmp, top, powerbuf, wvalue, window)) { in BN_mod_exp_mont_consttime()
1188 wvalue = 0; // The 'value' of the window in BN_mod_exp_mont_consttime()
1195 wvalue = (wvalue << 1) + BN_is_bit_set(p, bits); in BN_mod_exp_mont_consttime()
1199 if (!copy_from_prebuf(&am, top, powerbuf, wvalue, window)) { in BN_mod_exp_mont_consttime()