Performing Elliptic Curve Operations
282 RSA BSAFE Crypto-C Developers Guide
Because you have the EC parameters in the A_EC_PARAMS structure ecParams, the
appropriate AI that describes the data is AI_ECParameters:

Step 2b (optional): Set Acceleration Table Info

If you are using an acceleration table, you need to set the algorithm object with the
appropriate acceleration table. Once you have gone through the steps in Generating
Acceleration Tables on page273 and have an ITEM structure containing the
acceleration table, you can pass a pointer to the ITEM structure as the third argument
to B_SetAlgorithmInfo:
Step 3: Initialize
Initialize the algorithm object to perform the key agreement protocol. The Reference
Manual Chapter 2 entry for AI_EC_DHKeyAgree states which algorithm methods to
include in your chooser:
typedef struct {
B_INFO_TYPE parameterInfoType;
POINTER parameterInfoValue;
} B_EC_PARAMS;
B_EC_PARAMS commonECParams;
commonECParams.parameterInfoType = AI_ECParameters;
commonECParams.parameterInfoValue = (POINTER)&ecParams;
if ((status = B_SetAlgorithmInfo(alice, AI_EC_DHKeyAgree,
(POINTER)&commonECParams)) != 0)
break;
if ((status = B_SetAlgorithmInfo (alice, AI_ECAcceleratorTable,
(POINTER)&aTableItem)) != 0)
break;
B_ALGORITHM_METHOD *EC_DH_CHOOSER[] = {
&AM_ECFP_DH_KEY_AGREE,
&AM_ECF2POLY_DH_KEY_AGREE,
(B_ALGORITHM_METHOD *)NULL_PTR
};