Home | History | Annotate | Download | only in ec

Lines Matching refs:n1

568   BIGNUM *n0, *n1, *n2, *n3, *n4, *n5, *n6;
594 n1 = BN_CTX_get(ctx);
609 /* n1, n2 */
611 if (!BN_copy(n1
614 /* n1 = X_a */
618 !field_mul(group, n1, &a->X, n0, ctx)) {
621 /* n1 = X_a * Z_b^2 */
652 if (!BN_mod_sub_quick(n5, n1, n3, p) ||
656 /* n5 = n1 - n3 */
676 if (!BN_mod_add_quick(n1, n1, n3, p) ||
680 /* 'n7' = n1 + n3 */
710 !field_mul(group, n3, n1, n4, ctx) ||
728 if (!field_mul(group, n1, n2, n5, ctx) ||
729 !BN_mod_sub_quick(n0, n0, n1, p)) {
759 BIGNUM *n0, *n1, *n2, *n3;
781 n1 = BN_CTX_get(ctx);
793 /* n1 */
796 !BN_mod_lshift1_quick(n1, n0, p) ||
797 !BN_mod_add_quick(n0, n0, n1, p) ||
798 !BN_mod_add_quick(n1, n0, &group->a, p)) {
801 /* n1 = 3 * X_a^2 + a_curve */
803 if (!field_sqr(group, n1, &a->Z, ctx) ||
804 !BN_mod_add_quick(n0, &a->X, n1, p) ||
805 !BN_mod_sub_quick(n2, &a->X, n1, p) ||
806 !field_mul(group, n1, n0, n2, ctx) ||
807 !BN_mod_lshift1_quick(n0, n1, p) ||
808 !BN_mod_add_quick(n1, n0, n1, p)) {
811 /* n1 = 3 * (X_a + Z_a^2) * (X_a - Z_a^2)
815 !BN_mod_lshift1_quick(n1, n0, p) ||
816 !BN_mod_add_quick(n0, n0, n1, p) ||
817 !field_sqr(group, n1, &a->Z, ctx) ||
818 !field_sqr(group, n1, n1, ctx) ||
819 !field_mul(group, n1, n1, &group->a, ctx) ||
820 !BN_mod_add_quick(n1, n1, n0, p)) {
823 /* n1 = 3 * X_a^2 + a_curve * Z_a^4 */
850 !field_sqr(group, &r->X, n1, ctx) ||
854 /* X_r = n1^2 - 2 * n2 */
865 !field_mul(group, n0, n1, n0, ctx) ||
869 /* Y_r = n1 * (n2 - X_r) - n3 */