The handle that describes the add-in Cryptographic
Service Provider module used to perform this function. If a NULL
handle is specified, CSSM returns an error.
AlgorithmID (input)
The algorithm identification number of the algorithm
used for key generation.
KeySizeInBits (input)
The logical size of the key (specified in bits).
This refers to either the actual key size (for symmetric key generation)
or the modulus size (for asymmetric key pair generation).
Seed (input/optional)
A seed used to generate the key. The caller can
either pass a seed and seed length in bytes or pass a callback function.
If NULL is passed, the Cryptographic Service Provider will use its default
seed-handling mechanism.
Salt (input/optional)
A salt used to generate the key.
StartDate (input/optional)
A start date for the validity period of the key
or key pair being generated.
EndDate (input/optional)
An end date for the validity period of the key or
key pair being generated.
Params (input/optional)
A data buffer containing parameters required to
generate a key pair for a specific algorithm.
NewContextHandle (output)
Cryptographic context handle.
DESCRIPTIONThis function creates a key generation cryptographic context,
given a handle of a CSP, an algorithm identification number, a passphrase,
a modulus size (for public or private keypair generation), a key
size (for symmetric key generation), a seed, and a salt. The cryptographic
context handle is returned. The cryptographic context handle can
be used to call key/ or keypair generation functions.
Additional attributes can be added to the newly created context
using the CSSM_UpdateContextAttributes() function. Incremental attributes of interest for key
generation include a handle-pair identifying a Data Storage Library
service module and an open data store for CSPs that manage multiple
persistent key stores. If a CSP does not support multiple key stores,
the CSP ignores the presence or absence of this attribute.
RETURN VALUEA CSSM_RETURN value indicating success or specifying a particular
error condition. The value CSSM_OK indicates success. All other
values represent an error condition. SEE ALSOBooks