Lines Matching refs:g
583 BIGNUM *g, *temp = NULL; in BN_gcd() local
606 g = BN_CTX_get(ctx); in BN_gcd()
609 if (g == NULL in BN_gcd()
610 || !BN_lshift1(g, in_b) in BN_gcd()
618 for (i = 0; i < r->dmax && i < g->dmax; i++) { in BN_gcd()
619 pow2_numbits_temp = r->d[i] | g->d[i]; in BN_gcd()
637 || !BN_rshift(g, g, pow2_shifts)) in BN_gcd()
641 top = 1 + ((r->top >= g->top) ? r->top : g->top); in BN_gcd()
643 || bn_wexpand(g, top) == NULL in BN_gcd()
648 BN_consttime_swap((~r->d[0]) & 1, r, g, top); in BN_gcd()
652 glen = BN_num_bits(g); in BN_gcd()
657 cond = ((unsigned int)-delta >> (8 * sizeof(delta) - 1)) & g->d[0] & 1 in BN_gcd()
659 & (~((unsigned int)(g->top - 1) >> (sizeof(g->top) * 8 - 1))); in BN_gcd()
663 BN_consttime_swap(cond, r, g, top); in BN_gcd()
667 if (!BN_add(temp, g, r)) in BN_gcd()
669 BN_consttime_swap(g->d[0] & 1 /* g is odd */ in BN_gcd()
671 & (~((unsigned int)(g->top - 1) >> (sizeof(g->top) * 8 - 1))), in BN_gcd()
672 g, temp, top); in BN_gcd()
673 if (!BN_rshift1(g, g)) in BN_gcd()