如何撤销 PGP 密钥?

Nat*_*man 7 launchpad pgp

注意:这是一个纯假设的情况。

假设我创建了一个 PGP 密钥,将它推送到 Ubuntu 密钥服务器 ( hkp://keyserver.ubuntu.com),并将它添加到我的 Launchpad 帐户。进一步假设我的 PGP 密钥以某种方式被泄露。

除了从 Launchpad 中移除密钥之外,我还需要采取哪些步骤?

Rob*_*ans 11

gpg --list-keys
找到您的密钥 ID:

pub   2048R/deadb33f 2012-03-10
uid                  Something <someone@example.com>


gpg --edit-key 0xdeadb33f

Command> revuid
Really revoke this user ID? (y/N) y
Please select the reason for the revocation:
  0 = No reason specified
  4 = User ID is no longer valid
  Q = Cancel
(Probably you want to select 4 here)
Your decision? 4
gpg --keyserver keyserver.ubuntu.com -send-keys 0xdeadb33f
Run Code Online (Sandbox Code Playgroud)

从 gnupg 邮件列表:

    gpg --keyserver pool.sks-keyservers.net -refresh-keys 0xdecafbad

现在使用 gpg 撤销 UID

    gpg --edit-key 0xdecafbad

gpg 显示密钥上的 UID 列表。输入您的 UID 编号
想撤销。列表将重新显示,所选项目旁边带有 *
一。现在使用 gpg 命令 revuid 撤销:

    命令> revuid
    真的要撤销这个用户名吗?(y/N) 是
    请选择撤销原因:
      0 = 未指定原因
      4 = 用户 ID 不再有效
      Q = 取消
    (可能你要在这里选4)
    您的决定?4

回答密码提示并“保存”以使用
修改的密钥。现在将带有撤销 UID 的密钥发送到密钥服务器

    gpg --keyserver pool.sks-keyservers.net -send-keys 0xdecafbad