Revoke PGP key

Follow this tutorial if you want to revoke a pgp key. All you need for this is your private key and eventually the pass phrase to open it.

At first you need to install pgp on your machine. I have installed GnuPG.

Change to the install dir or add to PATH.

cd C:\Program Files (x86)\GNU\GnuPG

Next import your private key:

gpg2 --import priv.asc

check if it was successfully imported an note the id for the next step:

gpg2 --list-secret-keys
C:/Users/<Username>/AppData/Roaming/gnupg/secring.gpg
----------------------------------------------------
sec   2048R/9FD0EF83 2013-12-04
uid                  Christian Zöller <example@example.com>

In my case:  9FD0EF83

Now we will generate a revocation certificate – you can add additional information why you want to revoke this key:

gpg2 --output revoke.asc --gen-revoke 9FD0EF83

sec  2048R/9FD0EF83 2013-12-04 Christian Zöller <example@example.com>

Ein Widerrufszertifikat f³r diesen Schl³ssel erzeugen? (j/N) j
Grund f³r den Widerruf:
  0 = Kein Grund angegeben
  1 = Hinweis: Dieser Schl³ssel ist nicht mehr sicher
  2 = Schl³ssel ist ³berholt
  3 = Schl³ssel wird nicht mehr benutzt
  Q = Abbruch
(Wahrscheinlich m÷chten Sie hier 1 auswõhlen)
Ihre Auswahl? 2
Geben Sie eine optionale Beschreibung ein. Beenden mit einer leeren Zeile:
>
Grund f³r Widerruf: Schl³ssel ist ³berholt
(Keine Beschreibung angegeben)
Ist das OK? (j/N) j

Sie ben÷tigen eine Passphrase, um den geheimen Schl³ssel zu entsperren.
Benutzer: "Christian Zöller <example@example.com>"
2048-Bit RSA Schl³ssel, ID 9FD0EF83, erzeugt 2013-12-04

Ausgabe mit ASCII H³lle erzwungen
Widerrufszertifikat wurde erzeugt.

Bitte speichern Sie es auf einem Medium, welches Sie wegschlie▀en
k÷nnen; falls Mallory (ein Angreifer) Zugang zu diesem Zertifikat
erhõlt, kann er Ihren Schl³ssel unbrauchbar machen.  Es wõre klug,
dieses Widerrufszertifikat auch auszudrucken und sicher aufzubewahren,
falls das urspr³ngliche Medium nicht mehr lesbar ist.  Aber Obacht: Das
Drucksystem kann unter Umstõnden anderen Nutzern eine Kopie zugõnglich
machen.

You will find the created certificate at:

C:\Users\<Username>\AppData\Local\VirtualStore\Program Files (x86)\GNU\GnuPG

Now that we have the certificate we have to import it. (A revocation certificate is mostly generated while the creation process of a new private key and thereby not imported automatically while generating a revocation certificate)

After this command your key is actually revoked.

gpg2 --import "C:\Users\<Username>\AppData\Local\
VirtualStore\Program Files (x86)\GNU\GnuPG\revoke.asc"
gpg: Schl³ssel 9FD0EF83: "Christian Zöller <example@example.com>" Widerrufzertifi
kat importiert
gpg: Anzahl insgesamt bearbeiteter Schl³ssel: 1
gpg:                 neue Schl³sselwiderrufe: 1
gpg: 3 marginal-needed, 1 complete-needed, PGP Vertrauensmodell
gpg: Tiefe: 0  g³ltig:   1  signiert:   1  Vertrauen: 0-, 0q, 0n, 0m, 0f, 1u
gpg: Tiefe: 1  g³ltig:   1  signiert:   0  Vertrauen: 1-, 0q, 0n, 0m, 0f, 0u
gpg: nõchste "Trust-DB"-Pflicht³berpr³fung am 2019-02-13

But nobody knows about this.. So we tell at least one keyserver that our key is obsolete:

gpg2 --keyserver pgp.mit.edu --send-keys 9FD0EF
83
gpg: sende Schl³ssel 9FD0EF83 auf den hkp-Server pgp.mit.edu

I choosed pgp.mit.edu. So I will test if everything is fine by searching for the id: no result.

When searching for my email address I see the key with a mark: “*** KEY REVOKED ***”

So we are done! Since the keyserver sync each other just wait some days/weeks and everyone should know about the revocation.

 

If you have found a spelling error, please, notify us by selecting that text and pressing Ctrl+Enter.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Spelling error report

The following text will be sent to our editors: