Hello,
Welcome to Microsoft Q&A!
If you want to confirm that whether could you use the certificate's private key for encryption/decryption? If so, the analysis is right. You could use the CryptAcquireCertificatePrivateKey function get the private key for a certificate. And then use the certificate's private key to encryption/decryption.
You could refer to the thread: https://stackoverflow.com/questions/48830779/how-can-i-get-a-ncrypt-key-handle-for-the-private-key-of-a-pccert-context
Thank you.
Jeanine
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
[2]: