• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/contrib/bearssl/src/ec/

Lines Matching defs:P1

815  * Add point P2 to point P1.
819 * - If P1 == 0 but P2 != 0
820 * - If P1 != 0 but P2 == 0
821 * - If P1 == P2
823 * In all three cases, P1 is set to the point at infinity.
827 * - P1 and P2 have the same Y coordinate
828 * - P1 == 0 and P2 == 0
836 * Therefore, assuming that P1 != 0 and P2 != 0 on input, then the caller
841 * P1+P2 == 0, so the result is indeed the point at infinity.
842 * - Otherwise, P1 == P2, so a "double" operation should have been
846 p256_add(p256_jacobian *P1, const p256_jacobian *P2)
869 mul_f256(t1, P1->x, t3);
871 mul_f256(t3, P1->y, t4);
876 square_f256(t4, P1->z);
878 mul_f256(t5, P1->z, t4);
905 square_f256(P1->x, t4);
906 sub_f256(P1->x, P1->x, t5);
907 sub_f256(P1->x, P1->x, t6);
908 sub_f256(P1->x, P1->x, t6);
913 sub_f256(t6, t6, P1->x);
914 mul_f256(P1->y, t4, t6);
916 sub_f256(P1->y, P1->y, t1);
921 mul_f256(t1, P1->z, P2->z);
922 mul_f256(P1->z, t1, t2);
928 * Add point P2 to point P1. This is a specialised function for the
933 * - If P1 == 0
934 * - If P1 == P2
936 * In both cases, P1 is set to the point at infinity.
940 * - P1 and P2 have the same Y coordinate
941 * - The Y coordinate of P2 is 0 and P1 is the point at infinity.
947 * Therefore, assuming that P1 != 0 on input, then the caller
952 * P1+P2 == 0, so the result is indeed the point at infinity.
953 * - Otherwise, P1 == P2, so a "double" operation should have been
957 p256_add_mixed(p256_jacobian *P1, const p256_jacobian *P2)
979 memcpy(t1, P1->x, sizeof t1);
980 memcpy(t3, P1->y, sizeof t3);
985 square_f256(t4, P1->z);
987 mul_f256(t5, P1->z, t4);
1014 square_f256(P1->x, t4);
1015 sub_f256(P1->x, P1->x, t5);
1016 sub_f256(P1->x, P1->x, t6);
1017 sub_f256(P1->x, P1->x, t6);
1022 sub_f256(t6, t6, P1->x);
1023 mul_f256(P1->y, t4, t6);
1025 sub_f256(P1->y, P1->y, t1);
1030 mul_f256(P1->z, P1->z, t2);