Lines Matching refs:t2

425    fp_int t1, t2;  in tfm_ecc_projective_dbl_point()  local
437 fp_init(&t2); in tfm_ecc_projective_dbl_point()
468 fp_sub(R->x, &t1, &t2); in tfm_ecc_projective_dbl_point()
469 if (fp_cmp_d(&t2, 0) == LTC_MP_LT) { in tfm_ecc_projective_dbl_point()
470 fp_add(&t2, modulus, &t2); in tfm_ecc_projective_dbl_point()
478 fp_mul(&t1, &t2, &t2); in tfm_ecc_projective_dbl_point()
479 fp_montgomery_reduce(&t2, modulus, mp); in tfm_ecc_projective_dbl_point()
481 fp_add(&t2, &t2, &t1); in tfm_ecc_projective_dbl_point()
486 fp_add(&t1, &t2, &t1); in tfm_ecc_projective_dbl_point()
493 fp_sqr(&t1, &t2); in tfm_ecc_projective_dbl_point()
494 fp_montgomery_reduce(&t2, modulus, mp); in tfm_ecc_projective_dbl_point()
496 fp_mul(&t2, ma, &t1); in tfm_ecc_projective_dbl_point()
499 fp_sqr(R->x, &t2); in tfm_ecc_projective_dbl_point()
500 fp_montgomery_reduce(&t2, modulus, mp); in tfm_ecc_projective_dbl_point()
502 fp_add(&t1, &t2, &t1); in tfm_ecc_projective_dbl_point()
507 fp_add(&t1, &t2, &t1); in tfm_ecc_projective_dbl_point()
512 fp_add(&t1, &t2, &t1); in tfm_ecc_projective_dbl_point()
527 fp_sqr(R->y, &t2); in tfm_ecc_projective_dbl_point()
528 fp_montgomery_reduce(&t2, modulus, mp); in tfm_ecc_projective_dbl_point()
530 if (fp_isodd(&t2)) { in tfm_ecc_projective_dbl_point()
531 fp_add(&t2, modulus, &t2); in tfm_ecc_projective_dbl_point()
533 fp_div_2(&t2, &t2); in tfm_ecc_projective_dbl_point()
561 fp_sub(R->y, &t2, R->y); in tfm_ecc_projective_dbl_point()
580 fp_int t1, t2, x, y, z; in tfm_ecc_projective_add_point() local
593 fp_init(&t2); in tfm_ecc_projective_add_point()
648 fp_mul(Q->x, &t1, &t2); in tfm_ecc_projective_add_point()
649 fp_montgomery_reduce(&t2, modulus, mp); in tfm_ecc_projective_add_point()
673 fp_sub(&x, &t2, &x); in tfm_ecc_projective_add_point()
678 fp_add(&t2, &t2, &t2); in tfm_ecc_projective_add_point()
679 if (fp_cmp(&t2, modulus) != FP_LT) { in tfm_ecc_projective_add_point()
680 fp_sub(&t2, modulus, &t2); in tfm_ecc_projective_add_point()
683 fp_add(&t2, &x, &t2); in tfm_ecc_projective_add_point()
684 if (fp_cmp(&t2, modulus) != FP_LT) { in tfm_ecc_projective_add_point()
685 fp_sub(&t2, modulus, &t2); in tfm_ecc_projective_add_point()
706 fp_mul(&t2, &x, &t2); in tfm_ecc_projective_add_point()
707 fp_montgomery_reduce(&t2, modulus, mp); in tfm_ecc_projective_add_point()
716 fp_sub(&x, &t2, &x); in tfm_ecc_projective_add_point()
722 fp_sub(&t2, &x, &t2); in tfm_ecc_projective_add_point()
723 if (fp_cmp_d(&t2, 0) == FP_LT) { in tfm_ecc_projective_add_point()
724 fp_add(&t2, modulus, &t2); in tfm_ecc_projective_add_point()
727 fp_sub(&t2, &x, &t2); in tfm_ecc_projective_add_point()
728 if (fp_cmp_d(&t2, 0) == FP_LT) { in tfm_ecc_projective_add_point()
729 fp_add(&t2, modulus, &t2); in tfm_ecc_projective_add_point()
732 fp_mul(&t2, &y, &t2); in tfm_ecc_projective_add_point()
733 fp_montgomery_reduce(&t2, modulus, mp); in tfm_ecc_projective_add_point()
735 fp_sub(&t2, &t1, &y); in tfm_ecc_projective_add_point()