Display OpenPGP Card stauts: gpg --card-status:

$ gpg --card-status
Application ID ...: D2760001240102010006041393210000
Version ..........: 2.1
Manufacturer .....: Yubico
Serial number ....: 04139321
Name of cardholder: Hatter Jiang
Language prefs ...: cn
Sex ..............: male
URL of public key : [not set]
Login data .......: [not set]
Signature PIN ....: forced
Key attributes ...: 4096R 4096R 4096R
Max. PIN lengths .: 127 127 127
PIN retry counter : 3 0 3
Signature counter : 123
Signature key ....: 6FAF C0E0 1709 85AA 7154  5483 C794 B164 6A88 6CD6
      created ....: 2016-02-18 12:00:33
Encryption key....: E48E C98F E6CA E85A AFD5  A68A C37A 909E AF1B FB00
      created ....: 2016-02-18 12:00:33
Authentication key: EB0A 43A1 0BFC 6E58 323F  7650 BA42 AE53 3FDC E10E
      created ....: 2016-02-18 12:00:53
General key info..: pub  4096R/6A886CD6 2016-02-18 Hatter Jiang (Hatter's 4096 PGP/C) <jht****@gmail.com>
sec>  4096R/6A886CD6  created: 2016-02-18  expires: never     
                      card-no: 0006 04139321
ssb>  4096R/AF1BFB00  created: 2016-02-18  expires: never     
                      card-no: 0006 04139321
ssb>  4096R/3FDCE10E  created: 2016-02-18  expires: never     
                      card-no: 0006 04139321

查看卡片Applet版本号:

$ gpg-connect-agent --hex "scd apdu 00 f1 00 00" /bye
 D[0000]  01 00 06 90 00                                     .....
 OK

字符串01 00 06表示版本为1.0.6

下载Reset OpenPGP Card文件并通过gpg-connect-agent执行该文件:

$ wget https://openpgpcard.cloudbook.wiki/resources/reset_openpgpcard.txt
$ gpg-connect-agent -r reset_openpgpcard.txt

Reset原理:

分别输入三次用户密码和管理员密码,然后标记卡片被终止使用,最后重新初始化卡片。

  1. https://github.com/Yubico/ykneo-openpgp - Yubico/ykneo-openpgp
  2. https://developers.yubico.com/ykneo-openpgp/ResetApplet.html - Home / ykneo-openpgp / ResetApplet