RSA Security 5.2.2 manual No Update step is necessary for parameter generation, Break

Models: 5.2.2

1 376
Download 376 pages 13.91 Kb
Page 285
Image 285
AM_ECF2POLY_PARAM_GEN for even

Performing Elliptic Curve Operations

B_EC_PARAM_GEN_PARAMS paramGenInfo; paramGenInfo.version = 0; paramGenInfo.fieldType = FT_FP; paramGenInfo.fieldElementBits = 160; paramGenInfo.pointRepresentation = CI_NO_COMPRESS; paramGenInfo.minOrderBits = 0; paramGenInfo.trialDivBound = 0;

if ((status = B_SetAlgorithmInfo(paramGenObj, AI_ECParamGen, (POINTER)¶mGenInfo)) != 0)

break;

Step 3: Init

You can pass a NULL_PTR for the surrender context, because B_GenerateInit is a speedy function. For AI_ECParamGen, Chapter 2 of the Reference Manual indicates which algorithm methods you need to include in your chooser, paramGenChooser:

Algorithm methods to include in application’s algorithm chooser: AM_ECFP_PARAM_GEN for odd prime fields and characteristic.

Because you are using an odd prime, use AM_ECFP_PARAM_GEN:

B_ALGORITHM_METHOD *paramGenChooser[] = { &AM_ECFP_PARAM_GEN, &AM_ECF2POLY_PARAM_GEN, (B_ALGORITHM_METHOD *)NULL_PTR

};

if ((status = B_GenerateInit(paramGenObj, paramGenChooser, (A_SURRENDER_CTX *)NULL_PTR)) != 0)

break;

Step 4: Update

No Update step is necessary for parameter generation.

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 6 3

Page 285
Image 285
RSA Security 5.2.2 manual No Update step is necessary for parameter generation, Break