I have developed a desktop application (.NET 2.0) and it needs to get some information from a server running php/mysql. The provider at server end has decided to use encryption using openssl_private_encrypt method and has provided me a publickey.pem file. I am not good at php/mysql but i do know that it would not be any different if i were using asp .net.
My question is how do i decrypt private-enrypted data in a .NET 2.0 application. All my attempts to use the RSACrypoServiceProvider with the publickey have proven unsuccessful.
I stumbled upon ManagedOpenSSL library but that was no good either.
I am certain many at StackOverflow would have done similar stuff and it would be nice o know how they did it.
Appreciate all your help in advance.
Here is what i used to make it work!
And responseFromServerEnc was the encrypted message and responseFromServer was correctly decrypted.