OpenSSL  1.0.1c
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Functions
ec_lib.c File Reference
#include <string.h>
#include <openssl/err.h>
#include <openssl/opensslv.h>
#include "ec_lcl.h"

Go to the source code of this file.

Functions

EC_GROUPEC_GROUP_new (const EC_METHOD *meth)
 
void EC_GROUP_free (EC_GROUP *group)
 
void EC_GROUP_clear_free (EC_GROUP *group)
 
int EC_GROUP_copy (EC_GROUP *dest, const EC_GROUP *src)
 
EC_GROUPEC_GROUP_dup (const EC_GROUP *a)
 
const EC_METHODEC_GROUP_method_of (const EC_GROUP *group)
 
int EC_METHOD_get_field_type (const EC_METHOD *meth)
 
int EC_GROUP_set_generator (EC_GROUP *group, const EC_POINT *generator, const BIGNUM *order, const BIGNUM *cofactor)
 
const EC_POINTEC_GROUP_get0_generator (const EC_GROUP *group)
 
int EC_GROUP_get_order (const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx)
 
int EC_GROUP_get_cofactor (const EC_GROUP *group, BIGNUM *cofactor, BN_CTX *ctx)
 
void EC_GROUP_set_curve_name (EC_GROUP *group, int nid)
 
int EC_GROUP_get_curve_name (const EC_GROUP *group)
 
void EC_GROUP_set_asn1_flag (EC_GROUP *group, int flag)
 
int EC_GROUP_get_asn1_flag (const EC_GROUP *group)
 
void EC_GROUP_set_point_conversion_form (EC_GROUP *group, point_conversion_form_t form)
 
point_conversion_form_t EC_GROUP_get_point_conversion_form (const EC_GROUP *group)
 
size_t EC_GROUP_set_seed (EC_GROUP *group, const unsigned char *p, size_t len)
 
unsigned char * EC_GROUP_get0_seed (const EC_GROUP *group)
 
size_t EC_GROUP_get_seed_len (const EC_GROUP *group)
 
