skip book previous and next navigation links
go up to top of book: HP Open Source Security for OpenVMS Volume 1:... HP Open Source Security for OpenVMS Volume 1:...
go to beginning of reference: API FunctionsAPI Functions
go to previous page: CSSM_CSP_CreateDigestContextCSSM_CSP_CreateDigestContext
go to next page: CSSM_CSP_CreateMacContextCSSM_CSP_CreateMacContext
end of book navigation links


CSSM_CSP_CreateKeyGenContext
Library
Description
See Also
 Parameters
Return Value

NAME

CSSM_CSP_CreateKeyGenContext - Create a key generation cryptographic context (CDSA)

SYNOPSIS  

# include <cssm.h>

CSSM_RETURN CSSMAPI CSSM_CSP_CreateKeyGenContext(CSSM_CSP_HANDLE CSPHandle,CSSM_ALGORITHMS AlgorithmID,uint32 KeySizeInBits,const CSSM_CRYPTO_DATA *Seed,const CSSM_DATA *Salt,const CSSM_DATE *StartDate,const CSSM_DATE *EndDate,const CSSM_DATA *Params,CSSM_CC_HANDLE *NewContextHandle)


return to top LIBRARY  

Common Security Services Manager library (cdsa$incssm300_shr.exe)


return to top PARAMETERS  

CSPHandle (input)
 The handle that describes the add-in CryptographicService Provider module used to perform this function. If a NULLhandle is specified, CSSM returns an error.
AlgorithmID (input)
 The algorithm identification number of the algorithmused 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 caneither pass a seed and seed length in bytes or pass a callback function.If NULL is passed, the Cryptographic Service Provider will use its defaultseed-handling mechanism.
Salt (input/optional)
 A salt used to generate the key.
StartDate (input/optional)
 A start date for the validity period of the keyor key pair being generated.
EndDate (input/optional)
 An end date for the validity period of the key orkey pair being generated.
Params (input/optional)
 A data buffer containing parameters required togenerate a key pair for a specific algorithm.
NewContextHandle (output)
 Cryptographic context handle.


return to top DESCRIPTION  

This 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 keysize (for symmetric key generation), a seed, and a salt. The cryptographiccontext handle is returned. The cryptographic context handle canbe used to call key/ or keypair generation functions.

Additional attributes can be added to the newly created contextusing the CSSM_UpdateContextAttributes() function. Incremental attributes of interest for keygeneration include a handle-pair identifying a Data Storage Libraryservice module and an open data store for CSPs that manage multiplepersistent key stores. If a CSP does not support multiple key stores,the CSP ignores the presence or absence of this attribute.


return to top RETURN VALUE  

A CSSM_RETURN value indicating success or specifying a particularerror condition. The value CSSM_OK indicates success. All othervalues represent an error condition.


return to top SEE ALSO  

Books

Intel CDSA Application Developer's Guide

Online Help

Functions: CSSM_GenerateKey, CSSM_GenerateKeyPair, CSSM_GetContext, CSSM_SetContext, CSSM_DeleteContext, CSSM_GetContextAttribute, CSSM_UpdateContextAttributes


go to previous page: CSSM_CSP_CreateDigestContextCSSM_CSP_CreateDigestContext
go to next page: CSSM_CSP_CreateMacContextCSSM_CSP_CreateMacContext