Lines Matching refs:py
58 /* Checks if point P(px, py) is at infinity. Uses affine coordinates. */
60 ec_GFp_pt_is_inf_aff(const mp_int *px, const mp_int *py)
63 if ((mp_cmp_z(px) == 0) && (mp_cmp_z(py) == 0)) {
71 /* Sets P(px, py) to be the point at infinity. Uses affine coordinates. */
73 ec_GFp_pt_set_inf_aff(mp_int *px, mp_int *py)
76 mp_zero(py);
85 ec_GFp_pt_add_aff(const mp_int *px, const mp_int *py, const mp_int *qx,
101 if (ec_GFp_pt_is_inf_aff(px, py) == 0) {
110 MP_CHECKOK(mp_copy(py, ry));
114 /* if px != qx, then lambda = (py-qy) / (px-qx) */
116 MP_CHECKOK(group->meth->field_sub(py, qy, &tempy, group->meth));
121 /* if py != qy or qy = 0, then R = inf */
122 if (((mp_cmp(py, qy) != 0)) || (mp_cmp_z(qy) == 0)) {
171 ec_GFp_pt_sub_aff(const mp_int *px, const mp_int *py, const mp_int *qx,
182 res = group->point_add(px, py, qx, &nqy, rx, ry, group);
192 ec_GFp_pt_dbl_aff(const mp_int *px, const mp_int *py, mp_int *rx,
195 return ec_GFp_pt_add_aff(px, py, px, py, rx, ry, group);
205 ec_GFp_pt_mul_aff(const mp_int *n, const mp_int *px, const mp_int *py,
234 MP_CHECKOK(mp_copy(py, &qy));
298 ec_GFp_validate_point(const mp_int *px, const mp_int *py, const ECGroup *group)
315 if (ec_GFp_pt_is_inf_aff(px, py) == MP_YES) {
323 (MP_SIGN(py) == MP_NEG) || (mp_cmp(py, &group->meth->irr) >= 0)) {
330 group->meth->field_enc(py, &pyt, group->meth);
333 mp_copy(py, &pyt);
352 MP_CHECKOK( ECPoint_mul(group, &group->order, px, py, &pxt, &pyt) );