Hello Snake,Luv, Mushroom,
Migrating a Root CA private key from a legacy CryptoAPI Cryptographic Service Provider to a CNG Key Storage Provider requires updating the key container and modifying the CA registry configuration. Before proceeding, back up your CA certificate and private key using certutil -backupkey.
Stop Active Directory Certificate Services by running net stop certsvc. Next, import the private key into CNG by executing certutil -csp "Microsoft Software Key Storage Provider" -importpfx RootCAKey.pfx. Once imported, update the CA configuration in the registry under HKLM:\SYSTEM\CurrentControlSet\Services\CertSvc\Configuration\YourCAName by changing the Provider value to Microsoft Software Key Storage Provider and ensuring the HashAlgorithm is set to SHA256.
Start the service with net start certsvc and verify health by running certutil -cainfo. If this guidance successfully resolves your KSP migration issue, please accept the answer.
Tracy Le.