[Gnuk-users] Factory-reset on Gnuk with blocked PIN

Peter Lebbing peter at digitalbrains.com
Mon Oct 30 16:44:52 UTC 2017


Just as a quick note... I don't know what is up with GnuPG's
"factory-reset" command, but the other day the attached script did work
for me while "factory-reset" did not.

It's written for a ZeitControl OpenPGP Card; it first exhausts regular
and Admin PINs, and then sends the Lifecycle Management commands that
reset it to factory state. It worked fine on a GnuK when I tried it,
although the Admin PIN part is of course unnecessary.

Note that it could be modified to use "serialno undefined" and work even
in the case of a card in termination state, but as I said, quick note
:-). It's an old script.

$ gpg-connect-agent -r reset-openpgp-card.gpg-agent

HTH,

Peter.

-- 
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at <http://digitalbrains.com/2012/openpgp-key-peter>
-------------- next part --------------
/hex
scd serialno
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
scd apdu 00 e6 00 00
scd apdu 00 44 00 00
/echo card has been reset to factory defaults
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/gnuk-users/attachments/20171030/da2254f5/attachment.sig>


More information about the gnuk-users mailing list