Lines Matching defs:py

52 /* Converts a point P(px, py) from affine coordinates to Jacobian
57 ec_GFp_pt_aff2jac(const mp_int *px, const mp_int *py, mp_int *rx,
62 if (ec_GFp_pt_is_inf_aff(px, py) == MP_YES) {
66 MP_CHECKOK(mp_copy(py, ry));
76 /* Converts a point P(px, py, pz) from Jacobian projective coordinates to
81 ec_GFp_pt_jac2aff(const mp_int *px, const mp_int *py, const mp_int *pz,
95 if (ec_GFp_pt_is_inf_jac(px, py, pz) == MP_YES) {
100 /* transform (px, py, pz) into (px / pz^2, py / pz^3) */
103 MP_CHECKOK(mp_copy(py, ry));
109 MP_CHECKOK(group->meth->field_mul(py, &z3, ry, group->meth));
119 /* Checks if point P(px, py, pz) is at infinity. Uses Jacobian
122 ec_GFp_pt_is_inf_jac(const mp_int *px, const mp_int *py, const mp_int *pz)
127 /* Sets P(px, py, pz) to be the point at infinity. Uses Jacobian
130 ec_GFp_pt_set_inf_jac(mp_int *px, mp_int *py, mp_int *pz)
136 /* Computes R = P + Q where R is (rx, ry, rz), P is (px, py, pz) and Q is
144 ec_GFp_pt_add_jac_aff(const mp_int *px, const mp_int *py, const mp_int *pz,
166 if (ec_GFp_pt_is_inf_jac(px, py, pz) == MP_YES) {
172 MP_CHECKOK(mp_copy(py, ry));
183 /* C = A - px, D = B - py */
185 MP_CHECKOK(group->meth->field_sub(&B, py, &D, group->meth));
204 /* C3 = py * C^3 */
205 MP_CHECKOK(group->meth->field_mul(py, &C3, &C3, group->meth));
207 /* ry = D * (px * C^2 - rx) - py * C^3 */
233 ec_GFp_pt_dbl_jac(const mp_int *px, const mp_int *py, const mp_int *pz,
248 if (ec_GFp_pt_is_inf_jac(px, py, pz) == MP_YES) {
280 /* rz = 2 * py * pz */
281 /* t0 = 4 * py^2 */
283 MP_CHECKOK(group->meth->field_add(py, py, rz, group->meth));
286 MP_CHECKOK(group->meth->field_add(py, py, &t0, group->meth));
291 /* S = 4 * px * py^2 = px * (2 * py)^2 */
299 /* ry = M * (S - rx) - 8 * py^4 */
319 /* Computes R = nP where R is (rx, ry) and P is (px, py). The parameters
326 ec_GFp_pt_mul_jac(const mp_int *n, const mp_int *px, const mp_int *py,
340 ARGCHK((n != NULL) && (px != NULL) && (py != NULL), MP_BADARG);
352 MP_CHECKOK(mp_copy(py, &precomp[1][1]));
408 const mp_int *py, mp_int *rx, mp_int *ry,
429 || (py == NULL))), MP_BADARG);
433 return ECPoint_mul(group, k2, px, py, rx, ry);
434 } else if ((k2 == NULL) || (px == NULL) || (py == NULL)) {
455 field_enc(py, &precomp[1][0][1], group->meth));
458 MP_CHECKOK(mp_copy(py, &precomp[1][0][1]));
471 field_enc(py, &precomp[0][1][1], group->meth));
474 MP_CHECKOK(mp_copy(py, &precomp[0][1][1]));