deimos.openssl.ec

\file crypto/ec/ec.h Include file for the OpenSSL EC functions \author Originally written by Bodo Moeller for the OpenSSL project

Members

Aliases

EC_KEY
alias EC_KEY = ec_key_st

Enums

point_conversion_form_t
enum point_conversion_form_t

Enum for the point conversion form as defined in X9.62 (ECDSA) for the encoding of a elliptic curve point (x,y)

Functions

ECParameters_print
int ECParameters_print(BIO* bp, const(EC_KEY)* key)

Prints out the ec parameters on human readable form. \param bp BIO object to which the information is printed \param key EC_KEY object \return 1 on success and 0 if an error occurred

ECParameters_print_fp
int ECParameters_print_fp(FILE* fp, const(EC_KEY)* key)

Prints out the ec parameters on human readable form. \param fp file descriptor to which the information is printed \param key EC_KEY object \return 1 on success and 0 if an error occurred

EC_GF2m_simple_method
const(EC_METHOD)* EC_GF2m_simple_method()

Returns the basic GF2m ec method \return EC_METHOD object

EC_GFp_mont_method
const(EC_METHOD)* EC_GFp_mont_method()

Returns GFp methods using montgomery multiplication. \return EC_METHOD object

EC_GFp_nist_method
const(EC_METHOD)* EC_GFp_nist_method()

Returns GFp methods using optimized methods for NIST recommended curves \return EC_METHOD object

EC_GFp_nistp224_method
const(EC_METHOD)* EC_GFp_nistp224_method()

Returns 64-bit optimized methods for nistp224 \return EC_METHOD object

EC_GFp_nistp256_method
const(EC_METHOD)* EC_GFp_nistp256_method()

Returns 64-bit optimized methods for nistp256 \return EC_METHOD object

EC_GFp_nistp521_method
const(EC_METHOD)* EC_GFp_nistp521_method()

Returns 64-bit optimized methods for nistp521 \return EC_METHOD object

EC_GFp_simple_method
const(EC_METHOD)* EC_GFp_simple_method()

Returns the basic GFp ec methods which provides the basis for the optimized methods. \return EC_METHOD object

EC_GROUP_check
int EC_GROUP_check(const(EC_GROUP)* group, BN_CTX* ctx)

Checks whether the parameter in the EC_GROUP define a valid ec group \param group EC_GROUP object \param ctx BN_CTX object (optional) \return 1 if group is a valid ec group and 0 otherwise

EC_GROUP_check_discriminant
int EC_GROUP_check_discriminant(const(EC_GROUP)* group, BN_CTX* ctx)

Checks whether the discriminant of the elliptic curve is zero or not \param group EC_GROUP object \param ctx BN_CTX object (optional) \return 1 if the discriminant is not zero and 0 otherwise

EC_GROUP_clear_free
void EC_GROUP_clear_free(EC_GROUP* group)

Clears and frees a EC_GROUP object \param group EC_GROUP object to be cleared and freed.

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

Compares two EC_GROUP objects \param a first EC_GROUP object \param b second EC_GROUP object \param ctx BN_CTX object (optional) \return 0 if both groups are equal and 1 otherwise

EC_GROUP_copy
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. \param dst destination EC_GROUP object \param src source EC_GROUP object \return 1 on success and 0 if an error occurred.

EC_GROUP_dup
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 \param src source EC_GROUP object \return newly created EC_GROUP object or NULL in case of an error.

EC_GROUP_free
void EC_GROUP_free(EC_GROUP* group)

Frees a EC_GROUP object \param group EC_GROUP object to be freed.

EC_GROUP_get0_generator
const(EC_POINT)* EC_GROUP_get0_generator(const(EC_GROUP)* group)

Returns the generator of a EC_GROUP object. \param group EC_GROUP object \return the currently used generator (possibly NULL).

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

Gets the cofactor of a EC_GROUP \param group EC_GROUP object \param cofactor BIGNUM to which the cofactor is copied \param ctx BN_CTX object (optional) \return 1 on success and 0 if an error occured

