Lines Matching defs:k1
108 /* Elliptic curve scalar-point multiplication. Computes R(x, y) = k1 * G +
110 * points on the elliptic curve. Allows k1 = NULL or { k2, P } = NULL.
113 ec_pts_mul_basic(const mp_int *k1, const mp_int *k2, const mp_int *px,
121 ARGCHK(!((k1 == NULL)
126 if (k1 == NULL) {
129 return ECPoint_mul(group, k1, NULL, NULL, rx, ry);
134 MP_CHECKOK(mp_init(&sx, FLAG(k1)));
135 MP_CHECKOK(mp_init(&sy, FLAG(k1)));
137 MP_CHECKOK(ECPoint_mul(group, k1, NULL, NULL, &sx, &sy));
160 /* Elliptic curve scalar-point multiplication. Computes R(x, y) = k1 * G +
162 * points on the elliptic curve. Allows k1 = NULL or { k2, P } = NULL.
168 ec_pts_mul_simul_w2(const mp_int *k1, const mp_int *k2, const mp_int *px,
179 ARGCHK(!((k1 == NULL)
184 if (k1 == NULL) {
187 return ECPoint_mul(group, k1, NULL, NULL, rx, ry);
200 ECL_MAX_FIELD_SIZE_DIGITS, FLAG(k1)) );
202 ECL_MAX_FIELD_SIZE_DIGITS, FLAG(k1)) );
207 /* assign {k1, k2} = {a, b} such that len(a) >= len(b) */
208 if (mpl_significant_bits(k1) < mpl_significant_bits(k2)) {
210 b = k1;
223 a = k1;
313 /* Elliptic curve scalar-point multiplication. Computes R(x, y) = k1 * G +
315 * points on the elliptic curve. Allows k1 = NULL or { k2, P } = NULL.
318 ECPoints_mul(const ECGroup *group, const mp_int *k1, const mp_int *k2,
331 if (k1 != NULL) {
332 if (mp_cmp(k1, &group->order) >= 0) {
333 MP_CHECKOK(mp_init(&k1t, FLAG(k1)));
334 MP_CHECKOK(mp_mod(k1, &group->order, &k1t));
337 k1p = k1;
340 k1p = k1;