
AI_RSAKeyGen
AI_RSAKeyGen
Purpose:
This AI allows you to specify the parameters for generating an RSA public/private key pair as defined in PKCS #1. You may also use AI_RSAStrongKeyGen to generate RSA key pairs.
Type of information this allows you to use:
the parameters for generating an RSA public/private key pair as defined in PKCS #1, where the modulus size and public exponent are specified.
Format of info supplied to B_SetAlgorithmInfo:
pointer to an A_RSA_KEY_GEN_PARAMS structure:
typedef struct | { |
|
unsigned int | modulusBits; | /* size of modulus in bits */ |
ITEM | publicExponent; | /* fixed public exponent */ |
} A_RSA_KEY_GEN_PARAMS;
The publicExponent ITEM supplies an integer in canonical format, where the ITEM’s data points to an unsigned byte
Format of info returned by B_GetAlgorithmInfo:
pointer to an A_RSA_KEY_GEN_PARAMS structure (see above). All leading zeros have been stripped from the publicExponent integer.
Crypto-C procedures to use with algorithm object:
B_GenerateInit and B_GenerateKeypair. B_GenerateKeypair sets the publicKey key object with the KI_RSAPublic information and the privateKey key object with the KI_PKCS_RSAPrivate information. You must pass an initialized random algorithm to B_GenerateKeypair.
2 0 8 | 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 |