Lines Matching defs:scalar

122  *          (scalar * generator)
124 * (scalar * point)
127 * `scalar` cannot be NULL and should be in the range [0,n) otherwise all
141 * input parameters `group`, `r`, `scalar` and `ctx` are not NULL.
146 const BIGNUM *scalar, const EC_POINT *point,
209 * So when we pad the scalar, some timing diff might
221 if (!BN_copy(k, scalar)) {
249 * lambda := scalar + cardinality
250 * k := scalar + 2*cardinality
407 * scalar*generator
408 * in the addition if scalar != NULL
410 int ossl_ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
433 int num_scalar = 0; /* flag: will be set to 1 if 'scalar' must be
440 * Handle the common cases where the scalar is secret, enforcing a
441 * scalar multiplication implementation based on a Montgomery ladder,
444 if ((scalar != group->order) && (scalar != NULL) && (num == 0)) {
446 * In this case we want to compute scalar * GeneratorPoint: this
449 * ECDH keygen/first half), where the scalar is always secret. This
453 return ossl_ec_scalar_mul_ladder(group, r, scalar, NULL, ctx);
455 if ((scalar == NULL) && (num == 1) && (scalars[0] != group->order)) {
457 * In this case we want to compute scalar * VariablePoint: this
459 * where the secret scalar is multiplied by the peer's public point.
460 * To protect the secret scalar, we ignore if BN_FLG_CONSTTIME is
468 if (scalar != NULL) {
487 numblocks = (BN_num_bits(scalar) / blocksize) + 1;
506 num_scalar = 1; /* treat 'scalar' like 'num'-th element of
536 bits = i < num ? BN_num_bits(scalars[i]) : BN_num_bits(scalar);
541 bn_compute_wNAF((i < num ? scalars[i] : scalar), wsize[i],
550 /* we go here iff scalar != NULL */
557 /* we have already generated a wNAF for 'scalar' */
571 tmp_wNAF = bn_compute_wNAF(scalar, wsize[num], &tmp_len);