Home | History | Annotate | Download | only in math

Lines Matching refs:t1

410    fp_int t1, t2;
420 fp_init(&t1);
429 /* t1 = Z * Z */
430 fp_sqr(R->z, &t1);
431 fp_montgomery_reduce(&t1, modulus, mp);
441 /* &t2 = X - T1 */
442 fp_sub(R->x, &t1, &t2);
446 /* T1 = X + T1 */
447 fp_add(&t1, R->x, &t1);
448 if (fp_cmp(&t1, modulus) != FP_LT) {
449 fp_sub(&t1, modulus, &t1);
451 /* T2 = T1 * T2 */
452 fp_mul(&t1, &t2, &t2);
454 /* T1 = 2T2 */
455 fp_add(&t2, &t2, &t1);
456 if (fp_cmp(&t1, modulus) != FP_LT) {
457 fp_sub(&t1, modulus, &t1);
459 /* T1 = T1 + T2 */
460 fp_add(&t1, &t2, &t1);
461 if (fp_cmp(&t1, modulus) != FP_LT) {
462 fp_sub(&t1, modulus, &t1);
485 /* X = T1 * T1 */
486 fp_sqr(&t1, R->x);
504 /* Y = Y * T1 */
505 fp_mul(R->y, &t1, R->y);
527 fp_int t1, t2, x, y, z;
538 fp_init(&t1);
545 fp_sub(modulus, Q->y, &t1);
548 (fp_cmp(P->y, Q->y) == FP_EQ || fp_cmp(P->y, &t1) == FP_EQ)) {
558 /* T1 = Z' * Z' */
559 fp_sqr(Q->z, &t1);
560 fp_montgomery_reduce(&t1, modulus, mp);
561 /* X = X * T1 */
562 fp_mul(&t1, &x, &x);
564 /* T1 = Z' * T1 */
565 fp_mul(Q->z, &t1, &t1);
566 fp_montgomery_reduce(&t1, modulus, mp);
567 /* Y = Y * T1 */
568 fp_mul(&t1, &y, &y);
572 /* T1 = Z*Z */
573 fp_sqr(&z, &t1);
574 fp_montgomery_reduce(&t1, modulus, mp);
575 /* T2 = X' * T1 */
576 fp_mul(Q->x, &t1, &t2);
578 /* T1 = Z * T1 */
579 fp_mul(&z, &t1, &t1);
580 fp_montgomery_reduce(&t1, modulus, mp);
581 /* T1 = Y' * T1 */
582 fp_mul(Q->y, &t1, &t1);
583 fp_montgomery_reduce(&t1, modulus, mp);
585 /* Y = Y - T1 */
586 fp_sub(&y, &t1, &y);
590 /* T1 = 2T1 */
591 fp_add(&t1, &t1, &t1);
592 if (fp_cmp(&t1, modulus) != FP_LT) {
593 fp_sub(&t1, modulus, &t1);
595 /* T1 = Y + T1 */
596 fp_add(&t1, &y, &t1);
597 if (fp_cmp(&t1, modulus) != FP_LT) {
598 fp_sub(&t1, modulus, &t1);
627 /* T1 = T1 * X */
628 fp_mul(&t1, &x, &t1);
629 fp_montgomery_reduce(&t1, modulus, mp);
636 /* T1 = T1 * X */
637 fp_mul(&t1, &x, &t1);
638 fp_montgomery_reduce(&t1, modulus, mp);
662 /* Y = T2 - T1 */
663 fp_sub(&t2, &t1, &y);