Lines Matching defs:py
61 /* Converts a point P(px, py) from affine coordinates to Jacobian
66 ec_GFp_pt_aff2jac(const mp_int *px, const mp_int *py, mp_int *rx,
71 if (ec_GFp_pt_is_inf_aff(px, py) == MP_YES) {
75 MP_CHECKOK(mp_copy(py, ry));
85 /* Converts a point P(px, py, pz) from Jacobian projective coordinates to
90 ec_GFp_pt_jac2aff(const mp_int *px, const mp_int *py, const mp_int *pz,
104 if (ec_GFp_pt_is_inf_jac(px, py, pz) == MP_YES) {
109 /* transform (px, py, pz) into (px / pz^2, py / pz^3) */
112 MP_CHECKOK(mp_copy(py, ry));
118 MP_CHECKOK(group->meth->field_mul(py, &z3, ry, group->meth));
128 /* Checks if point P(px, py, pz) is at infinity. Uses Jacobian
131 ec_GFp_pt_is_inf_jac(const mp_int *px, const mp_int *py, const mp_int *pz)
136 /* Sets P(px, py, pz) to be the point at infinity. Uses Jacobian
139 ec_GFp_pt_set_inf_jac(mp_int *px, mp_int *py, mp_int *pz)
145 /* Computes R = P + Q where R is (rx, ry, rz), P is (px, py, pz) and Q is
153 ec_GFp_pt_add_jac_aff(const mp_int *px, const mp_int *py, const mp_int *pz,
175 if (ec_GFp_pt_is_inf_jac(px, py, pz) == MP_YES) {
181 MP_CHECKOK(mp_copy(py, ry));
192 /* C = A - px, D = B - py */
194 MP_CHECKOK(group->meth->field_sub(&B, py, &D, group->meth));
213 /* C3 = py * C^3 */
214 MP_CHECKOK(group->meth->field_mul(py, &C3, &C3, group->meth));
216 /* ry = D * (px * C^2 - rx) - py * C^3 */
242 ec_GFp_pt_dbl_jac(const mp_int *px, const mp_int *py, const mp_int *pz,
257 if (ec_GFp_pt_is_inf_jac(px, py, pz) == MP_YES) {
289 /* rz = 2 * py * pz */
290 /* t0 = 4 * py^2 */
292 MP_CHECKOK(group->meth->field_add(py, py, rz, group->meth));
295 MP_CHECKOK(group->meth->field_add(py, py, &t0, group->meth));
300 /* S = 4 * px * py^2 = px * (2 * py)^2 */
308 /* ry = M * (S - rx) - 8 * py^4 */
328 /* Computes R = nP where R is (rx, ry) and P is (px, py). The parameters
335 ec_GFp_pt_mul_jac(const mp_int *n, const mp_int *px, const mp_int *py,
349 ARGCHK((n != NULL) && (px != NULL) && (py != NULL), MP_BADARG);
361 MP_CHECKOK(mp_copy(py, &precomp[1][1]));
417 const mp_int *py, mp_int *rx, mp_int *ry,
438 || (py == NULL))), MP_BADARG);
442 return ECPoint_mul(group, k2, px, py, rx, ry);
443 } else if ((k2 == NULL) || (px == NULL) || (py == NULL)) {
464 field_enc(py, &precomp[1][0][1], group->meth));
467 MP_CHECKOK(mp_copy(py, &precomp[1][0][1]));
480 field_enc(py, &precomp[0][1][1], group->meth));
483 MP_CHECKOK(mp_copy(py, &precomp[0][1][1]));