B_INFO_TYPE

Performing Elliptic Curve Operations

The first field in this structure, parameterInfoType, is used to interpret the elliptic curve parameter information you supply in the second field, parameterInfoValue. The EC parameter information you have is an A_EC_PARAMS structure containing the data

that describes the EC parameters. Thethat is used to properly interpret that information is AI_ECParameters.

Set the parameterInfoType field to AI_ECParameters and give the parameterInfoValue field a pointer to the location of the A_EC_PARAMS structure:

B_EC_PARAMS paramInfo; paramInfo.parameterInfoType = AI_ECParameters; paramInfo.parameterInfoValue = (POINTER)&ecParamInfo;

if ((status = B_SetAlgorithmInfo

(buildTable, AI_ECBuildAcceleratorTable,(POINTER)¶mInfo)) != 0) break;

Step 3: Init

In this step, you must supply the appropriate algorithm methods through the algorithm chooser. The Reference Manual Chapter 2 entry for AI_ECBuildAcceleratorTable indicates which AMs you must include in your chooser. This step doesn’t take much time to complete, so you can pass in a NULL_PTR for your surrender context:

B_ALGORITHM_METHOD *ecAccelChooser[] = {

 

&AM_ECFP_BLD_ACCEL_TABLE,

/* for odd prime field */

&AM_ECF2POLY_BLD_ACCEL_TABLE,

/* for characteristic 2 field */

(B_ALGORITHM_METHOD *)NULL_PTR

 

};

 

if ((status = B_BuildTableInit(buildTable, ecAccelChooser, (A_SURRENDER_CTX *)NULL_PTR)) != 0)

break;

Step 4: Update

There is no Update step for building acceleration tables.

C h a p t e r 7 P u b l i c - K e y O p e r a t i o n s

2 7 5

Page 297
Image 297
RSA Security 5.2.2 manual There is no Update step for building acceleration tables, For odd prime field