Rate This Document
Findability
Accuracy
Completeness
Readability

ECC Key Data Structure Definition

A key is stored in order from the most significant bit to the least significant bit; that is, when placing a key into the key structure array, the highest byte is stored at the highest position. If the key is shorter than the array length, the remaining bits are padded with zeros.

Table 1 Public key data structure definition

Field Name

Data Length (Byte)

Description

bits

4

Key length.

x

ECCref_MAX_LEN

x-coordinate of the public key.

y

ECCref_MAX_LEN

y-coordinate of the public key.

Table 2 Private key data structure definition

Field Name

Data Length (Byte)

Description

bits

4

Key length.

K

ECCref_MAX_LEN

Private key.

Actual data structure definition:

#define ECCref_MAX_BITS 512 
#define ECCref_MAX_LEN ((ECCref_MAX_BITS+7) / 8) 
typedef struct ECCrefPublicKey_st { 
unsigned int bits; 
unsigned char x[ECCref_MAX_LEN]; 
unsigned char y[ECCref_MAX_LEN]; 
} ECCrefPublicKey; 
typedef struct ECCrefPrivateKey_st { 
unsigned int bits; 
unsigned char K[ECCref_MAX_LEN]; 
} ECCrefPrivateKey;