<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
<link rel="self" type="application/atom+xml" href="https://forum.yubico.com/feed.php?f=26&amp;t=1710" />

<title>Yubico Forum</title>
<subtitle>...visit our web-store at</subtitle>
<link href="https://forum.yubico.com/index.php" />
<updated>2015-01-22T19:18:00+01:00</updated>

<author><name><![CDATA[Yubico Forum]]></name></author>
<id>https://forum.yubico.com/feed.php?f=26&amp;t=1710</id>
<entry>
<author><name><![CDATA[Rince]]></name></author>
<updated>2015-01-22T19:18:00+01:00</updated>
<published>2015-01-22T19:18:00+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=1710&amp;p=6762#p6762</id>
<link href="https://forum.yubico.com/viewtopic.php?t=1710&amp;p=6762#p6762"/>
<title type="html"><![CDATA[Re: [SOLVED] After resetting OpenGPG-Applet: Subkeys....]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=1710&amp;p=6762#p6762"><![CDATA[
Yes, you seem to be right. I also tested this before in windows and it didn't work. But maybe this was another problem.<br /><br />As soon as I resetted the key again and installed the secret key with the latest gpg version für debian-backports it worked fine - thanks for the hint!<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=3470">Rince</a> — Thu Jan 22, 2015 7:18 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Klas]]></name></author>
<updated>2015-01-21T15:38:14+01:00</updated>
<published>2015-01-21T15:38:14+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=1710&amp;p=6757#p6757</id>
<link href="https://forum.yubico.com/viewtopic.php?t=1710&amp;p=6757#p6757"/>
<title type="html"><![CDATA[Re: [BUG] After resetting OpenGPG-Applet: Subkeys don't impo]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=1710&amp;p=6757#p6757"><![CDATA[
Hello,<br /><br />Key import is only supported with gpg 2.0.22 and later, this seems to be 2.0.17. When using a newer gpg make sure that all components (gpg-agent, scdaemon...) are the new version.<br /><br />/klas<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=2019">Klas</a> — Wed Jan 21, 2015 3:38 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Rince]]></name></author>
<updated>2015-01-17T00:04:51+01:00</updated>
<published>2015-01-17T00:04:51+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=1710&amp;p=6741#p6741</id>
<link href="https://forum.yubico.com/viewtopic.php?t=1710&amp;p=6741#p6741"/>
<title type="html"><![CDATA[[S!] After resetting OpenGPG-Applet: Subkeys don't import]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=1710&amp;p=6741#p6741"><![CDATA[
Hi,<br /><br />for some weeks I have used my Yubikey Neo now to sign my mails.<br />a gpg2.exe --card-status showed the following today:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">Application ID ...: D2760001240102000006030165310000<br />Version ..........: 2.0<br />Manufacturer .....: unknown<br />Serial number ....: 03016531<br />Name of cardholder: Hanno Wagner<br />Language prefs ...: de<br />Sex ..............: männlich<br />URL of public key : http://blog.rince.de/download/4cf2d85a.txt<br />Login data .......: rince<br />Signature PIN ....: zwingend<br />Key attributes ...: 2048R 2048R 2048R<br />Max. PIN lengths .: 127 127 127<br />PIN retry counter : 0 3 3<br />Signature counter : 42<br />Signature key ....: 069B C697 0BCB B079 D166  C0C4 3512 C2E2 3F4C 33A6<br />      created ....: 2014-12-19 17:07:11<br />Encryption key....: FDB9 2670 3AF8 A7B8 3352  18EB 6033 BEFC 5A92 775A<br />      created ....: 2014-12-19 17:07:40<br />Authentication key: F132 92A0 5884 5290 59CF  65F6 AEB2 C8E8 8651 4EAA<br />      created ....: 2014-12-19 17:07:57<br />General key info..: pub  2048R/3F4C33A6 2014-12-19 Hanno 'Rince' Wagner &lt;wagner@rince.de&gt;<br />sec#  3744R/4CF2D85A  erzeugt: 2014-12-19  verfällt: 2024-12-16<br />ssb&gt;  2048R/3F4C33A6  erzeugt: 2014-12-19  verfällt: 2024-12-16<br />                      Kartennummer:0006 03016531<br />ssb&gt;  2048R/5A92775A  erzeugt: 2014-12-19  verfällt: 2024-12-16<br />                      Kartennummer:0006 03016531<br />ssb&gt;  2048R/86514EAA  erzeugt: 2014-12-19  verfällt: 2024-12-16<br />                      Kartennummer:0006 03016531<br /></div><br /><br />As you can see with the PIN retry counter, the normal PIN was at 0 - which means signing or decrypting wasn't possible anymore.<br />Luckily, I created the keys offline and used gpg2.exe keytocard to import the keys to the smartcard.<br /><br />Since the PIN-retry count was at 0, I read in the forum that the best way would be to reset the Applet. So I checked the version - it is:<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">gpg-connect-agent --hex &quot;scd apdu 00 f1 00 00&quot; /bye<br />D&#91;0000&#93;  01 00 08 90 00    <br /></div><br /><br />Version 1.0.8.9 which seems to be the latest released version.<br /><br />Now, after the reset I just put some infos on the card (name, language, sex), so --card-status shows the following:<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">gpg2.exe --card-status<br />Application ID ...: D2760001240102000006030165310000<br />Version ..........: 2.0<br />Manufacturer .....: unknown<br />Serial number ....: 03016531<br />Name of cardholder: Hanno Wagner<br />Language prefs ...: de<br />Sex ..............: male<br />URL of public key : &#91;not set&#93;<br />Login data .......: &#91;not set&#93;<br />Signature PIN ....: forced<br />Key attributes ...: 2048R 2048R 2048R<br />Max. PIN lengths .: 127 127 127<br />PIN retry counter : 3 3 3<br />Signature counter : 0<br />Signature key ....: &#91;none&#93;<br />Encryption key....: &#91;none&#93;<br />Authentication key: &#91;none&#93;<br />General key info..: &#91;none&#93;<br /></div><br /><br />So, this looks like a new key. The Retry-Counter is at 3 again and this seems to be legit.<br /><br />When I made the reset, of course also the keys were lost - which was accepted. I wanted to re-imort the keys from my secring which was stored somewhere else.<br />And since I had backups, I also had a version where the subkeys were still on the secring and not (yet) linked to the card.<br /><br />I followed the howto on <a href="http://blog.josefsson.org/2014/06/23/offline-gnupg-master-key-and-subkeys-on-yubikey-neo-smartcard/" class="postlink">http://blog.josefsson.org/2014/06/23/offline-gnupg-master-key-and-subkeys-on-yubikey-neo-smartcard/</a> how to create these kind of keys. And it seemed to be fine:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">gpg2.exe --list-secret-keys<br />--------------------<br />sec   3744R/4CF2D85A 2014-12-19 &#91;expires: 2024-12-16&#93;<br />uid                  Hanno 'Rince' Wagner &lt;wagner@rince.de&gt;<br />uid                  &#91;jpeg image of size 5076&#93;<br />uid                  Hanno 'Rince' Wagner (FITUG-Mailadresse) &lt;wagner@fitug.de&gt;<br />uid                  Hanno 'Rince' Wagner (CCCS-Mailadresse) &lt;rince@cccs.de&gt;<br />uid                  Hanno 'Rince' Wagner &lt;rince@linux.de&gt;<br />ssb   2048R/3F4C33A6 2014-12-19<br />ssb   2048R/5A92775A 2014-12-19<br />ssb   2048R/86514EAA 2014-12-19<br /></div><br /><br />So, the secret keys are there and not (yet) linked to the card.<br /><br />But when I try to put these keys onto the card gpg2 fails:<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">gpg2.exe --edit-key 0x4CF2D85A<br />gpg (GnuPG) 2.0.17; Copyright (C) 2011 Free Software Foundation, Inc.<br />This is free software: you are free to change and redistribute it.<br />There is NO WARRANTY, to the extent permitted by law.<br /><br />Secret key is available.<br /><br />pub  3744R/4CF2D85A  created: 2014-12-19  expires: 2024-12-16  usage: SC<br />                     trust: ultimate      validity: ultimate<br />sub  2048R/3F4C33A6  created: 2014-12-19  expires: 2024-12-16  usage: S<br />sub  2048R/5A92775A  created: 2014-12-19  expires: 2024-12-16  usage: E<br />sub  2048R/86514EAA  created: 2014-12-19  expires: 2024-12-16  usage: A<br />&#91;ultimate&#93; (1). Hanno 'Rince' Wagner &lt;wagner@rince.de&gt;<br />&#91;ultimate&#93; (2)  &#91;jpeg image of size 5076&#93;<br />&#91;ultimate&#93; (3)  Hanno 'Rince' Wagner (FITUG-Mailadresse) &lt;wagner@fitug.de&gt;<br />&#91;ultimate&#93; (4)  Hanno 'Rince' Wagner (CCCS-Mailadresse) &lt;rince@cccs.de&gt;<br />&#91;ultimate&#93; (5)  Hanno 'Rince' Wagner &lt;rince@linux.de&gt;<br /><br />gpg&gt; toggle<br /><br />sec  3744R/4CF2D85A  created: 2014-12-19  expires: 2024-12-16<br />ssb  2048R/3F4C33A6  created: 2014-12-19  expires: never<br />ssb  2048R/5A92775A  created: 2014-12-19  expires: never<br />ssb  2048R/86514EAA  created: 2014-12-19  expires: never<br />(1)  Hanno 'Rince' Wagner &lt;wagner@rince.de&gt;<br />(2)  &#91;jpeg image of size 5076&#93;<br />(3)  Hanno 'Rince' Wagner (FITUG-Mailadresse) &lt;wagner@fitug.de&gt;<br />(4)  Hanno 'Rince' Wagner (CCCS-Mailadresse) &lt;rince@cccs.de&gt;<br />(5)  Hanno 'Rince' Wagner &lt;rince@linux.de&gt;<br /><br />gpg&gt; key 1<br /><br />sec  3744R/4CF2D85A  created: 2014-12-19  expires: 2024-12-16<br />ssb* 2048R/3F4C33A6  created: 2014-12-19  expires: never<br />ssb  2048R/5A92775A  created: 2014-12-19  expires: never<br />ssb  2048R/86514EAA  created: 2014-12-19  expires: never<br />(1)  Hanno 'Rince' Wagner &lt;wagner@rince.de&gt;<br />(2)  &#91;jpeg image of size 5076&#93;<br />(3)  Hanno 'Rince' Wagner (FITUG-Mailadresse) &lt;wagner@fitug.de&gt;<br />(4)  Hanno 'Rince' Wagner (CCCS-Mailadresse) &lt;rince@cccs.de&gt;<br />(5)  Hanno 'Rince' Wagner &lt;rince@linux.de&gt;<br /><br />gpg&gt; keytocard<br />Signature key ....: &#91;none&#93;<br />Encryption key....: &#91;none&#93;<br />Authentication key: &#91;none&#93;<br /><br />Please select where to store the key:<br />   (1) Signature key<br />   (3) Authentication key<br />Your selection? 1<br /><br />You need a passphrase to unlock the secret key for<br />user: &quot;Hanno 'Rince' Wagner &lt;wagner@rince.de&gt;&quot;<br />2048-bit RSA key, ID 3F4C33A6, created 2014-12-19<br /><br />gpg: error writing key to card: Not supported<br /></div><br /><br />As you can see, suddenly this key is not supposed to go to that card. But why? This is the same key as there was before I had to reset the OpenGPG-Applet.<br /><br />Unfortunately, I can not see what _exactly_ the card doesn't accept.<br /><br />Is there another way to put the secret key on the card so I can use it again for signing or decrypting files?<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=3470">Rince</a> — Sat Jan 17, 2015 12:04 am</p><hr />
]]></content>
</entry>
</feed>