Lines Matching defs:qx
79 ec_GF2m_pt_add_aff(const mp_int *px, const mp_int *py, const mp_int *qx,
94 MP_CHECKOK(mp_copy(qx, rx));
100 if (ec_GF2m_pt_is_inf_aff(qx, qy) == 0) {
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));
121 field_add(&tempx, qx, &tempx, group->meth));
123 /* if py != qy or qx = 0, then R = inf */
124 if (((mp_cmp(py, qy) != 0)) || (mp_cmp_z(qx) == 0)) {
130 /* lambda = qx + qy / qx */
131 MP_CHECKOK(group->meth->field_div(qy, qx, &lambda, group->meth));
133 field_add(&lambda, qx, &lambda, group->meth));
141 /* ry = (qx + tempx) * lambda + tempx + qy */
142 MP_CHECKOK(group->meth->field_add(qx, &tempx, &tempy, group->meth));
161 ec_GF2m_pt_sub_aff(const mp_int *px, const mp_int *py, const mp_int *qx,
170 /* nqy = qx+qy */
171 MP_CHECKOK(group->meth->field_add(qx, qy, &nqy, group->meth));
172 MP_CHECKOK(group->point_add(px, py, qx, &nqy, rx, ry, group));
196 mp_int k, k3, qx, qy, sx, sy;
201 MP_DIGITS(&qx) = 0;
207 MP_CHECKOK(mp_init(&qx));
220 MP_CHECKOK(mp_copy(px, &qx));
225 MP_CHECKOK(group->meth->field_add(&qx, &qy, &qy, group->meth));
230 MP_CHECKOK(mp_copy(&qx, &sx));
238 point_add(&sx, &sy, &qx, &qy, &sx, &sy, group));
247 MP_CHECKOK(mp_copy(&qx, &sx));
260 point_add(&sx, &sy, &qx, &qy, &sx, &sy, group));
264 point_sub(&sx, &sy, &qx, &qy, &sx, &sy, group));
275 mp_clear(&qx);