Lines Matching refs:k1
109 /* Elliptic curve scalar-point multiplication. Computes R(x, y) = k1 * G +
111 * points on the elliptic curve. Allows k1 = NULL or { k2, P } = NULL.
114 ec_pts_mul_basic(const mp_int *k1, const mp_int *k2, const mp_int *px,
122 ARGCHK(!((k1 == NULL)
127 if (k1 == NULL) {
130 return ECPoint_mul(group, k1, NULL, NULL, rx, ry);
135 MP_CHECKOK(mp_init(&sx, FLAG(k1)));
136 MP_CHECKOK(mp_init(&sy, FLAG(k1)));
138 MP_CHECKOK(ECPoint_mul(group, k1, NULL, NULL, &sx, &sy));
161 /* Elliptic curve scalar-point multiplication. Computes R(x, y) = k1 * G +
163 * points on the elliptic curve. Allows k1 = NULL or { k2, P } = NULL.
169 ec_pts_mul_simul_w2(const mp_int *k1, const mp_int *k2, const mp_int *px,
180 ARGCHK(!((k1 == NULL)
185 if (k1 == NULL) {
188 return ECPoint_mul(group, k1, NULL, NULL, rx, ry);
201 ECL_MAX_FIELD_SIZE_DIGITS, FLAG(k1)) );
203 ECL_MAX_FIELD_SIZE_DIGITS, FLAG(k1)) );
208 /* assign {k1, k2} = {a, b} such that len(a) >= len(b) */
209 if (mpl_significant_bits(k1) < mpl_significant_bits(k2)) {
211 b = k1;
224 a = k1;
314 /* Elliptic curve scalar-point multiplication. Computes R(x, y) = k1 * G +
316 * points on the elliptic curve. Allows k1 = NULL or { k2, P } = NULL.
319 ECPoints_mul(const ECGroup *group, const mp_int *k1, const mp_int *k2,
332 if (k1 != NULL) {
333 if (mp_cmp(k1, &group->order) >= 0) {
334 MP_CHECKOK(mp_init(&k1t, FLAG(k1)));
335 MP_CHECKOK(mp_mod(k1, &group->order, &k1t));
338 k1p = k1;
341 k1p = k1;