I'm starting to play with PGP and I don't understand how if your key pair is RSA
you can encrypt a message for someone whose key is for example ElGamal.
How does the asymmetric key exchange work if the crypstosystems are different?


1 Answer 1


When creating a signed and encrypted PGP message, you only use your own keypair in the signing phase -- it's not used when encrypting the message (that only uses the recipient's public key). The recipient uses their own keypair only to decrypt the message, not to verify the signature. The two keypairs don't interact at all; that's why they don't have to be the same algorithm.

  • $\begingroup$ What about key signing? How does an RSA user sign an ElGamal user's key, or vice versa? $\endgroup$
    – Geremia
    Dec 24, 2015 at 18:17
  • 1
    $\begingroup$ @Geremia Signing an RSA or ElGamal key doesn't depend on any properties of RSA or ElGamal (unless that's the signature algorithm you're using). A PGP certificate signature treats the key as generic binary data. $\endgroup$
    – cpast
    Dec 24, 2015 at 20:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.