Exchanging Cryptographic Keys

This section discusses situations when you must export keys from the secure environment of the CSP into a key BLOB.

There are two occasions when it is necessary to export keys:

The following table shows functions you can use to create, configure, and destroy cryptographic keys, and to exchange them with other users.

Function
Description
CryptDestroyKey Destroys a key
CryptExportKey Exports a key from a CSP into a key BLOB in the application memory space
CryptGenRandom Generates random data, usually for salt values
CryptGetKeyParam Retrieves key parameters
CryptGetUserKey Gets a handle to the key exchange or signature key
CryptImportKey Imports a key from a key BLOB into a CSP
CryptSetKeyParam Specifies key parameters