============================================================================
This file contains a common definition for eliptic curve structures used throughout the ECC based drivers.
Go to the source code of this file.
Data Structures | |
struct | ECCParams_CurveParams_ |
A structure containing the parameters of an elliptic curve in short Weierstrass form. More... | |
Macros | |
#define | ECCParams_STATUS_SUCCESS (0) |
Successful status code. More... | |
#define | ECCParams_STATUS_ERROR (-1) |
Generic error status code. More... | |
Typedefs | |
typedef enum ECCParams_CurveType_ | ECCParams_CurveType |
Enumeration of curve equations supported. More... | |
typedef struct ECCParams_CurveParams_ | ECCParams_CurveParams |
A structure containing the parameters of an elliptic curve in short Weierstrass form. More... | |
Enumerations | |
enum | ECCParams_CurveType_ { ECCParams_CURVE_TYPE_SHORT_WEIERSTRASS = 0, ECCParams_CURVE_TYPE_MONTGOMERY, ECCParams_CURVE_TYPE_EDWARDS } |
Enumeration of curve equations supported. More... | |
Functions | |
int_fast16_t | ECCParams_FormatCurve25519PrivateKey (CryptoKey *myPrivateKey) |
Formats a CryptoKey to conform to Curve25519 private key requirements. More... | |
Variables | |
const ECCParams_CurveParams | ECCParams_NISTP224 |
The NISTP224 curve in short Weierstrass form. More... | |
const ECCParams_CurveParams | ECCParams_NISTP256 |
The NISTP256 curve in short Weierstrass form. More... | |
const ECCParams_CurveParams | ECCParams_NISTP384 |
The NISTP384 curve in short Weierstrass form. More... | |
const ECCParams_CurveParams | ECCParams_NISTP521 |
The NISTP521 curve in short Weierstrass form. More... | |
const ECCParams_CurveParams | ECCParams_BrainpoolP256R1 |
The BrainpoolP256R1 curve in short Weierstrass form. More... | |
const ECCParams_CurveParams | ECCParams_BrainpoolP384R1 |
The BrainpoolP384R1 curve in short Weierstrass form. More... | |
const ECCParams_CurveParams | ECCParams_BrainpoolP512R1 |
The BrainpoolP512R1 curve in short Weierstrass form. More... | |
const ECCParams_CurveParams | ECCParams_Curve25519 |
The Curve25519 curve in Montgomery form. More... | |
#define ECCParams_STATUS_SUCCESS (0) |
Successful status code.
Function return ECCParams_STATUS_SUCCESS if the control code was executed successfully.
#define ECCParams_STATUS_ERROR (-1) |
Generic error status code.
Functions return ECCParams_STATUS_ERROR if the control code was not executed successfully.
typedef enum ECCParams_CurveType_ ECCParams_CurveType |
Enumeration of curve equations supported.
Elliptic curves can be expressed using multiple equations of polynomials over finite fields. All forms can be converted to one another using parameter substitution. Each curve has a default curve equations it was designed to use.
Some curve implementations have restrictions on which algorithms and schemes they work with. For example, Curve25519 was explicitely designed with ECDH in mind. It only uses and yields the X coordinate of a point on the elliptic curve in common implementations. Some implementations do provide X and Y affine coordinates but most do not. Therefore, ECDSA and ECJPAKE do not have compatible implementations for Curve25519 on some devices as the Y coordinate is required by them.
Check the header files of each device-specific implementation for information regarding curve-support for specific schemes on a device.
Name | Equation |
---|---|
Short Weierstrass | y^3 = x^2 + a*x + b mod p |
Montgomery | By^2 = x^3 + Ax^2 + x mod p |
Edwards | x^2 + y^2 = 1 + dx^2y^2 mod p |
typedef struct ECCParams_CurveParams_ ECCParams_CurveParams |
A structure containing the parameters of an elliptic curve in short Weierstrass form.
Elliptical Curve Cryptography (ECC) prime curve.
The equation used to define the curve is expressed in the short Weierstrass form y^3 = x^2 + a*x + b
enum ECCParams_CurveType_ |
Enumeration of curve equations supported.
Elliptic curves can be expressed using multiple equations of polynomials over finite fields. All forms can be converted to one another using parameter substitution. Each curve has a default curve equations it was designed to use.
Some curve implementations have restrictions on which algorithms and schemes they work with. For example, Curve25519 was explicitely designed with ECDH in mind. It only uses and yields the X coordinate of a point on the elliptic curve in common implementations. Some implementations do provide X and Y affine coordinates but most do not. Therefore, ECDSA and ECJPAKE do not have compatible implementations for Curve25519 on some devices as the Y coordinate is required by them.
Check the header files of each device-specific implementation for information regarding curve-support for specific schemes on a device.
Name | Equation |
---|---|
Short Weierstrass | y^3 = x^2 + a*x + b mod p |
Montgomery | By^2 = x^3 + Ax^2 + x mod p |
Edwards | x^2 + y^2 = 1 + dx^2y^2 mod p |
Enumerator | |
---|---|
ECCParams_CURVE_TYPE_SHORT_WEIERSTRASS | |
ECCParams_CURVE_TYPE_MONTGOMERY | |
ECCParams_CURVE_TYPE_EDWARDS |
int_fast16_t ECCParams_FormatCurve25519PrivateKey | ( | CryptoKey * | myPrivateKey | ) |
Formats a CryptoKey to conform to Curve25519 private key requirements.
Curve25519 has specific private key requirements specified by the curve definition. Specifically, the bottom three and the top bit may not be set and the second to last bit must be set.
myPrivateKey | An initialized CryptoKey describing the entropy for a Curve25519 private key. Platform-specific restrictions for the location of the keying material apply. Some implementations do not support modifying keying material in flash for example. |
const ECCParams_CurveParams ECCParams_NISTP224 |
The NISTP224 curve in short Weierstrass form.
const ECCParams_CurveParams ECCParams_NISTP256 |
The NISTP256 curve in short Weierstrass form.
const ECCParams_CurveParams ECCParams_NISTP384 |
The NISTP384 curve in short Weierstrass form.
const ECCParams_CurveParams ECCParams_NISTP521 |
The NISTP521 curve in short Weierstrass form.
const ECCParams_CurveParams ECCParams_BrainpoolP256R1 |
The BrainpoolP256R1 curve in short Weierstrass form.
const ECCParams_CurveParams ECCParams_BrainpoolP384R1 |
The BrainpoolP384R1 curve in short Weierstrass form.
const ECCParams_CurveParams ECCParams_BrainpoolP512R1 |
The BrainpoolP512R1 curve in short Weierstrass form.
const ECCParams_CurveParams ECCParams_Curve25519 |
The Curve25519 curve in Montgomery form.