Let's assume I have a PGP message and I want to know who sent it, is it possible to do it if I have the RSA encrypted message, two possible senders (and their public keys that they signed and encrypted with) but I don't have the private keys? It isn't just a signature, the header says: --BEGIN PGP MESSAGE--.

  • What is your use case?
    – Jeff Ferland
    Commented Dec 13, 2011 at 1:32

3 Answers 3


If you happen to have random encrypted messages which were not encrypted with your public key (and therefore you cannot decrypt the message), then the answer is no. Signatures must be contained within the encrypted data blob otherwise you have nothing credible to verify. Here's why.

(First, let's make sure we're on the same page: you encrypt a message using a public key and sign with a private key. You will never(!) have someone else's private keys because otherwise the entire protection mechanism falls apart.)

Encryption is protection from eavesdropping. Signing is non-repudiation of sender meaning the sender cannot say they didn't send it.

To verify the sender of a signed and encrypted message (order matters here), you will need to first decrypt the message because the signature is part of the encrypted message. Decrypting the message will not tell you anything about the sender since anyone can encrypt a message with your public key.

Once the message has been decrypted, you can extract the signature and verify it using the public keys you have for those possible senders.

However, what you cannot determine is whether the same person ACTUALLY signed and encrypted the message by virtue of the fact that one side of the process (encryption) uses entirely public information with no specific information about the sender.

If the sender's private key has fallen into wrong hands, then all bets are off.


Usually one signs the plaintext and then encrypts that. It is impossible to validate a signature without inputting the orignal data. If that original data is the plaintext, it must first be decrypted.

If you had a special use case where you agreed for some reason that it made more sense to validate the ciphertext, you could get the other party to sign the message after encrypting it.


A signature is simply a hash of the signed content that gets encrypted with your private key. Decrypting the hash with the public key proves who encrypted it, while re-running hashing function over the signed data and comparing it with the saved hash is how you verify that the content hasn't been changed.

With that understanding, signatures apply to binary bitstreams, not to the abstract concept of messages. For a signature to validate, the chunk of bits must not have been altered at all. This means that you theoretically can validate the signature on an encrypted message without decrypting it, but that would mean that the cipertext would have to be signed, not the plaintext. That'st not impossible, but it's also not common.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .