ECDSA Cipher Object

Operations Supported

SignInit(), Sign(), VerifyInit(), and Verify().

Key Encoding

When performing:

>Sign operation: the key is specified as a buffer of ECC_Curve_t followed by Private Key ECC_PrivateKey_t.

>Verify operation: the key is specified as a buffer of ECC_Curve_t followed by Public Key ECC_PublicKey_t.

See also ECDSA Key Structures.

Modes

None

Sign/Verify Parameters

None

ECDSA Key Structures

#define ECC_MAX_MOD_LEN 571
#define ECC_MAX_BUF_LEN ROUND_UP(ECC_MAX_MOD_LEN, 8)/8
 
Identifies a curve over a field with an odd prime number of elements:
typedef enum ECC_FieldType_et {
        ECC_FT_GFP,
} ECC_FieldType_t;

                                                
Identifies a curve over a field of characteristic two (F_2^m)
typedef enum ECC_FieldType_et {
        ECC_FT_G2M
} ECC_FieldType_t;
 
The X coordinate of the point. X is an element of the field over which the curve is defined:
typedef struct ECC_Point_st {
        unsigned char x[ECC_MAX_BUF_LEN];
} ECC_Point_t;
 
The Y coordinate of the point. Y is an element of the field over which the curve is defined:
typedef struct ECC_Point_st {
        unsigned char y[ECC_MAX_BUF_LEN];
} ECC_Point_t;
 
The field type, over which this curve is defined:
typedef struct ECC_Curve_st {
        ECC_FieldType_t fieldType;
} ECC_Curve_t;
 
The curve modulus. This value is the field polynomial for ECC_FT_G2M field types:
typedef struct ECC_Curve_st {
        unsigned char modulus[ECC_MAX_BUF_LEN];
} ECC_Curve_t;
 
The coefficient 'a' in the elliptic curve equation:
typedef struct ECC_Curve_st {
        unsigned char a[ECC_MAX_BUF_LEN];
} ECC_Curve_t;
 
The coefficient 'b' in the elliptic curve equation:
typedef struct ECC_Curve_st {
        unsigned char b[ECC_MAX_BUF_LEN];
} ECC_Curve_t;
 
The base point:
typedef struct ECC_Curve_st {
        ECC_Point_t base;
} ECC_Curve_t;
 
The base point order:
typedef struct ECC_Curve_st {
        unsigned char bpOrder[ECC_MAX_BUF_LEN];
} ECC_Curve_t;
 

This buffer contains a big endian large number regardless of the field type.

The buffer containing the private key:
typedef struct ECC_PrivateKey_st {
        unsigned char d[ECC_MAX_BUF_LEN];
} ECC_PrivateKey_t;
 

The private key is always a big-endian large number, d, regardless of the field type of the curve.

The point P on the curve, which is calculated from the curve base and the private key:
typedef struct ECC_PublicKey_st {
        ECC_Point_t p;
} ECC_PublicKey_t;