EC_GROUP_get_curve_GF2m
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 \param group EC_GROUP object \param p BIGNUM for the polynomial defining the underlying field \param a BIGNUM for parameter a of the equation \param b BIGNUM for parameter b of the equation \param ctx BN_CTX object (optional) \return 1 on success and 0 if an error occured

EC_GROUP_get_curve_GFp
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 \param group EC_GROUP object \param p BIGNUM for the prime number \param a BIGNUM for parameter a of the equation \param b BIGNUM for parameter b of the equation \param ctx BN_CTX object (optional) \return 1 on success and 0 if an error occured

EC_GROUP_get_curve_name
int EC_GROUP_get_curve_name(const(EC_GROUP)* group)

Returns the curve name of a EC_GROUP object \param group EC_GROUP object \return NID of the curve name OID or 0 if not set.

EC_GROUP_get_degree
int EC_GROUP_get_degree(const(EC_GROUP)* group)

Returns the number of bits needed to represent a field element \param group EC_GROUP object \return number of bits needed to represent a field element

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

Gets the order of a EC_GROUP \param group EC_GROUP object \param order BIGNUM to which the order is copied \param ctx BN_CTX object (optional) \return 1 on success and 0 if an error occured

EC_GROUP_have_precompute_mult
int EC_GROUP_have_precompute_mult(const(EC_GROUP)* group)

Reports whether a precomputation has been done \param group EC_GROUP object \return 1 if a pre-computation has been done and 0 otherwise

EC_GROUP_method_of
const(EC_METHOD)* EC_GROUP_method_of(const(EC_GROUP)* group)

Returns the EC_METHOD of the EC_GROUP object. \param group EC_GROUP object \return EC_METHOD used in this EC_GROUP object.

EC_GROUP_new
EC_GROUP* EC_GROUP_new(const(EC_METHOD)* meth)

Creates a new EC_GROUP object \param meth EC_METHOD to use \return newly created EC_GROUP object or NULL in case of an error.

EC_GROUP_new_by_curve_name
EC_GROUP* EC_GROUP_new_by_curve_name(int nid)

Creates a EC_GROUP object with a curve specified by a NID \param nid NID of the OID of the curve name \return newly created EC_GROUP object with specified curve or NULL if an error occurred

EC_GROUP_new_curve_GF2m
EC_GROUP* EC_GROUP_new_curve_GF2m(const(BIGNUM)* p, const(BIGNUM)* a, const(BIGNUM)* b, BN_CTX* ctx)

Creates a new EC_GROUP object with the specified parameters defined over GF2m (defined by the equation y^2 + x*y = x^3 + a*x^2 + b) \param p BIGNUM with the polynomial defining the underlying field \param a BIGNUM with the parameter a of the equation \param b BIGNUM with the parameter b of the equation \param ctx BN_CTX object (optional) \return newly created EC_GROUP object with the specified parameters

EC_GROUP_new_curve_GFp
EC_GROUP* EC_GROUP_new_curve_GFp(const(BIGNUM)* p, const(BIGNUM)* a, const(BIGNUM)* b, BN_CTX* ctx)

Creates a new EC_GROUP object with the specified parameters defined over GFp (defined by the equation y^2 = x^3 + a*x + b) \param p BIGNUM with the prime number \param a BIGNUM with the parameter a of the equation \param b BIGNUM with the parameter b of the equation \param ctx BN_CTX object (optional) \return newly created EC_GROUP object with the specified parameters

EC_GROUP_precompute_mult
int EC_GROUP_precompute_mult(EC_GROUP* group, BN_CTX* ctx)

Stores multiples of generator for faster point multiplication \param group EC_GROUP object \param ctx BN_CTX object (optional) \return 1 on success and 0 if an error occured

EC_GROUP_set_curve_GF2m
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 \param group EC_GROUP object \param p BIGNUM with the polynomial defining the underlying field \param a BIGNUM with parameter a of the equation \param b BIGNUM with parameter b of the equation \param ctx BN_CTX object (optional) \return 1 on success and 0 if an error occured

EC_GROUP_set_curve_GFp
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 \param group EC_GROUP object \param p BIGNUM with the prime number \param a BIGNUM with parameter a of the equation \param b BIGNUM with parameter b of the equation \param ctx BN_CTX object (optional) \return 1 on success and 0 if an error occured

EC_GROUP_set_curve_name
void EC_GROUP_set_curve_name(EC_GROUP* group, int nid)

Sets the name of a EC_GROUP object \param group EC_GROUP object \param nid NID of the curve name OID

EC_GROUP_set_generator
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. \param group EC_GROUP object \param generator EC_POINT object with the generator. \param order the order of the group generated by the generator. \param cofactor the index of the sub-group generated by the generator in the group of all points on the elliptic curve. \return 1 on success and 0 if an error occured

EC_KEY_check_key
int EC_KEY_check_key(const(EC_KEY)* key)

Verifies that a private and/or public key is valid. \param key the EC_KEY object \return 1 on success and 0 otherwise.

EC_KEY_copy
EC_KEY* EC_KEY_copy(EC_KEY* dst, const(EC_KEY)* src)

Copies a EC_KEY object. \param dst destination EC_KEY object \param src src EC_KEY object \return dst or NULL if an error occurred.

EC_KEY_dup
EC_KEY* EC_KEY_dup(const(EC_KEY)* src)

Creates a new EC_KEY object and copies the content from src to it. \param src the source EC_KEY object \return newly created EC_KEY object or NULL if an error occurred.

EC_KEY_free
void EC_KEY_free(EC_KEY* key)

Frees a EC_KEY object. \param key EC_KEY object to be freed.

EC_KEY_generate_key
int EC_KEY_generate_key(EC_KEY* key)

Creates a new ec private (and optional a new public) key. \param key EC_KEY object \return 1 on success and 0 if an error occurred.

EC_KEY_get0_group
const(EC_GROUP)* EC_KEY_get0_group(const(EC_KEY)* key)

Returns the EC_GROUP object of a EC_KEY object \param key EC_KEY object \return the EC_GROUP object (possibly NULL).

EC_KEY_get0_private_key
const(BIGNUM)* EC_KEY_get0_private_key(const(EC_KEY)* key)

Returns the private key of a EC_KEY object. \param key EC_KEY object \return a BIGNUM with the private key (possibly NULL).

EC_KEY_get0_public_key
const(EC_POINT)* EC_KEY_get0_public_key(const(EC_KEY)* key)

Returns the public key of a EC_KEY object. \param key the EC_KEY object \return a EC_POINT object with the public key (possibly NULL)

EC_KEY_insert_key_method_data
void* EC_KEY_insert_key_method_data(EC_KEY* key, void* data, ExternC!(void* function(void*)) dup_func, ExternC!(void function(void*)) free_func, ExternC!(void function(void*)) clear_free_func)

Sets the key method data of an EC_KEY object, if none has yet been set. \param key EC_KEY object \param data opaque data to install. \param dup_func a function that duplicates |data|. \param free_func a function that frees |data|. \param clear_free_func a function that wipes and frees |data|. \return the previously set data pointer, or NULL if |data| was inserted.

EC_KEY_new
EC_KEY* EC_KEY_new()

Creates a new EC_KEY object. \return EC_KEY object or NULL if an error occurred.

EC_KEY_new_by_curve_name
EC_KEY* EC_KEY_new_by_curve_name(int nid)

Creates a new EC_KEY object using a named curve as underlying EC_GROUP object. \param nid NID of the named curve. \return EC_KEY object or NULL if an error occurred.

EC_KEY_precompute_mult
int EC_KEY_precompute_mult(EC_KEY* key, BN_CTX* ctx)

