RSA Security 5.2.2 Projection Television User Manual


 
Chapter 7 Public-Key Operations 275
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. The
B_INFO_TYPE that 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:
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 doesnt take much time to complete, so you can pass in a
NULL_PTR
for your surrender context:
Step 4: Update
There is no Update step for building acceleration tables.
B_EC_PARAMS paramInfo;
paramInfo.parameterInfoType = AI_ECParameters;
paramInfo.parameterInfoValue = (POINTER)&ecParamInfo;
if ((status = B_SetAlgorithmInfo
(buildTable, AI_ECBuildAcceleratorTable,(POINTER)&paramInfo)) != 0)
break;
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;