pycryptodome
pycryptodome copied to clipboard
Encrypting data using PGP public key
I have a PGP key and I want to encrypt data with that key. I have almost tried all of the cipher algorithms but I am facing the same issue. When I try to import the PGP key from a file using the below code it gives me an error ValueError: RSA key format is not supported
recipient_key = RSA.import_key(open("F:\\pgp_keys\\pub_key.asc").read())
First of all, can I use a PGP key to encrypt data with this library? As for as I have researched PGP key format is different from the RSA key and that's why some people suggest using a PGP library rather than using any other. Stackoverflow
If I can use this library to encrypt data with a PGP key, please guide me on how.
As I am aware, this is currently not possible with PyCryptodome.