int EC_GROUP_set_curve_GFp (EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
 
int EC_GROUP_get_curve_GFp (const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx)
 
int EC_GROUP_set_curve_GF2m (EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
 
int EC_GROUP_get_curve_GF2m (const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx)
 
int EC_GROUP_get_degree (const EC_GROUP *group)
 
int EC_GROUP_check_discriminant (const EC_GROUP *group, BN_CTX *ctx)
 
int EC_GROUP_cmp (const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx)
 
int EC_EX_DATA_set_data (EC_EXTRA_DATA **ex_data, void *data, void *(*dup_func)(void *), void(*free_func)(void *), void(*clear_free_func)(void *))
 
voidEC_EX_DATA_get_data (const EC_EXTRA_DATA *ex_data, void *(*dup_func)(void *), void(*free_func)(void *), void(*clear_free_func)(void *))
 
void EC_EX_DATA_free_data (EC_EXTRA_DATA **ex_data, void *(*dup_func)(void *), void(*free_func)(void *), void(*clear_free_func)(void *))
 
void EC_EX_DATA_clear_free_data (EC_EXTRA_DATA **ex_data, void *(*dup_func)(void *), void(*free_func)(void *), void(*clear_free_func)(void *))
 
void EC_EX_DATA_free_all_data (EC_EXTRA_DATA **ex_data)
 
void EC_EX_DATA_clear_free_all_data (EC_EXTRA_DATA **ex_data)
 
EC_POINTEC_POINT_new (const EC_GROUP *group)
 
void EC_POINT_free (EC_POINT *point)
 
void EC_POINT_clear_free (EC_POINT *point)
 
int EC_POINT_copy (EC_POINT *dest, const EC_POINT *src)
 
EC_POINTEC_POINT_dup (const EC_POINT *a, const EC_GROUP *group)
 
const EC_METHODEC_POINT_method_of (const EC_POINT *point)
 
int EC_POINT_set_to_infinity (const EC_GROUP *group, EC_POINT *point)
 
int EC_POINT_set_Jprojective_coordinates_GFp (const EC_GROUP *group, EC_POINT *point, const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *ctx)
 
int EC_POINT_get_Jprojective_coordinates_GFp (const EC_GROUP *group, const EC_POINT *point, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx)
 
int EC_POINT_set_affine_coordinates_GFp (const EC_GROUP *group, EC_POINT *point, const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx)
 
int EC_POINT_set_affine_coordinates_GF2m (const EC_GROUP *group, EC_POINT *point, const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx)
 
int EC_POINT_get_affine_coordinates_GFp (const EC_GROUP *group, const EC_POINT *point, BIGNUM *x, BIGNUM *y, BN_CTX *ctx)
 
int EC_POINT_get_affine_coordinates_GF2m (const EC_GROUP *group, const EC_POINT *point, BIGNUM *x, BIGNUM *y, BN_CTX *ctx)
 
int EC_POINT_add (const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx)
 
int EC_POINT_dbl (const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, BN_CTX *ctx)
 
int EC_POINT_invert (const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx)
 
int EC_POINT_is_at_infinity (const EC_GROUP *group, const EC_POINT *point)
 
int EC_POINT_is_on_curve (const EC_GROUP *group, const EC_POINT *point, BN_CTX *ctx)
 
int EC_POINT_cmp (const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx)
 
int EC_POINT_make_affine (const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx)
 
int EC_POINTs_make_affine (const EC_GROUP *group, size_t num, EC_POINT *points[], BN_CTX *ctx)
 
int EC_POINTs_mul (const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, size_t num, const EC_POINT *points[], const BIGNUM *scalars[], BN_CTX *ctx)
 
int EC_POINT_mul (const EC_GROUP *group, EC_POINT *r, const BIGNUM *g_scalar, const EC_POINT *point, const BIGNUM *p_scalar, BN_CTX *ctx)
 
int EC_GROUP_precompute_mult (EC_GROUP *group, BN_CTX *ctx)
 
int EC_GROUP_have_precompute_mult (const EC_GROUP *group)
 

Function Documentation

void EC_EX_DATA_clear_free_all_data ( EC_EXTRA_DATA **  ex_data)

Definition at line 670 of file ec_lib.c.

void EC_EX_DATA_clear_free_data ( EC_EXTRA_DATA **  ex_data,
void *(*)(void *)  dup_func,
void(*)(void *)  free_func,
void(*)(void *)  clear_free_func 
)

Definition at line 625 of file ec_lib.c.

void EC_EX_DATA_free_all_data ( EC_EXTRA_DATA **  ex_data)

Definition at line 649 of file ec_lib.c.

void EC_EX_DATA_free_data ( EC_EXTRA_DATA **  ex_data,
void *(*)(void *)  dup_func,
void(*)(void *)  free_func,
void(*)(void *)  clear_free_func 
)

Definition at line 601 of file ec_lib.c.

void* EC_EX_DATA_get_data ( const EC_EXTRA_DATA ex_data,
void *(*)(void *)  dup_func,
void(*)(void *)  free_func,
void(*)(void *)  clear_free_func 
)

Definition at line 586 of file ec_lib.c.

int EC_EX_DATA_set_data ( EC_EXTRA_DATA **  ex_data,
void data,
void *(*)(void *)  dup_func,
void(*)(void *)  free_func,
void(*)(void *)  clear_free_func 
)

Definition at line 549 of file ec_lib.c.

int EC_GROUP_check_discriminant ( const EC_GROUP group,
BN_CTX ctx 
)

Checks whether the discriminant of the elliptic curve is zero or not

Parameters
groupEC_GROUP object
ctxBN_CTX object (optional)
Returns
1 if the discriminant is not zero and 0 otherwise

Definition at line 462 of file ec_lib.c.

void EC_GROUP_clear_free ( EC_GROUP group)

Clears and frees a EC_GROUP object

Parameters
groupEC_GROUP object to be cleared and freed.

Definition at line 144 of file ec_lib.c.

int EC_GROUP_cmp ( const EC_GROUP a,
const EC_GROUP b,
BN_CTX ctx 
)

Compares two EC_GROUP objects

Parameters
afirst EC_GROUP object
bsecond EC_GROUP object
ctxBN_CTX object (optional)
Returns
0 if both groups are equal and 1 otherwise

Definition at line 473 of file ec_lib.c.

int EC_GROUP_copy ( EC_GROUP dst,
const EC_GROUP src 
)

Copies EC_GROUP objects. Note: both EC_GROUPs must use the same EC_METHOD.

Parameters
dstdestination EC_GROUP object
srcsource EC_GROUP object
Returns
1 on success and 0 if an error occurred.

Definition at line 171 of file ec_lib.c.

EC_GROUP* EC_GROUP_dup ( const EC_GROUP src)

Creates a new EC_GROUP object and copies the copies the content form src to the newly created EC_KEY object

Parameters
srcsource EC_GROUP object
Returns
newly created EC_GROUP object or NULL in case of an error.

Definition at line 250 of file ec_lib.c.

void EC_GROUP_free ( EC_GROUP group)

Frees a EC_GROUP object

Parameters
groupEC_GROUP object to be freed.

Definition at line 123 of file ec_lib.c.

const EC_POINT* EC_GROUP_get0_generator ( const EC_GROUP group)

Returns the generator of a EC_GROUP object.

Parameters
groupEC_GROUP object
Returns
the currently used generator (possibly NULL).

Definition at line 313 of file ec_lib.c.

unsigned char* EC_GROUP_get0_seed ( const EC_GROUP group)

Definition at line 395 of file ec_lib.c.

int EC_GROUP_get_asn1_flag ( const EC_GROUP group)

Definition at line 355 of file ec_lib.c.

int EC_GROUP_get_cofactor ( const EC_GROUP group,
BIGNUM cofactor,
BN_CTX ctx 
)

Gets the cofactor of a EC_GROUP

Parameters
groupEC_GROUP object
cofactorBIGNUM to which the cofactor is copied
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 328 of file ec_lib.c.

int EC_GROUP_get_curve_GF2m ( const EC_GROUP group,
BIGNUM p,
BIGNUM a,
BIGNUM b,
BN_CTX ctx 
)

Gets the parameter of the ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b

Parameters
groupEC_GROUP object
pBIGNUM for the polynomial defining the underlying field
aBIGNUM for parameter a of the equation
bBIGNUM for parameter b of the equation
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 440 of file ec_lib.c.

int EC_GROUP_get_curve_GFp ( const EC_GROUP group,
BIGNUM p,
BIGNUM a,
BIGNUM b,
BN_CTX ctx 
)

Gets the parameter of the ec over GFp defined by y^2 = x^3 + a*x + b

Parameters
groupEC_GROUP object
pBIGNUM for the prime number
aBIGNUM for parameter a of the equation
bBIGNUM for parameter b of the equation
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 418 of file ec_lib.c.

int EC_GROUP_get_curve_name ( const EC_GROUP group)

Returns the curve name of a EC_GROUP object

Parameters
groupEC_GROUP object
Returns
NID of the curve name OID or 0 if not set.

Definition at line 343 of file ec_lib.c.

int EC_GROUP_get_degree ( const EC_GROUP group)

Returns the number of bits needed to represent a field element

Parameters
groupEC_GROUP object
Returns
number of bits needed to represent a field element

Definition at line 451 of file ec_lib.c.

int EC_GROUP_get_order ( const EC_GROUP group,
BIGNUM order,
BN_CTX ctx 
)

Gets the order of a EC_GROUP

Parameters
groupEC_GROUP object
orderBIGNUM to which the order is copied
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 319 of file ec_lib.c.

point_conversion_form_t EC_GROUP_get_point_conversion_form ( const EC_GROUP group)

Definition at line 368 of file ec_lib.c.

size_t EC_GROUP_get_seed_len ( const EC_GROUP group)

Definition at line 401 of file ec_lib.c.

int EC_GROUP_have_precompute_mult ( const EC_GROUP group)

Reports whether a precomputation has been done

Parameters
groupEC_GROUP object
Returns
1 if a pre-computation has been done and 0 otherwise

Definition at line 1086 of file ec_lib.c.

const EC_METHOD* EC_GROUP_method_of ( const EC_GROUP group)

Returns the EC_METHOD of the EC_GROUP object.

Parameters
groupEC_GROUP object
Returns
EC_METHOD used in this EC_GROUP object.

Definition at line 272 of file ec_lib.c.

EC_GROUP* EC_GROUP_new ( const EC_METHOD meth)

Creates a new EC_GROUP object

Parameters
methEC_METHOD to use
Returns
newly created EC_GROUP object or NULL in case of an error.

Definition at line 76 of file ec_lib.c.

int EC_GROUP_precompute_mult ( EC_GROUP group,
BN_CTX ctx 
)

Stores multiples of generator for faster point multiplication

Parameters
groupEC_GROUP object
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 1074 of file ec_lib.c.

void EC_GROUP_set_asn1_flag ( EC_GROUP group,
int  flag 
)

Definition at line 349 of file ec_lib.c.

int EC_GROUP_set_curve_GF2m ( EC_GROUP group,
const BIGNUM p,
const BIGNUM a,
const BIGNUM b,
BN_CTX ctx 
)

Sets the parameter of a ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b

Parameters
groupEC_GROUP object
pBIGNUM with the polynomial defining the underlying field
aBIGNUM with parameter a of the equation
bBIGNUM with parameter b of the equation
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 429 of file ec_lib.c.

int EC_GROUP_set_curve_GFp ( EC_GROUP group,
const BIGNUM p,
const BIGNUM a,
const BIGNUM b,
BN_CTX ctx 
)

Sets the parameter of a ec over GFp defined by y^2 = x^3 + a*x + b

Parameters
groupEC_GROUP object
pBIGNUM with the prime number
aBIGNUM with parameter a of the equation
bBIGNUM with parameter b of the equation
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 407 of file ec_lib.c.

void EC_GROUP_set_curve_name ( EC_GROUP group,
int  nid 
)

Sets the name of a EC_GROUP object

Parameters
groupEC_GROUP object
nidNID of the curve name OID

Definition at line 337 of file ec_lib.c.

int EC_GROUP_set_generator ( EC_GROUP group,
const EC_POINT generator,
const BIGNUM order,
const BIGNUM cofactor 
)

Sets the generator and it's order/cofactor of a EC_GROUP object.

Parameters
groupEC_GROUP object
generatorEC_POINT object with the generator.
orderthe order of the group generated by the generator.
cofactorthe index of the sub-group generated by the generator in the group of all points on the elliptic curve.
Returns
1 on success and 0 if an error occured

Definition at line 284 of file ec_lib.c.

void EC_GROUP_set_point_conversion_form ( EC_GROUP group,
point_conversion_form_t  form 
)

Definition at line 361 of file ec_lib.c.

size_t EC_GROUP_set_seed ( EC_GROUP group,
const unsigned char *  p,
size_t  len 
)

Definition at line 374 of file ec_lib.c.

int EC_METHOD_get_field_type ( const EC_METHOD meth)

Returns the field type of the EC_METHOD.

Parameters
methEC_METHOD object
Returns
NID of the underlying field type OID.

Definition at line 278 of file ec_lib.c.

int EC_POINT_add ( const EC_GROUP group,
EC_POINT r,
const EC_POINT a,
const EC_POINT b,
BN_CTX ctx 
)

Computes the sum of two EC_POINT

Parameters
groupunderlying EC_GROUP object
rEC_POINT object for the result (r = a + b)
aEC_POINT object with the first summand
bEC_POINT object with the second summand
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 911 of file ec_lib.c.

void EC_POINT_clear_free ( EC_POINT point)

Clears and frees a EC_POINT object

Parameters
pointEC_POINT object to be cleared and freed

Definition at line 737 of file ec_lib.c.

int EC_POINT_cmp ( const EC_GROUP group,
const EC_POINT a,
const EC_POINT b,
BN_CTX ctx 
)

Compares two EC_POINTs

Parameters
groupunderlying EC_GROUP object
afirst EC_POINT object
bsecond EC_POINT object
ctxBN_CTX object (optional)
Returns
0 if both points are equal and a value != 0 otherwise

Definition at line 991 of file ec_lib.c.

int EC_POINT_copy ( EC_POINT dst,
const EC_POINT src 
)

Copies EC_POINT object

Parameters
dstdestination EC_POINT object
srcsource EC_POINT object
Returns
1 on success and 0 if an error occured

Definition at line 750 of file ec_lib.c.

int EC_POINT_dbl ( const EC_GROUP group,
EC_POINT r,
const EC_POINT a,
BN_CTX ctx 
)

Computes the double of a EC_POINT

Parameters
groupunderlying EC_GROUP object
rEC_POINT object for the result (r = 2 * a)
aEC_POINT object
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 927 of file ec_lib.c.

EC_POINT* EC_POINT_dup ( const EC_POINT src,
const EC_GROUP group 
)

Creates a new EC_POINT object and copies the content of the supplied EC_POINT

Parameters
srcsource EC_POINT object
groupunderlying the EC_GROUP object
Returns
newly created EC_POINT object or NULL if an error occurred

Definition at line 768 of file ec_lib.c.

void EC_POINT_free ( EC_POINT point)

Frees a EC_POINT object

Parameters
pointEC_POINT object to be freed

Definition at line 727 of file ec_lib.c.

int EC_POINT_get_affine_coordinates_GF2m ( const EC_GROUP group,
const EC_POINT p,
BIGNUM x,
BIGNUM y,
BN_CTX ctx 
)

Gets the affine coordinates of a EC_POINT over GF2m

Parameters
groupunderlying EC_GROUP object
pEC_POINT object
xBIGNUM for the x-coordinate
yBIGNUM for the y-coordinate
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 894 of file ec_lib.c.

int EC_POINT_get_affine_coordinates_GFp ( const EC_GROUP group,
const EC_POINT p,
BIGNUM x,
BIGNUM y,
BN_CTX ctx 
)

Gets the affine coordinates of a EC_POINT over GFp

Parameters
groupunderlying EC_GROUP object
pEC_POINT object
xBIGNUM for the x-coordinate
yBIGNUM for the y-coordinate
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 877 of file ec_lib.c.

int EC_POINT_get_Jprojective_coordinates_GFp ( const EC_GROUP group,
const EC_POINT p,
BIGNUM x,
BIGNUM y,
BIGNUM z,
BN_CTX ctx 
)

Gets the jacobian projective coordinates of a EC_POINT over GFp

Parameters
groupunderlying EC_GROUP object
pEC_POINT object
xBIGNUM for the x-coordinate
yBIGNUM for the y-coordinate
zBIGNUM for the z-coordinate
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 826 of file ec_lib.c.

int EC_POINT_invert ( const EC_GROUP group,
EC_POINT a,
BN_CTX ctx 
)

Computes the inverse of a EC_POINT

Parameters
groupunderlying EC_GROUP object
aEC_POINT object to be inverted (it's used for the result as well)
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 943 of file ec_lib.c.

int EC_POINT_is_at_infinity ( const EC_GROUP group,
const EC_POINT p 
)

Checks whether the point is the neutral element of the group

Parameters
groupthe underlying EC_GROUP object
pEC_POINT object
Returns
1 if the point is the neutral element and 0 otherwise

Definition at line 959 of file ec_lib.c.

int EC_POINT_is_on_curve ( const EC_GROUP group,
const EC_POINT point,
BN_CTX ctx 
)

Checks whether the point is on the curve

Parameters
groupunderlying EC_GROUP object
pointEC_POINT object to check
ctxBN_CTX object (optional)
Returns
1 if point if on the curve and 0 otherwise

Definition at line 975 of file ec_lib.c.

int EC_POINT_make_affine ( const EC_GROUP group,
EC_POINT point,
BN_CTX ctx 
)

Definition at line 1007 of file ec_lib.c.

const EC_METHOD* EC_POINT_method_of ( const EC_POINT point)

Returns the EC_METHOD used in EC_POINT object

Parameters
pointEC_POINT object
Returns
the EC_METHOD used

Definition at line 787 of file ec_lib.c.

int EC_POINT_mul ( const EC_GROUP group,
EC_POINT r,
const BIGNUM n,
const EC_POINT q,
const BIGNUM m,
BN_CTX ctx 
)

Computes r = generator * n + q * m

Parameters
groupunderlying EC_GROUP object
rEC_POINT object for the result
nBIGNUM with the multiplier for the group generator (optional)
qEC_POINT object with the first factor of the second summand
mBIGNUM with the second factor of the second summand
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 1060 of file ec_lib.c.

EC_POINT* EC_POINT_new ( const EC_GROUP group)

Creates a new EC_POINT object for the specified EC_GROUP

Parameters
groupEC_GROUP the underlying EC_GROUP object
Returns
newly created EC_POINT object or NULL if an error occurred

Definition at line 693 of file ec_lib.c.

int EC_POINT_set_affine_coordinates_GF2m ( const EC_GROUP group,
EC_POINT p,
const BIGNUM x,
const BIGNUM y,
BN_CTX ctx 
)

Sets the affine coordinates of a EC_POINT over GF2m

Parameters
groupunderlying EC_GROUP object
pEC_POINT object
xBIGNUM with the x-coordinate
yBIGNUM with the y-coordinate
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 860 of file ec_lib.c.

int EC_POINT_set_affine_coordinates_GFp ( const EC_GROUP group,
EC_POINT p,
const BIGNUM x,
const BIGNUM y,
BN_CTX ctx 
)

Sets the affine coordinates of a EC_POINT over GFp

Parameters
groupunderlying EC_GROUP object
pEC_POINT object
xBIGNUM with the x-coordinate
yBIGNUM with the y-coordinate
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 843 of file ec_lib.c.

int EC_POINT_set_Jprojective_coordinates_GFp ( const EC_GROUP group,
EC_POINT p,
const BIGNUM x,
const BIGNUM y,
const BIGNUM z,
BN_CTX ctx 
)

Sets the jacobian projective coordinates of a EC_POINT over GFp

Parameters
groupunderlying EC_GROUP object
pEC_POINT object
xBIGNUM with the x-coordinate
yBIGNUM with the y-coordinate
zBIGNUM with the z-coordinate
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 809 of file ec_lib.c.

int EC_POINT_set_to_infinity ( const EC_GROUP group,
EC_POINT point 
)

Sets a point to infinity (neutral element)

Parameters
groupunderlying EC_GROUP object
pointEC_POINT to set to infinity
Returns
1 on success and 0 if an error occured

Definition at line 793 of file ec_lib.c.

int EC_POINTs_make_affine ( const EC_GROUP group,
size_t  num,
EC_POINT points[],
BN_CTX ctx 
)

Definition at line 1023 of file ec_lib.c.

int EC_POINTs_mul ( const EC_GROUP group,
EC_POINT r,
const BIGNUM n,
size_t  num,
const EC_POINT p[],
const BIGNUM m[],
BN_CTX ctx 
)

Computes r = generator * n sum_{i=0}^num p[i] * m[i]

Parameters
groupunderlying EC_GROUP object
rEC_POINT object for the result
nBIGNUM with the multiplier for the group generator (optional)
numnumber futher summands
parray of size num of EC_POINT objects
marray of size num of BIGNUM objects
ctxBN_CTX object (optional)
Returns
1 on success and 0 if an error occured

Definition at line 1050 of file ec_lib.c.