0

I have been given a openPGP Certificate and I need to encrypt some files using it. It can be done easily using Kleopatra tool, but I need to do it in Python. What I want to do is pretty much same as what has been done here using Crypto and M2Crypto to generate X.509 Certificate and then do encryption. What I need is to be able to do is to use OpenPGP Certificate, not X.509 Certificate. Ay help is highly appreciated.

Arash.H
  • 101
  • 1
  • 9
  • 1
    Possible duplicate of [Python and PGP/encryption](http://stackoverflow.com/questions/1048722/python-and-pgp-encryption) – morxa Mar 17 '16 at 02:02
  • I am not intending to encrypt using PGP Public Key. I want to do it using an openPGP Certificate which is different than PGP keys. – Arash.H Mar 17 '16 at 02:11
  • What have you done so far to find a solution? Your question is very broad and doesn't show much effort. – 4castle Mar 17 '16 at 02:35
  • I edited my question and added a link which will give all details. – Arash.H Mar 17 '16 at 02:44
  • OpenPGP uses other terminology than X.509. What's called a certificate in X.509 is a public key in OpenPGP, plus a signature on that key. OpenPGP signatures on keys are also often called certificate to distinguish it from signatures on messages or files, which are technically similar but are another use case. **You cannot encrypt using an OpenPGP certificate, you can only encrypt using public keys.** – Jens Erat Mar 17 '16 at 10:15
  • So you mean I need to derive a public key from the certificate I have been passed, and then use the key to encrypt the message? and then what to do with the certificate on top of that and how to derive the key? – Arash.H Mar 21 '16 at 02:00

0 Answers0