Lines Matching refs:n0

568   BIGNUM *n0, *n1, *n2, *n3, *n4, *n5, *n6;  in ec_GFp_simple_add()  local
593 n0 = BN_CTX_get(ctx); in ec_GFp_simple_add()
617 if (!field_sqr(group, n0, &b->Z, ctx) || in ec_GFp_simple_add()
618 !field_mul(group, n1, &a->X, n0, ctx)) { in ec_GFp_simple_add()
623 if (!field_mul(group, n0, n0, &b->Z, ctx) || in ec_GFp_simple_add()
624 !field_mul(group, n2, &a->Y, n0, ctx)) { in ec_GFp_simple_add()
638 if (!field_sqr(group, n0, &a->Z, ctx) || in ec_GFp_simple_add()
639 !field_mul(group, n3, &b->X, n0, ctx)) { in ec_GFp_simple_add()
644 if (!field_mul(group, n0, n0, &a->Z, ctx) || in ec_GFp_simple_add()
645 !field_mul(group, n4, &b->Y, n0, ctx)) { in ec_GFp_simple_add()
690 if (!BN_copy(n0, &b->Z)) { in ec_GFp_simple_add()
694 if (!BN_copy(n0, &a->Z)) { in ec_GFp_simple_add()
697 } else if (!field_mul(group, n0, &a->Z, &b->Z, ctx)) { in ec_GFp_simple_add()
700 if (!field_mul(group, &r->Z, n0, n5, ctx)) { in ec_GFp_simple_add()
708 if (!field_sqr(group, n0, n6, ctx) || in ec_GFp_simple_add()
711 !BN_mod_sub_quick(&r->X, n0, n3, p)) { in ec_GFp_simple_add()
717 if (!BN_mod_lshift1_quick(n0, &r->X, p) || in ec_GFp_simple_add()
718 !BN_mod_sub_quick(n0, n3, n0, p)) { in ec_GFp_simple_add()
724 if (!field_mul(group, n0, n0, n6, ctx) || in ec_GFp_simple_add()
729 !BN_mod_sub_quick(n0, n0, n1, p)) { in ec_GFp_simple_add()
732 if (BN_is_odd(n0) && !BN_add(n0, n0, p)) { in ec_GFp_simple_add()
736 if (!BN_rshift1(&r->Y, n0)) { in ec_GFp_simple_add()
759 BIGNUM *n0, *n1, *n2, *n3; in ec_GFp_simple_dbl() local
780 n0 = BN_CTX_get(ctx); in ec_GFp_simple_dbl()
795 if (!field_sqr(group, n0, &a->X, ctx) || in ec_GFp_simple_dbl()
796 !BN_mod_lshift1_quick(n1, n0, p) || in ec_GFp_simple_dbl()
797 !BN_mod_add_quick(n0, n0, n1, p) || in ec_GFp_simple_dbl()
798 !BN_mod_add_quick(n1, n0, &group->a, p)) { in ec_GFp_simple_dbl()
804 !BN_mod_add_quick(n0, &a->X, n1, p) || in ec_GFp_simple_dbl()
806 !field_mul(group, n1, n0, n2, ctx) || in ec_GFp_simple_dbl()
807 !BN_mod_lshift1_quick(n0, n1, p) || in ec_GFp_simple_dbl()
808 !BN_mod_add_quick(n1, n0, n1, p)) { in ec_GFp_simple_dbl()
814 if (!field_sqr(group, n0, &a->X, ctx) || in ec_GFp_simple_dbl()
815 !BN_mod_lshift1_quick(n1, n0, p) || in ec_GFp_simple_dbl()
816 !BN_mod_add_quick(n0, n0, n1, p) || in ec_GFp_simple_dbl()
820 !BN_mod_add_quick(n1, n1, n0, p)) { in ec_GFp_simple_dbl()
828 if (!BN_copy(n0, &a->Y)) { in ec_GFp_simple_dbl()
831 } else if (!field_mul(group, n0, &a->Y, &a->Z, ctx)) { in ec_GFp_simple_dbl()
834 if (!BN_mod_lshift1_quick(&r->Z, n0, p)) { in ec_GFp_simple_dbl()
849 if (!BN_mod_lshift1_quick(n0, n2, p) || in ec_GFp_simple_dbl()
851 !BN_mod_sub_quick(&r->X, &r->X, n0, p)) { in ec_GFp_simple_dbl()
857 if (!field_sqr(group, n0, n3, ctx) || in ec_GFp_simple_dbl()
858 !BN_mod_lshift_quick(n3, n0, 3, p)) { in ec_GFp_simple_dbl()
864 if (!BN_mod_sub_quick(n0, n2, &r->X, p) || in ec_GFp_simple_dbl()
865 !field_mul(group, n0, n1, n0, ctx) || in ec_GFp_simple_dbl()
866 !BN_mod_sub_quick(&r->Y, n0, n3, p)) { in ec_GFp_simple_dbl()