Creates a table of pre-computed multiples of the generator to accelerate further EC_KEY operations. \param key EC_KEY object \param ctx BN_CTX object (optional) \return 1 on success and 0 if an error occurred.

EC_KEY_print
int EC_KEY_print(BIO* bp, const(EC_KEY)* key, int off)

Prints out the contents of a EC_KEY object \param bp BIO object to which the information is printed \param key EC_KEY object \param off line offset \return 1 on success and 0 if an error occurred

EC_KEY_print_fp
int EC_KEY_print_fp(FILE* fp, const(EC_KEY)* key, int off)

Prints out the contents of a EC_KEY object \param fp file descriptor to which the information is printed \param key EC_KEY object \param off line offset \return 1 on success and 0 if an error occurred

EC_KEY_set_group
int EC_KEY_set_group(EC_KEY* key, const(EC_GROUP)* group)

Sets the EC_GROUP of a EC_KEY object. \param key EC_KEY object \param group EC_GROUP to use in the EC_KEY object (note: the EC_KEY object will use an own copy of the EC_GROUP). \return 1 on success and 0 if an error occurred.

EC_KEY_set_private_key
int EC_KEY_set_private_key(EC_KEY* key, const(BIGNUM)* prv)

Sets the private key of a EC_KEY object. \param key EC_KEY object \param prv BIGNUM with the private key (note: the EC_KEY object will use an own copy of the BIGNUM). \return 1 on success and 0 if an error occurred.

EC_KEY_set_public_key
int EC_KEY_set_public_key(EC_KEY* key, const(EC_POINT)* pub)

Sets the public key of a EC_KEY object. \param key EC_KEY object \param pub EC_POINT object with the public key (note: the EC_KEY object will use an own copy of the EC_POINT object). \return 1 on success and 0 if an error occurred.

EC_KEY_up_ref
int EC_KEY_up_ref(EC_KEY* key)

Increases the internal reference count of a EC_KEY object. \param key EC_KEY object \return 1 on success and 0 if an error occurred.

EC_METHOD_get_field_type
int EC_METHOD_get_field_type(const(EC_METHOD)* meth)

Returns the field type of the EC_METHOD. \param meth EC_METHOD object \return NID of the underlying field type OID.

EC_POINT_add
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 \param group underlying EC_GROUP object \param r EC_POINT object for the result (r = a + b) \param a EC_POINT object with the first summand \param b EC_POINT object with the second summand \param ctx BN_CTX object (optional) \return 1 on success and 0 if an error occured

EC_POINT_clear_free
void EC_POINT_clear_free(EC_POINT* point)

Clears and frees a EC_POINT object \param point EC_POINT object to be cleared and freed

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

Compares two EC_POINTs \param group underlying EC_GROUP object \param a first EC_POINT object \param b second EC_POINT object \param ctx BN_CTX object (optional) \return 0 if both points are equal and a value != 0 otherwise

EC_POINT_copy
int EC_POINT_copy(EC_POINT* dst, const(EC_POINT)* src)

Copies EC_POINT object \param dst destination EC_POINT object \param src source EC_POINT object \return 1 on success and 0 if an error occured

EC_POINT_dbl
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 \param group underlying EC_GROUP object \param r EC_POINT object for the result (r = 2* a) \param a EC_POINT object \param ctx BN_CTX object (optional) \return 1 on success and 0 if an error occured

EC_POINT_dup
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 \param src source EC_POINT object \param group underlying the EC_GROUP object \return newly created EC_POINT object or NULL if an error occurred

EC_POINT_free
void EC_POINT_free(EC_POINT* point)

Frees a EC_POINT object \param point EC_POINT object to be freed

EC_POINT_get_Jprojective_coordinates_GFp
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 \param group underlying EC_GROUP object \param p EC_POINT object \param x BIGNUM for the x-coordinate \param y BIGNUM for the y-coordinate \param z BIGNUM for the z-coordinate \param ctx BN_CTX object (optional) \return 1 on success and 0 if an error occured

