AI_ECPubKey

AI_ECPubKey

Purpose:

This AI allows you to specify an EC public key and underlying EC parameters in order to build an acceleration table.

Type of information this allows you to use:

the encoding of an ANSI X9.62 Version 1 algorithm identifier that specifies an elliptic curve public key. An initialized AI_ECPubKeyBER or AI_ECPubKey algorithm object can be used as the input parameter ParameterInfoType when initializing an AI_ECBuildPubKeyAccelTable.

Format of info supplied to B_SetAlgorithmInfo:

pointer to an A_EC_PUBLIC_KEY structure:

typedef struct

{

 

 

A_EC_PARAMS curveParams;

/* the underlying elliptic curve parameters */

ITEM publicKey;

 

/* public component */

} A_EC_PUBLIC_KEY;

 

 

typedef struct

{

 

 

unsigned int

version;

 

/* implementation version */

unsigned int

fieldType;

 

/* indicates type of base field */

ITEM

fieldInfo;

/* The prime number if fieldType = FT_FP; */

 

/* the basis polynomial if fieldType = FT_F2_POLYNOMIAL; */

 

/* and the degree of the field if fieldType = FT_F2_ONB */

ITEM

coeffA;

 

/* elliptic curve coefficient */

ITEM

coeffB;

 

/* elliptic curve coefficient */

ITEM

base;

 

/* elliptic curve group generator */

ITEM

order;

/* order of subgroup’s generating element */

ITEM

cofactor;

 

/* the cofactor of the subgroup */

unsigned int

pointRepresentation;

/*not used */

 

 

 

/* set to CI_NO_COMPRESS as a default */

unsigned int

fieldElementBits;

/* field element size in bits */

} A_EC_PARAMS;

 

 

 

 

 

 

 

Each ITEM supplies an integer in canonical format, where the ITEM’s data points to an unsigned byte array -- most significant byte first -- and the ITEM’s len gives its length. For all ITEM values except the public component (x) and the curve parameter base,

8 2

R S A B S A F E C r y p t o - C L i b r a r y R e f e r e n c e M a n u a l

Page 92
Image 92
RSA Security 5 manual AIECPubKey, Pointer to an Aecpublickey structure