64 #if defined( INC_ALL )
70 #if defined( USE_ECDH ) || defined( USE_ECDSA )
89 ret =
clBnAlloc(
"EC_GROUP_new",
sizeof *ret);
229 if (dest->
seed == NULL)
253 if (a == NULL)
return NULL;
284 if (generator == NULL)
302 if (cofactor != NULL)
384 if ((group->
seed =
clBnAlloc(
"EC_GROUP_set_seed", len)) == NULL)
386 memcpy(group->
seed, p, len);
474 BIGNUM *a1, *a2, *a3, *b1, *b2, *b3;
548 void *(*dup_func)(
void *),
void (*free_func)(
void *),
void (*clear_free_func)(
void *))
555 for (d = *ex_data; d != NULL; d = d->
next)
568 d =
clBnAlloc(
"EC_EX_DATA_set_data",
sizeof *d);
585 void *(*dup_func)(
void *),
void (*free_func)(
void *),
void (*clear_free_func)(
void *))
589 for (d = ex_data; d != NULL; d = d->
next)
600 void *(*dup_func)(
void *),
void (*free_func)(
void *),
void (*clear_free_func)(
void *))
607 for (p = ex_data; *p != NULL; p = &((*p)->next))
609 if ((*p)->dup_func == dup_func && (*p)->free_func == free_func && (*p)->clear_free_func == clear_free_func)
624 void *(*dup_func)(
void *),
void (*free_func)(
void *),
void (*clear_free_func)(
void *))
631 for (p = ex_data; *p != NULL; p = &((*p)->next))
633 if ((*p)->dup_func == dup_func && (*p)->free_func == free_func && (*p)->clear_free_func == clear_free_func)
706 ret =
clBnAlloc(
"EC_POINT_new",
sizeof *ret);
771 if (a == NULL)
return NULL;
774 if (t == NULL)
return(NULL);
944 unsigned char *buf,
size_t len,
BN_CTX *ctx)
956 return group->
meth->
point2oct(group, point, form, buf, len, ctx);
961 const unsigned char *buf,
size_t len,
BN_CTX *ctx)
989 return group->
meth->
add(group, r, a, b, ctx);
1005 return group->
meth->
dbl(group, r, a, ctx);
1098 for (i = 0; i < num; i++)
1100 if (group->
meth != points[i]->
meth)
1121 return ec_wNAF_mul(group, r, scalar, num, points, scalars, ctx);
1123 return group->
meth->
mul(group, r, scalar, num, points, scalars, ctx);
1132 const BIGNUM *scalars[1];
1135 scalars[0] = p_scalar;
1137 return EC_POINTs_mul(group, r, g_scalar, (point != NULL && p_scalar != NULL), points, scalars, ctx);