The question is asked repeatedly, but I am unable to get work done so posting again. I am shared a public key file, which is in format of
-----BEGIN CERTIFICATE----- XXXXXXXXXXXXXXXXXXXXXXX -----END CERTIFICATE-----
Using this file, in PHP I am able to perform decryption and obtain decoded message using openssl_public_decrypt(). Now I am trying to perform decryption process in Python. I have tried with:
Crypto - gives 'valueerror: rsa key format is not supported' when RSA.importKey() is called.
python-rsa and M2Crypto also didn't help.
For M2Crypto I referred this link, but RSA.load_pub_key_bio(bio) line of code gives error.
Any help is really appreciated. Thank you.