<div dir="ltr">This is on FSIJ-1.2.13 running on an ST_DONGLE.<div><ol><li>Flash using standard method.</li><li>gpg --card-edit</li><li>factory-reset, y, yes</li><li>rm -rf .gnupg, kill gpg-connect-agent, etc. so GnuPG is fresh</li><li>gpg --import my-secret-subkeys.gpg</li><li>gpg --edit-key myname</li><li>key 1</li><li>keytocard</li><li>(answer menu for encryption key)</li><li>when asked for admin PIN, enter 12345678</li><li>when asked again for admin PIN, enter 12345678</li><li>exit</li><li>gpg --card-edit</li><li>admin</li><li>passwd</li><li>enter 1 for user PIN</li><li><b>enter 12345678</b></li><li>when asked for new password, enter thisismypassword</li><li>when asked again for new password, enter thisismypassword</li><li>exit</li><li>gpg --card-status to confirm that the gnuk device is now loaded with the key </li><li>gpg -d something-encrypted-with-this-key.asc</li><li>when prompted, enter thisismypassword</li><li>get "no decryption key"</li><li>try again</li><li>try again</li><li>device is locked</li></ol><div>Do you see what I did wrong? At step 17 I entered 12345678 instead of 123456. I forgot that the default admin PIN is different from the default user PIN. But the messages that GnuPG printed suggested that the password change succeeded! (See transcript below.)</div></div><div><br></div><div>Moreover, I went back to step 25 and tried entering 123456. Nope -- the password is indeed changed, but it's changed to neither 123456, 12345678, or thisismypassword.</div><div><br></div><div>The bug I'm reporting is that I don't understand why GnuPG accepted the wrong initial user PIN. Why didn't it report that the password change failed? Aside from it being obviously frustrating because the only way to fix it is to factory-reset and do the whole process over again. But it could be a serious issue if a user believes the device is correctly set up, and then (foolishly) discards other copies of the secret subkey.</div><div><br></div><div>I hope this is something within gnuk's control. If it's just GnuPG being silly, then there isn't much this team can do about it.</div><div><br></div><div>(transcript of session follows)</div><div><div>> admin</div><div>Admin commands are allowed</div><div><br></div><div>gpg/card> passwd</div><div>gpg: OpenPGP card no. D2760001xxxxxxxx detected</div><div><br></div><div>1 - change PIN</div><div>2 - unblock PIN</div><div>3 - change Admin PIN</div><div>4 - set the Reset Code</div><div>Q - quit</div><div><br></div><div>Your selection? 1 [entered 12345678, then thisismypassword twice]</div><div><b>PIN changed.    <===== NOTE REPORT OF SUCCESS<br></b></div><div><br></div><div>1 - change PIN</div><div>2 - unblock PIN</div><div>3 - change Admin PIN</div><div>4 - set the Reset Code</div><div>Q - quit</div><div><br></div><div>Your selection? q</div><div><br></div><div>gpg/card> verify [entered thisismypassword]</div><div><br></div><div>Reader ...........: 234B:0000:FSIJ-1.2.13-xxxxx</div><div>Application ID ...: D2760001xxxxxxx</div><div>Version ..........: 2.0</div><div>Manufacturer .....: unmanaged S/N range</div><div>Serial number ....: xxxxxx</div><div>Name of cardholder: [not set]</div><div>Language prefs ...: [not set]</div><div>Sex ..............: unspecified</div><div>URL of public key : [not set]</div><div>Login data .......: [not set]</div><div>Signature PIN ....: forced</div><div>Key attributes ...: ed25519 rsa2048 rsa2048</div><div>Max. PIN lengths .: 127 127 127</div><div><b>PIN retry counter : 2 3 3                 <===== NOTE DECREMENT</b></div></div><div><br></div><div>(end transcript)</div></div>