
AI_DSAKeyGen
AI_DSAKeyGen
Purpose:
This AI allows you to generate a DSA key pair. First, you pass the system parameters to B_SetAlgorithmInfo. Then you generate the keys by calling B_GenerateInit and B_GenerateKeypair. Alternatively, you may use the AI_DSAParamGen algorithm type to generate the system parameters needed in DSA key generation. Also see
.
Type of information this allows you to use:
the parameters for generating a compatible DSA key pair as defined in FIPS PUB 186.
Format of info supplied to B_SetAlgorithmInfo:
pointer to an A_DSA_PARAMS structure:
typedef struct { |
|
|
ITEM prime; | /* the prime | p */ |
ITEM subPrime; | /* the subprime q */ | |
ITEM base; | /* the base | g */ |
} A_DSA_PARAMS; |
|
|
|
|
|
An ITEM supplies an integer in canonical format, where the ITEM’s data points to an unsigned byte array
Format of info returned by B_GetAlgorithmInfo:
pointer to an A_DSA_PARAMS structure (see above).
Crypto-C procedures to use with algorithm object:
B_GenerateInit and B_GenerateKeypair. B_GenerateKeypair sets the publicKey key object with the KI_DSAPublic information and the privateKey key object with the
information. You must pass an initialized random algorithm to
.
R S A B S A F E C r y p t o - C L i b r a r y R e f e r e n c e M a n u a l