Lines Matching defs:py
49 /* Checks if point P(px, py) is at infinity. Uses affine coordinates. */
51 ec_GFp_pt_is_inf_aff(const mp_int *px, const mp_int *py)
54 if ((mp_cmp_z(px) == 0) && (mp_cmp_z(py) == 0)) {
62 /* Sets P(px, py) to be the point at infinity. Uses affine coordinates. */
64 ec_GFp_pt_set_inf_aff(mp_int *px, mp_int *py)
67 mp_zero(py);
76 ec_GFp_pt_add_aff(const mp_int *px, const mp_int *py, const mp_int *qx,
92 if (ec_GFp_pt_is_inf_aff(px, py) == 0) {
101 MP_CHECKOK(mp_copy(py, ry));
105 /* if px != qx, then lambda = (py-qy) / (px-qx) */
107 MP_CHECKOK(group->meth->field_sub(py, qy, &tempy, group->meth));
112 /* if py != qy or qy = 0, then R = inf */
113 if (((mp_cmp(py, qy) != 0)) || (mp_cmp_z(qy) == 0)) {
162 ec_GFp_pt_sub_aff(const mp_int *px, const mp_int *py, const mp_int *qx,
173 res = group->point_add(px, py, qx, &nqy, rx, ry, group);
183 ec_GFp_pt_dbl_aff(const mp_int *px, const mp_int *py, mp_int *rx,
186 return ec_GFp_pt_add_aff(px, py, px, py, rx, ry, group);
196 ec_GFp_pt_mul_aff(const mp_int *n, const mp_int *px, const mp_int *py,
225 MP_CHECKOK(mp_copy(py, &qy));
289 ec_GFp_validate_point(const mp_int *px, const mp_int *py, const ECGroup *group)
306 if (ec_GFp_pt_is_inf_aff(px, py) == MP_YES) {
314 (MP_SIGN(py) == MP_NEG) || (mp_cmp(py, &group->meth->irr) >= 0)) {
321 group->meth->field_enc(py, &pyt, group->meth);
324 mp_copy(py, &pyt);
343 MP_CHECKOK( ECPoint_mul(group, &group->order, px, py, &pxt, &pyt) );