简体   繁体   中英

How Create RSA Encryption key pairs using python that is comaptible with C# or vice versa?

Actually, i have started work on creating a web service in Python and C#(.NET 3.5 framework) as client. All requests are on POST so i decided to send my data in encrypted form using public key on C# side and decrypt data in Python, Again from python Encrypt data using Private Key & decrypt using public key in C# side..

But the problem here is that keys i hav generated in C# side that is in... xml format that is not support in python. I have also tried from python to generate key pair, that are not working C# side..

I have searched on web, found some solutions but nothing works...

Can Any tell me how to generate key pairs that work on both side...? Also tell me the format of key generated on both sides.. If you have any related info or KB regarding RSA encryption please share here with me..

Please take a look at PyOpenSSL and may be it will be better to use standard HTTPS for your service. You can use self-signed SSL certificates with PyCurl and urllib.urlopen and other python web clients.

Urllib and validation of server certificate one of the examples.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM