Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Exporting Cryptographic Keys

Windows Mobile 6.5
A version of this page is also available for

There are two occasions when it is necessary to export keys from the more secure Cryptographic Service Provider (CSP) environment—into a key BLOB:

  • To save a session key for use by an application.
    For example, if your application encodes a database file, and you want your application to decode it later, then your application must store the session key. This is necessary because CSPs do not preserve symmetric keys between sessions.
  • To send a key to someone.
    It would be much easier for your application if the respective CSPs could communicate directly, but they cannot. This means that the key must be exported from your CSP, transmitted by your application to the destination application, and then imported to the destination CSP.

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

Function Description


Destroys a key.


Exports a key from a CSP into a key BLOB in the application memory space.


Generates random data, usually for salt values.


Retrieves key parameters.


Gets a handle to the key exchange or signature key.


Imports a key from a key BLOB into a CSP.


Specifies key parameters.

Community Additions

© 2015 Microsoft