Invoke NCryptCreatePersistedKey using your new provider handle to carve out a named slot for your algorithm (e.g., RSA or ECDSA). Step 3: Define Custom Policies
This function acts as the "gatekeeper" to a Key Storage Provider (KSP). Before your application can create, open, or use a persistent cryptographic key (like an RSA or Elliptic Curve key), it must first load the provider that handles that key. The Default Provider : If you call this function with a provider name, it loads the default Microsoft Software Key Storage Provider Hardware Security
: Used for rapid operations on non-persistent keys (e.g., hashing, transient session handshakes).
: After obtaining a provider handle, you use NCryptCreatePersistedKey to generate a new key and store it permanently.