3

I am new to public key cryptography. I see from keyservers it's possible to do a look up for public keys associated with an email address.

Is there a reverse function available to check what email/domain a public key relates to. I have several of these that need querying.

user1561108
  • 133
  • 1
  • 5

1 Answers1

3

If the key owner provided his or her actual email adress when generating the keys you can read it from the public key.

For an asc keyfile you could simply use

gpg [file]

It should also be displayed when importing the key into Gpg4Win.

Source

floworbit
  • 316
  • 1
  • 11
  • 1
    Interesting, thanks. What is the default gpg command being run here? – user1561108 Sep 25 '17 at 13:35
  • Another question - if I ran my own open keyserver would I be able to query and collect such data on each public key? – user1561108 Sep 25 '17 at 14:21
  • Also separate but related question - is there a similar method for getting any id used at generation time for SSH public keys? – user1561108 Sep 25 '17 at 14:22
  • 2
    @user1561108: see [the man page](https://linux.die.net/man/1/gpg) under heading Commands the second paragraph. If you run an open keyserver you'll get the same data that you can get from existing open keyservers, but not all PGP keys are on open keyservers or even any keyservers. SSH is a different question and stackexchange is designed to answer one question per question, plus different implementations of SSH differ and on some implementations different options or cases differ. – dave_thompson_085 Sep 26 '17 at 02:02