Lines Matching defs:px

54 /* Checks if point P(px, py) is at infinity.  Uses affine coordinates. */
56 ec_GF2m_pt_is_inf_aff(const mp_int *px, const mp_int *py)
59 if ((mp_cmp_z(px) == 0) && (mp_cmp_z(py) == 0)) {
67 /* Sets P(px, py) to be the point at infinity. Uses affine coordinates. */
69 ec_GF2m_pt_set_inf_aff(mp_int *px, mp_int *py)
71 mp_zero(px);
79 ec_GF2m_pt_add_aff(const mp_int *px, const mp_int *py, const mp_int *qx,
89 MP_CHECKOK(mp_init(&lambda, FLAG(px)));
90 MP_CHECKOK(mp_init(&tempx, FLAG(px)));
91 MP_CHECKOK(mp_init(&tempy, FLAG(px)));
93 if (ec_GF2m_pt_is_inf_aff(px, py) == 0) {
101 MP_CHECKOK(mp_copy(px, rx));
106 /* if px != qx, then lambda = (py+qy) / (px+qx), tempx = a + lambda^2
107 * + lambda + px + qx */
108 if (mp_cmp(px, qx) != 0) {
110 MP_CHECKOK(group->meth->field_add(px, qx, &tempx, group->meth));
119 field_add(&tempx, px, &tempx, group->meth));
161 ec_GF2m_pt_sub_aff(const mp_int *px, const mp_int *py, const mp_int *qx,
169 MP_CHECKOK(mp_init(&nqy, FLAG(px)));
172 MP_CHECKOK(group->point_add(px, py, qx, &nqy, rx, ry, group));
181 ec_GF2m_pt_dbl_aff(const mp_int *px, const mp_int *py, mp_int *rx,
184 return group->point_add(px, py, px, py, rx, ry, group);
192 ec_GF2m_pt_mul_aff(const mp_int *n, const mp_int *px, const mp_int *py,
220 MP_CHECKOK(mp_copy(px, &qx));
285 ec_GF2m_validate_point(const mp_int *px, const mp_int *py, const ECGroup *group)
295 MP_CHECKOK(mp_init(&accl, FLAG(px)));
296 MP_CHECKOK(mp_init(&accr, FLAG(px)));
297 MP_CHECKOK(mp_init(&tmp, FLAG(px)));
298 MP_CHECKOK(mp_init(&pxt, FLAG(px)));
299 MP_CHECKOK(mp_init(&pyt, FLAG(px)));
302 if (ec_GF2m_pt_is_inf_aff(px, py) == MP_YES) {
309 if ((MP_SIGN(px) == MP_NEG) || (mp_cmp(px, &group->meth->irr) >= 0) ||
316 group->meth->field_enc(px, &pxt, group->meth);
319 mp_copy(px, &pxt);
341 MP_CHECKOK( ECPoint_mul(group, &group->order, px, py, &pxt, &pyt) );