Lines Matching defs:py
45 /* Checks if point P(px, py) is at infinity. Uses affine coordinates. */
47 ec_GF2m_pt_is_inf_aff(const mp_int *px, const mp_int *py)
50 if ((mp_cmp_z(px) == 0) && (mp_cmp_z(py) == 0)) {
58 /* Sets P(px, py) to be the point at infinity. Uses affine coordinates. */
60 ec_GF2m_pt_set_inf_aff(mp_int *px, mp_int *py)
63 mp_zero(py);
70 ec_GF2m_pt_add_aff(const mp_int *px, const mp_int *py, const mp_int *qx,
84 if (ec_GF2m_pt_is_inf_aff(px, py) == 0) {
93 MP_CHECKOK(mp_copy(py, ry));
97 /* if px != qx, then lambda = (py+qy) / (px+qx), tempx = a + lambda^2
100 MP_CHECKOK(group->meth->field_add(py, qy, &tempy, group->meth));
114 /* if py != qy or qx = 0, then R = inf */
115 if (((mp_cmp(py, qy) != 0)) || (mp_cmp_z(qx) == 0)) {
152 ec_GF2m_pt_sub_aff(const mp_int *px, const mp_int *py, const mp_int *qx,
163 MP_CHECKOK(group->point_add(px, py, qx, &nqy, rx, ry, group));
172 ec_GF2m_pt_dbl_aff(const mp_int *px, const mp_int *py, mp_int *rx,
175 return group->point_add(px, py, px, py, rx, ry, group);
183 ec_GF2m_pt_mul_aff(const mp_int *n, const mp_int *px, const mp_int *py,
212 MP_CHECKOK(mp_copy(py, &qy));
276 ec_GF2m_validate_point(const mp_int *px, const mp_int *py, const ECGroup *group)
293 if (ec_GF2m_pt_is_inf_aff(px, py) == MP_YES) {
301 (MP_SIGN(py) == MP_NEG) || (mp_cmp(py, &group->meth->irr) >= 0)) {
308 group->meth->field_enc(py, &pyt, group->meth);
311 mp_copy(py, &pyt);
332 MP_CHECKOK( ECPoint_mul(group, &group->order, px, py, &pxt, &pyt) );