Lines Matching defs:k1
100 /* Elliptic curve scalar-point multiplication. Computes R(x, y) = k1 * G +
102 * points on the elliptic curve. Allows k1 = NULL or { k2, P } = NULL.
105 ec_pts_mul_basic(const mp_int *k1, const mp_int *k2, const mp_int *px,
113 ARGCHK(!((k1 == NULL)
118 if (k1 == NULL) {
121 return ECPoint_mul(group, k1, NULL, NULL, rx, ry);
126 MP_CHECKOK(mp_init(&sx, FLAG(k1)));
127 MP_CHECKOK(mp_init(&sy, FLAG(k1)));
129 MP_CHECKOK(ECPoint_mul(group, k1, NULL, NULL, &sx, &sy));
152 /* Elliptic curve scalar-point multiplication. Computes R(x, y) = k1 * G +
154 * points on the elliptic curve. Allows k1 = NULL or { k2, P } = NULL.
160 ec_pts_mul_simul_w2(const mp_int *k1, const mp_int *k2, const mp_int *px,
171 ARGCHK(!((k1 == NULL)
176 if (k1 == NULL) {
179 return ECPoint_mul(group, k1, NULL, NULL, rx, ry);
192 ECL_MAX_FIELD_SIZE_DIGITS, FLAG(k1)) );
194 ECL_MAX_FIELD_SIZE_DIGITS, FLAG(k1)) );
199 /* assign {k1, k2} = {a, b} such that len(a) >= len(b) */
200 if (mpl_significant_bits(k1) < mpl_significant_bits(k2)) {
202 b = k1;
215 a = k1;
305 /* Elliptic curve scalar-point multiplication. Computes R(x, y) = k1 * G +
307 * points on the elliptic curve. Allows k1 = NULL or { k2, P } = NULL.
310 ECPoints_mul(const ECGroup *group, const mp_int *k1, const mp_int *k2,
323 if (k1 != NULL) {
324 if (mp_cmp(k1, &group->order) >= 0) {
325 MP_CHECKOK(mp_init(&k1t, FLAG(k1)));
326 MP_CHECKOK(mp_mod(k1, &group->order, &k1t));
329 k1p = k1;
332 k1p = k1;