Reputation: 537
I have found sample in "Certificate, Key, and Trust Services Programming Guide" about encrypting data with a public key. But how to encrypt with using private key and decrypt with using public key? I cannot find any samples about it. Thanks in advance
Upvotes: 2
Views: 2576
Reputation: 11569
Why are you encrypting with the private key? When you encrypt with the private key, that is considered signing not encrypting, becuase it provides no confidentiality. If you want to "encrypt" with the private key, look into data signing, and that should allow you to "encrypt" (read "sign") with the private key and "decrypt" (read "verify signature") with the public key.
Upvotes: 5