Mailing List Archive

Clearing cached PIN for Yubikey
Hello!

I was attempting to figure out what the 'canonical' way of clearing a Yubikey's cached PIN is. I adjusted the default-cache-ttl and max-cache-ttl values in gpg-agent.conf to no effect. I also attempted to use card-timeout (even though it was clear from searching around that it was probably useless).

I know there's a setting to force (or not force) entering a PIN for signing in gpg --edit-card, but there doesn't seem to be a corresponding option for forcing a PIN for decryption.

Obviously I can just yank out my Yubikey or restart the agent (systemctl --user restart gpg-agent) and get the desired effect (although echo RELOADAGENT | gpg-connect-agent *doesn't* achieve the same thing...), but I'd like to find another option if available.

Here is the output of gpg --version:

gpg (GnuPG) 2.2.20
libgcrypt 1.8.6
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: /home/chiraag/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2

I'm running Debian sid/experimental and use systemd as my init system and service manager, if that impacts anything.

Thank you very much for any tips and/or pointers!

Sincerely,

Chiraag
--
?????? ??????
Pronouns: he/him/his
Re: Clearing cached PIN for Yubikey [ In reply to ]
?????? ?????? wrote:
> I was attempting to figure out what the 'canonical' way of clearing a
> Yubikey's cached PIN is.

Clearing the authentication status is supported in scdaemon (in the
lower level), but there is no good way by command line.

If you don't care about using a kind of develper's tool
(gpg-connect-agent), you can do following.

For signing, type:

$ gpg-connect-agent "SCD PASSWD --clear 1" /bye

For decryption/authentication, type:

$ gpg-connect-agent "SCD PASSWD --clear 2" /bye


Perhaps, using a tool for users would be more relevant. Then,

$ gpgconf --kill scdaemon

could be used to clear all authentication status.
--

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users