EC_POINT_get_affine_coordinates_GF2m
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 \param group underlying EC_GROUP object \param p EC_POINT object \param x BIGNUM for the x-coordinate \param y BIGNUM for the y-coordinate \param ctx BN_CTX object (optional) \return 1 on success and 0 if an error occured

EC_POINT_get_affine_coordinates_GFp
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 \param group underlying EC_GROUP object \param p EC_POINT object \param x BIGNUM for the x-coordinate \param y BIGNUM for the y-coordinate \param ctx BN_CTX object (optional) \return 1 on success and 0 if an error occured

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

Computes the inverse of a EC_POINT \param group underlying EC_GROUP object \param a EC_POINT object to be inverted (it's used for the result as well) \param ctx BN_CTX object (optional) \return 1 on success and 0 if an error occured

EC_POINT_is_at_infinity
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 \param group the underlying EC_GROUP object \param p EC_POINT object \return 1 if the point is the neutral element and 0 otherwise

EC_POINT_is_on_curve
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 \param group underlying EC_GROUP object \param point EC_POINT object to check \param ctx BN_CTX object (optional) \return 1 if point if on the curve and 0 otherwise

EC_POINT_method_of
const(EC_METHOD)* EC_POINT_method_of(const(EC_POINT)* point)

Returns the EC_METHOD used in EC_POINT object \param point EC_POINT object \return the EC_METHOD used

EC_POINT_mul
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 \param group underlying EC_GROUP object \param r EC_POINT object for the result \param n BIGNUM with the multiplier for the group generator (optional) \param q EC_POINT object with the first factor of the second summand \param m BIGNUM with the second factor of the second summand \param ctx BN_CTX object (optional) \return 1 on success and 0 if an error occured

EC_POINT_new
EC_POINT* EC_POINT_new(const(EC_GROUP)* group)

Creates a new EC_POINT object for the specified EC_GROUP \param group EC_GROUP the underlying EC_GROUP object \return newly created EC_POINT object or NULL if an error occurred

EC_POINT_oct2point
int EC_POINT_oct2point(const(EC_GROUP)* group, EC_POINT* p, const(ubyte)* buf, size_t len, BN_CTX* ctx)

Decodes a EC_POINT from a octet string \param group underlying EC_GROUP object \param p EC_POINT object \param buf memory buffer with the encoded ec point \param len length of the encoded ec point \param ctx BN_CTX object (optional) \return 1 on success and 0 if an error occured

EC_POINT_point2oct
size_t EC_POINT_point2oct(const(EC_GROUP)* group, const(EC_POINT)* p, point_conversion_form_t form, ubyte* buf, size_t len, BN_CTX* ctx)

Encodes a EC_POINT object to a octet string \param group underlying EC_GROUP object \param p EC_POINT object \param form point conversion form \param buf memory buffer for the result. If NULL the function returns required buffer size. \param len length of the memory buffer \param ctx BN_CTX object (optional) \return the length of the encoded octet string or 0 if an error occurred

EC_POINT_set_Jprojective_coordinates_GFp
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 \param group underlying EC_GROUP object \param p EC_POINT object \param x BIGNUM with the x-coordinate \param y BIGNUM with the y-coordinate \param z BIGNUM with the z-coordinate \param ctx BN_CTX object (optional) \return 1 on success and 0 if an error occured

EC_POINT_set_affine_coordinates_GF2m
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 \param group underlying EC_GROUP object \param p EC_POINT object \param x BIGNUM with the x-coordinate \param y BIGNUM with the y-coordinate \param ctx BN_CTX object (optional) \return 1 on success and 0 if an error occured

EC_POINT_set_affine_coordinates_GFp
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 \param group underlying EC_GROUP object \param p EC_POINT object \param x BIGNUM with the x-coordinate \param y BIGNUM with the y-coordinate \param ctx BN_CTX object (optional) \return 1 on success and 0 if an error occured

EC_POINT_set_compressed_coordinates_GF2m
int EC_POINT_set_compressed_coordinates_GF2m(const(EC_GROUP)* group, EC_POINT* p, const(BIGNUM)* x, int y_bit, BN_CTX* ctx)

Sets the x9.62 compressed coordinates of a EC_POINT over GF2m \param group underlying EC_GROUP object \param p EC_POINT object \param x BIGNUM with x-coordinate \param y_bit integer with the y-Bit (either 0 or 1) \param ctx BN_CTX object (optional) \return 1 on success and 0 if an error occured

EC_POINT_set_compressed_coordinates_GFp
int EC_POINT_set_compressed_coordinates_GFp(const(EC_GROUP)* group, EC_POINT* p, const(BIGNUM)* x, int y_bit, BN_CTX* ctx)

Sets the x9.62 compressed coordinates of a EC_POINT over GFp \param group underlying EC_GROUP object \param p EC_POINT object \param x BIGNUM with x-coordinate \param y_bit integer with the y-Bit (either 0 or 1) \param ctx BN_CTX object (optional) \return 1 on success and 0 if an error occured

EC_POINT_set_to_infinity
int EC_POINT_set_to_infinity(const(EC_GROUP)* group, EC_POINT* point)

Sets a point to infinity (neutral element) \param group underlying EC_GROUP object \param point EC_POINT to set to infinity \return 1 on success and 0 if an error occured

EC_POINTs_mul
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 pi * mi \param group underlying EC_GROUP object \param r EC_POINT object for the result \param n BIGNUM with the multiplier for the group generator (optional) \param num number futher summands \param p array of size num of EC_POINT objects \param m array of size num of BIGNUM objects \param ctx BN_CTX object (optional) \return 1 on success and 0 if an error occured

d2i_ECParameters
EC_KEY* d2i_ECParameters(EC_KEY** key, const(ubyte)** in_, c_long len)

Decodes ec parameter from a memory buffer. \param key a pointer to a EC_KEY object which should be used (or NULL) \param in pointer to memory with the DER encoded ec parameters \param len length of the DER encoded ec parameters \return a EC_KEY object with the decoded parameters or NULL if an error occurred.

d2i_ECPrivateKey
EC_KEY* d2i_ECPrivateKey(EC_KEY** key, const(ubyte)** in_, c_long len)

Decodes a private key from a memory buffer. \param key a pointer to a EC_KEY object which should be used (or NULL) \param in pointer to memory with the DER encoded private key \param len length of the DER encoded private key \return the decoded private key or NULL if an error occurred.

i2d_ECParameters
int i2d_ECParameters(EC_KEY* key, ubyte** out_)

Encodes ec parameter and stores the result in a buffer. \param key the EC_KEY object with ec paramters to encode \param out the buffer for the result (if NULL the function returns number of bytes needed). \return 1 on success and 0 if an error occurred.

i2d_ECPrivateKey
int i2d_ECPrivateKey(EC_KEY* key, ubyte** out_)

Encodes a private key object and stores the result in a buffer. \param key the EC_KEY object to encode \param out the buffer for the result (if NULL the function returns number of bytes needed). \return 1 on success and 0 if an error occurred.

i2o_ECPublicKey
int i2o_ECPublicKey(EC_KEY* key, ubyte** out_)

Encodes a ec public key in an octet string. \param key the EC_KEY object with the public key \param out the buffer for the result (if NULL the function returns number of bytes needed). \return 1 on success and 0 if an error occurred

o2i_ECPublicKey
EC_KEY* o2i_ECPublicKey(EC_KEY** key, const(ubyte)** in_, c_long len)

Decodes a ec public key from a octet string. \param key a pointer to a EC_KEY object which should be used \param in memory buffer with the encoded public key \param len length of the encoded public key \return EC_KEY object with decoded public key or NULL if an error occurred.

Structs

EC_builtin_curve
struct EC_builtin_curve

Meta