Setting the User Default CSP

One user default CSP can be specified for each CSP type. This entry is used when an application calls the CryptAcquireContext function with only a CSP type specified.

The user defaults are stored in the registry's HKEY_CURRENT_USER key.

The user default CSP is to be set by way of the CryptSetProvider function, which internally sets the following registry entry:

[HKEY_LOCAL_MACHINE\Comm\Security\Crypto\Defaults\Providers\Type CSP type]
    Name = REG_SZ:CSP name 

The "CSP type" portion of the key name must be in decimal format, and exactly three digits in length.

The "Name" entry must be set to the textual name of the CSP. This must exactly match the "CSP name" registry key discussed earlier.