Original Post
Hello, I'm new to the whole encrypting system.. I started to read in MSDN about how to use CryptAPI and after about a week I finished a program that generates a public/private key pair, a program that encrypts a file using the public key, and another that decrypts using the private key. Everything worked fine until: I accidently tried to decrypt the file with the public key and it succeeded. This shocked me.. I am using the Microsoft basic cryptographic provider. I use the algorithm CALG_RSA_KEYX with length 1024, and provider type PROV_RSA_FULL. Please help me to figure this out, I cannot use these programs now that I found this horrible mistake. Thank you if you solve it! Uri.