1

I work as a software engineer, yet with limited experience in cryptography. I have a practical issue, not so much a technical question, related to a PGP-encrypted mail exchange I've had. Lately, I have uncovered upon own initiative a flaw in the web login interface of a bank, which flaw I plan to not further disclose in public.

The bank in question features a responsible disclosure program in which anyone can report issues over email, given that the message (body) in the mail is encrypted using a public PGP key provided. As such, I have formulated the report and encrypted the message (Version: BCPG C# v1.6.1.0), and sent the PGP message from Gmail.

Several days later I receive a response in Gmail with no mail body, yet with 3 attachments:

  • 1 format-less file containing a PGP-message
  • 1 format-less file containing only "Version: 1"
  • 1 .eml file that features meta-data and again, the PGP-message which I believe is the response. See attachment below.

However, I am puzzled by how I would be suppose to decrypt their response, for the simple fact I miss the private key. Furthermore, in my initial report I did not propose a new means for future communication or public key of my own to allow them to respond. I have responded with a new message, encrypted using again their public PGP key, but have received no response any more since weeks.

Lastly, I have attempted to run their message through https://cirw.in/gpg-decoder to (at least) check information-contents of the keyblock but receive a "invalid packet format".

What am I missing? Perhaps a fundamental lack of knowledge on my end makes me oversee something? Guidance or advice here is more than welcome.

EML attachment contents:

eml attachment contents

2
  • That message appears to be correct rfc1847, although I've never seen anyone else use that and PGP doesn't need it (has its own parsing and versioning). The PGP message begins with a pubenc-SK packet using keyid 674bddefe7b2c6ae which MIT and gnupg.net don't know. I'm not going to the unnecessarily increased effort of checking the rest. Jul 23, 2018 at 14:19
  • In addition to @dave_thompson_085 comment, if "674bddefe7b2c6ae" is not a key ID you recognize, then it's anyone's guess what the bank did when they wrote your response. I would wager a guess that "674bddefe7b2c6ae" is their own key id, and they managed to encrypt the response to themselves.
    – mricon
    Jul 23, 2018 at 14:28

3 Answers 3

1

It should have been encrypted using your public key, so simply decrypt with your private key.

1
  • Yes, if I would have provided a public key. But as I stated in my message, I did not provide them one in my initial report. I did not assume necessary since the steps for disclosure stated: 1) I should use their public PGP to encrypt my message and 2) they would 'provide a response within a couple days'. My question is, since they did now provide me with an encrypted response, what could have been used to encrypt it with?
    – Grassant
    Jul 22, 2018 at 17:34
1

Using the keyid discovered by @dave_thompson_085 by looking at the PGP packet headers -- 674bddefe7b2c6ae -- we can find the owner of the key:

gpg --search 674bddefe7b2c6ae
gpg: data source: http://zimmermann.mayfirst.org:11371
(1) [email protected] <responsible-disclosur[email protected]>
    2048 bit RSA key 5F19FCCE, created: 2013-08-29

So, assuming this is the bank you wrote to in the first place, it would appear that their response is encrypted to their own key. There are several explanations:

  1. It's a copy of your own original email to them
  2. They messed up and encrypted the response to you using their own key

A useful command for you to investigate the encrypted message is using the gpg commandline tool (you can get a Windows version). Save the encrypted message (including -----BEGIN and -----END parts) into an .asc file and run:

gpg --list-packets message.asc

It will list all the keyid's to which the message is encrypted. These would be subkey IDs, so to find the key owner, you'll need to run the gpg --search [subkey-id] as in my example above to find out to whom the subkey belongs.

0

Your comment hints at the source of your confusion (quote, emphasis mine):

Yes, if I would have provided a public key. But as I stated in my message, I did not provide them one in my initial report. I did not assume necessary since the steps for disclosure stated: 1) I should use their public PGP to encrypt my message and 2) they would 'provide a response within a couple days'. My question is, since they did now provide me with an encrypted response, what could have been used to encrypt it with?

You should know that GPG/PGP software tends to synchronize your public key(s) and related email address(es) to servers like pgp.mit.edu, pool.sks-keyservers.net or keys.gnupg.net.

If your public key is indeed synced and stored at those key server, the bank employee handling your report could have simply looked up your public key by searching the key server(s) for your email, or by letting his/her/their GPG/PGP software handle the lookup automatically.

Practical Do-It-Yourself Example

In most cases, the GPG/PGP software handles such lookups automatically, but it can also be done manually. Here’s a practical example how one could manually find my public key:

  1. Visit (for example) http://pgp.mit.edu and enter the email address you want to look up. In this case, I’ll take one of mine…

    How to look up a public key at a key server (1/3)

  2. The result page will list all known public keys (including revoked ones) which are related to that specific email address.

    How to look up a public key at a key server (2/3)

  3. Click the link pointing to the non-revoked public key (in this case 23D47011) to find the related public key.

    How to look up a public key at a key server (3/3)

As you can see, it’s easy to find my public key without me needing to forward it myself. People and software can simply look it up themselves.

I never actively uploaded that key to the keyserver by user interaction. The software I use did that for me… and your software will most probably have done the same for you. In case of doubt, look up your own email address to verify if that’s the case.

TL;DR

If your public key is publicly available at key servers (which it most probably is), then that’s where the employee(s) at the bank got your public key from – and you should be able to decrypt their message(s) using your related private key (which is only known to you).

You must log in to answer this question.