Sortix 1.1dev ports manual
This manual documents Sortix 1.1dev ports. You can instead view this document in the latest official manual.
EC_GROUP_NEW(3) | Library Functions Manual | EC_GROUP_NEW(3) |
NAME
EC_GROUP_new, EC_GROUP_free, EC_GROUP_clear_free, EC_GROUP_new_curve_GFp, EC_GROUP_new_curve_GF2m, EC_GROUP_new_by_curve_name, EC_GROUP_set_curve, EC_GROUP_get_curve, EC_GROUP_set_curve_GFp, EC_GROUP_get_curve_GFp, EC_GROUP_set_curve_GF2m, EC_GROUP_get_curve_GF2m, EC_get_builtin_curves — create and destroy EC_GROUP objectsSYNOPSIS
#include <openssl/ec.h>#include <openssl/bn.h> EC_GROUP *
EC_GROUP_new(const EC_METHOD *meth); void
EC_GROUP_free(EC_GROUP *group); void
EC_GROUP_clear_free(EC_GROUP *group); EC_GROUP *
EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); EC_GROUP *
EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); EC_GROUP *
EC_GROUP_new_by_curve_name(int nid); int
EC_GROUP_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); int
EC_GROUP_get_curve(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx); 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); size_t
EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems);
DESCRIPTION
The EC library provides functions for performing operations on elliptic curves over finite fields. In general, an elliptic curve satisfies an equation of the form:y^2 = x^3 + ax + b
y^2 mod p = x^3 + ax + b mod p
y^2 + xy = x^3 + ax^2 + b (where b !=
0)
NULL
r, or
setting nitems to 0, will do nothing other
than return the total number of curves available. The
EC_builtin_curve structure is defined as
follows:
typedef struct { int nid; const char *comment; } EC_builtin_curve;
NULL
pointer, no action occurs.
EC_GROUP_clear_free() destroys any sensitive data
held within the EC_GROUP and then frees its
memory. If group is a
NULL
pointer, no action occurs.
RETURN VALUES
All EC_GROUP_new*() functions return a pointer to the newly constructed group orNULL
on
error.
EC_get_builtin_curves() returns the number of
builtin curves that are available.
EC_GROUP_set_curve(),
EC_GROUP_get_curve(),
EC_GROUP_set_curve_GFp(),
EC_GROUP_get_curve_GFp(),
EC_GROUP_set_curve_GF2m(), and
EC_GROUP_get_curve_GF2m() return 1 on success or
0 on error.
SEE ALSO
crypto(3), d2i_ECPKParameters(3), EC_GFp_simple_method(3), EC_GROUP_copy(3), EC_KEY_new(3), EC_POINT_add(3), EC_POINT_new(3), ECDH_compute_key(3), ECDSA_SIG_new(3)HISTORY
EC_GROUP_new(), EC_GROUP_free(), EC_GROUP_clear_free(), EC_GROUP_new_curve_GFp(), EC_GROUP_set_curve_GFp(), and EC_GROUP_get_curve_GFp() first appeared in OpenSSL 0.9.7 and have been available since OpenBSD 3.2. EC_GROUP_new_curve_GF2m(), EC_GROUP_new_by_curve_name(), EC_GROUP_set_curve_GF2m(), EC_GROUP_get_curve_GF2m(), and EC_get_builtin_curves() first appeared in OpenSSL 0.9.8 and have been available since OpenBSD 4.5. EC_GROUP_set_curve() and EC_GROUP_get_curve() first appeared in OpenSSL 1.1.1 and have been available since OpenBSD 7.0.May 11, 2021 | Debian |