~/2018/07/30

Change URL of public key on a GPG smartcard

This also ended up being a lot easier than I thought it would be.

  ~
  ❯ gpg --card-edit

  Reader ...........: Yubico Yubikey NEO U2F CCID 00 00
  Application ID ...: D2760001240102000006038228730000
  Version ..........: 2.0
  Manufacturer .....: Yubico
  Serial number ....: 03822873
  Name of cardholder: Ruben Maher
  Language prefs ...: en
  Sex ..............: male
  URL of public key : https://rkm.id.au/pubkey.txt
  Login data .......: eqyiel
  Signature PIN ....: forced
  Key attributes ...: rsa2048 rsa2048 rsa2048
  Max. PIN lengths .: 127 127 127
  PIN retry counter : 3 3 3
  Signature counter : 2
  Signature key ....: 120A 486A 653C B77A 7F78  769E 32CF FFCA 503F CDAF
        created ....: 2016-02-07 07:03:10
  Encryption key....: FFEC 9291 736D 8C49 6E42  5CD5 94E3 72F3 DC1F AA3D
        created ....: 2016-02-07 07:03:39
  Authentication key: D6C0 6673 7534 B01E 3289  F549 3EA5 B597 1592 B446
        created ....: 2016-02-07 07:04:54
  General key info..: sub  rsa2048/32CFFFCA503FCDAF 2016-02-07 Ruben Maher <ruben@maher.fyi>
  sec   rsa4096/FDAD61AB3311FA17  created: 2013-07-26  expires: never
  ssb   rsa2048/32CFFFCA503FCDAF  created: 2016-02-07  expires: never
  ssb   rsa2048/94E372F3DC1FAA3D  created: 2016-02-07  expires: never
  ssb   rsa2048/3EA5B5971592B446  created: 2016-02-07  expires: never

  gpg/card> url

  Admin-only command

  gpg/card> admin
  Admin commands are allowed

  gpg/card> url
  URL to retrieve public key: https://ruben.maher.fyi/pubkey.txt

  gpg/card> quit

Run with --card-edit once more to confirm the changes took effect:

  ~
  ❯ gpg --card-edit

  Reader ...........: Yubico Yubikey NEO U2F CCID 00 00
  Application ID ...: D2760001240102000006038228730000
  Version ..........: 2.0
  Manufacturer .....: Yubico
  Serial number ....: 03822873
  Name of cardholder: Ruben Maher
  Language prefs ...: en
  Sex ..............: male
  URL of public key : https://ruben.maher.fyi/pubkey.txt
  Login data .......: eqyiel
  Signature PIN ....: forced
  Key attributes ...: rsa2048 rsa2048 rsa2048
  Max. PIN lengths .: 127 127 127
  PIN retry counter : 3 3 3
  Signature counter : 2
  Signature key ....: 120A 486A 653C B77A 7F78  769E 32CF FFCA 503F CDAF
        created ....: 2016-02-07 07:03:10
  Encryption key....: FFEC 9291 736D 8C49 6E42  5CD5 94E3 72F3 DC1F AA3D
        created ....: 2016-02-07 07:03:39
  Authentication key: D6C0 6673 7534 B01E 3289  F549 3EA5 B597 1592 B446
        created ....: 2016-02-07 07:04:54
  General key info..: sub  rsa2048/32CFFFCA503FCDAF 2016-02-07 Ruben Maher <ruben@maher.fyi>
  sec   rsa4096/FDAD61AB3311FA17  created: 2013-07-26  expires: never
  ssb   rsa2048/32CFFFCA503FCDAF  created: 2016-02-07  expires: never
  ssb   rsa2048/94E372F3DC1FAA3D  created: 2016-02-07  expires: never
  ssb   rsa2048/3EA5B5971592B446  created: 2016-02-07  expires: never

  gpg/card> quit

  ~ 29s
  ❯