RSA Security 5 Projection Television User Manual


 
AI_KeypairTokenGen
94 RSA BSAFE Crypto-C Library Reference Manual
AI_KeypairTokenGen
Purpose:
This AI allows you to generate the token form of a public/private key pair with a
hardware device.
Type of information this allows you to use:
the parameters for generating the token form of a public/private key pair. The BSAFE
Hardware API (BHAPI) supports token forms of RSA strong key pair generation as
defined in PKCS #1 and DSA key pair generation as defined in FIPS PUB 186.
Format of info supplied to B_SetAlgorithmInfo:
pointer to an A_KEYPAIR_SPECIFIER structure:
where
A_KEYPAIR_DEFINER is defined by:
Format of info returned by B_GetAlgorithmInfo:
pointer to an A_KEYPAIR_SPECIFIER structure (see above).
typedef struct {
A_KEYPAIR_DEFINER privateKeyDef; /* Specifications for private key */
A_KEYPAIR_DEFINER publicKeyDef; /* Specifications for public key */
POINTER keyParams; /* Points to RSA params in RSA case, i.e., */
/* A_RSA_KEY_GEN_PARAMS. */
/* Points to DSA params in DSA case. */
unsigned char *cipherName; /* String tag for key's cipher class */
/* Either “rsa” or “dsa” to tag */
} A_KEYPAIR_SPECIFIER;
typedef struct {
unsigned int keyUsage; /* X509 key usage bit map */
UINT4 lifeTime; /* Key lifetime; under consideration */
unsigned int protectFlag; /* Store key in encrypted form */
} A_KEYPAIR_DEFINER;