RSA Security 5.2.2 Projection Television User Manual


 
Chapter 7 Public-Key Operations 287
Performing Elliptic Curve Operations
Step 2b (optional): Set Acceleration Table Info
Go through the steps in the section Generating Acceleration Tables on page 273 to
create an acceleration table, placing the table information in
aTableItem
:
Step 3: Init
Build an algorithm chooser with the appropriate AMs:
Now you can associate your private key and your algorithm chooser with the
algorithm object:
B_DIGEST_SPECIFIER digestInfo;
digestInfo.digestInfoType = AI_SHA1;
digestInfo.digestInfoParams = NULL_PTR;
if ((status = B_SetAlgorithmInfo (ecDSASign, AI_EC_DSAWithDigest,
(POINTER)&digestInfo)) != 0)
break;
ITEM aTableItem;
if ((status = B_SetAlgorithmInfo (ecDSASign, AI_ECAcceleratorTable,
(POINTER)&aTableItem)) != 0)
break;
B_ALGORITHM_METHOD *EC_DSA_CHOOSER[] = {
&AM_SHA,
&AM_ECFP_DSA_SIGN,
&AM_ECF2POLY_DSA_SIGN,
&AM_ECFP_DSA_VERIFY,
&AM_ECF2POLY_DSA_VERIFY,
(B_ALGORITHM_METHOD *)NULL_PTR
};