.\" $OpenBSD: ec.3,v 1.3 2016/11/06 15:57:38 schwarze Exp $ .\" .Dd $Mdocdate: November 6 2016 $ .Dt EC 3 .Os .Sh NAME .Nm ec .Nd Elliptic Curve functions .Sh SYNOPSIS .In openssl/ec.h .Sh DESCRIPTION This library provides an extensive set of functions for performing operations on elliptic curves over finite fields. In general an elliptic curve is one with an equation of the form: .Pp .Dl y^2 = x^3 + ax + b .Pp An .Vt EC_GROUP structure is used to represent the definition of an elliptic curve. Points on a curve are stored using an .Vt EC_POINT structure. An .Vt EC_KEY is used to hold a private/public key pair, where a private key is simply a .Vt BIGNUM and a public key is a point on a curve represented by an .Vt EC_POINT . .Pp The library contains a number of alternative implementations of the different functions. Each implementation is optimised for different scenarios. No matter which implementation is being used, the interface remains the same. The library handles calling the correct implementation when an interface function is invoked. An implementation is represented by an .Vt EC_METHOD structure. .Pp The creation and destruction of .Vt EC_GROUP objects is described in .Xr EC_GROUP_new 3 . Functions for manipulating .Vt EC_GROUP objects are described in .Xr EC_GROUP_copy 3 . .Pp Functions for creating, destroying and manipulating .Vt EC_POINT objects are explained in .Xr EC_POINT_new 3 , whilst functions for performing mathematical operations and tests on .Vt EC_POINT Ns s are coverd in .Xr EC_POINT_add 3 . .Pp For working with private and public keys refer to .Xr EC_KEY_new 3 . Implementations are covered in .Xr EC_GFp_simple_method 3 . .Pp For information on encoding and decoding curve parameters to and from ASN.1 see .Xr d2i_ECPKParameters 3 . .Sh SEE ALSO .Xr crypto 3 , .Xr d2i_ECPKParameters 3 , .Xr EC_GFp_simple_method 3 , .Xr EC_GROUP_copy 3 , .Xr EC_GROUP_new 3 , .Xr EC_KEY_new 3 , .Xr EC_POINT_add 3 , .Xr EC_POINT_new 3 , .Xr EVP_PKEY_CTX_set_ec_paramgen_curve_nid 3