Data Structures | Macros | Typedefs | Functions | Variables
ECCParams.h File Reference

Detailed Description

============================================================================

This file contains a common definition for eliptic curve structures used throughout the ECC based drivers.

#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <ti/drivers/cryptoutils/cryptokey/CryptoKey.h>
Include dependency graph for ECCParams.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ECCParams_ECCPoint
 
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...
 
#define ECCParams_CURVE_TYPE_NONE   0U
 
#define ECCParams_CURVE_TYPE_SHORT_WEIERSTRASS_AN3   1U
 
#define ECCParams_CURVE_TYPE_SHORT_WEIERSTRASS_GEN   2U
 
#define ECCParams_CURVE_TYPE_MONTGOMERY   3U
 
#define ECCParams_CURVE_TYPE_EDWARDS   4U
 

Typedefs

typedef uint32_t ECCParams_CurveType
 Enumeration of curve equations supported. More...
 
typedef struct ECCParams_ECCPoint ECCParams_ECCPoint
 
typedef struct ECCParams_CurveParams ECCParams_CurveParams
 A structure containing the parameters of an elliptic curve in short Weierstrass form. 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...
 

Macro Definition Documentation

§ ECCParams_STATUS_SUCCESS

#define ECCParams_STATUS_SUCCESS   (0)

Successful status code.

Function return ECCParams_STATUS_SUCCESS if the control code was executed successfully.

§ ECCParams_STATUS_ERROR

#define ECCParams_STATUS_ERROR   (-1)

Generic error status code.

Functions return ECCParams_STATUS_ERROR if the control code was not executed successfully.

§ ECCParams_CURVE_TYPE_NONE

#define ECCParams_CURVE_TYPE_NONE   0U

§ ECCParams_CURVE_TYPE_SHORT_WEIERSTRASS_AN3

#define ECCParams_CURVE_TYPE_SHORT_WEIERSTRASS_AN3   1U

§ ECCParams_CURVE_TYPE_SHORT_WEIERSTRASS_GEN

#define ECCParams_CURVE_TYPE_SHORT_WEIERSTRASS_GEN   2U

§ ECCParams_CURVE_TYPE_MONTGOMERY

#define ECCParams_CURVE_TYPE_MONTGOMERY   3U

§ ECCParams_CURVE_TYPE_EDWARDS

#define ECCParams_CURVE_TYPE_EDWARDS   4U

Typedef Documentation

§ ECCParams_CurveType

typedef uint32_t 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

§ ECCParams_ECCPoint

§ 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

Function Documentation

§ ECCParams_FormatCurve25519PrivateKey()

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.

Parameters
myPrivateKeyAn 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.
Precondition
Initialize the CryptoKey with a 32-byte buffer in a compliant location.

Variable Documentation

§ ECCParams_NISTP224

const ECCParams_CurveParams ECCParams_NISTP224

The NISTP224 curve in short Weierstrass form.

§ ECCParams_NISTP256

const ECCParams_CurveParams ECCParams_NISTP256

The NISTP256 curve in short Weierstrass form.

§ ECCParams_NISTP384

const ECCParams_CurveParams ECCParams_NISTP384

The NISTP384 curve in short Weierstrass form.

§ ECCParams_NISTP521

const ECCParams_CurveParams ECCParams_NISTP521

The NISTP521 curve in short Weierstrass form.

§ ECCParams_BrainpoolP256R1

const ECCParams_CurveParams ECCParams_BrainpoolP256R1

The BrainpoolP256R1 curve in short Weierstrass form.

§ ECCParams_BrainpoolP384R1

const ECCParams_CurveParams ECCParams_BrainpoolP384R1

The BrainpoolP384R1 curve in short Weierstrass form.

§ ECCParams_BrainpoolP512R1

const ECCParams_CurveParams ECCParams_BrainpoolP512R1

The BrainpoolP512R1 curve in short Weierstrass form.

§ ECCParams_Curve25519

const ECCParams_CurveParams ECCParams_Curve25519

The Curve25519 curve in Montgomery form.

© Copyright 1995-2019, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale