<div dir="ltr"><div><div><div><div><div><div><div>The second batch of Nitrokey starts came today, I ordered two more. On one I ran the upgrade_by_passwd.py script. Here's the usb_strings recognizing the key:<br><br>$ python2 ./usb_strings.py <br>Device: <br> Vendor: Nitrokey<br> Product: Nitrokey Start<br> Serial: FSIJ-1.0.4-52FF7106<br> Revision: release/1.0.4-6-g739e00e<br> Config: NITROKEY_START:dfu=no:debug=no:pinpad=no:certdo=yes:keygen=yes<br> Sys: 1.0<br><br></div><div>No keys generated, no initialization whatsever, upgrade right away:<br></div><div><br>$ python2 ./upgrade_by_passwd.py ../regnual/regnual.bin ../src/build/gnuk.bin <br>Admin password: <br>../regnual/regnual.bin: 4372<br>../src/build/gnuk.bin: 110592<br>CRC32: 8d82b2df<br><br>Device: <br>Configuration: 1<br>Interface: 0<br>20001400:20004a00<br>Downloading flash upgrade program...<br>start 20001400<br>end 20002500<br>Run flash upgrade program...<br>Wait 1 seconds...<br>Wait 1 seconds...<br>Wait 1 seconds...<br>Wait 1 seconds...<br>Wait 1 seconds...<br>Wait 1 seconds...<br>Wait 1 seconds...<br>Wait 1 seconds...<br>Wait 1 seconds...<br>Wait 1 seconds...<br>Wait 1 seconds...<br>Wait 1 seconds...<br><br><br></div>This goes on and on and on. Here's the dmesg output:<br><br>dmesg -wH<br>[ +2.755257] usb 1-1.1: new full-speed USB device number 4 using ehci-pci<br>[ +2.755257] usb 1-1.1: new full-speed USB device number 4 using ehci-pci<br>[ +17.034260] usb 1-1-port1: disabled by hub (EMI?), re-enabling...<br>[ +0.000008] usb 1-1.1: USB disconnect, device number 4<br>[ +0.188718] usb 1-1.1: new low-speed USB device number 5 using ehci-pci<br>[ +0.066661] usb 1-1.1: device descriptor read/64, error -32<br>[ +0.170001] usb 1-1.1: device descriptor read/64, error -32<br>[ +0.173339] usb 1-1.1: new low-speed USB device number 6 using ehci-pci<br>[ +0.066655] usb 1-1.1: device descriptor read/64, error -32<br>[ +0.169995] usb 1-1.1: device descriptor read/64, error -32<br>[ +0.173326] usb 1-1.1: new low-speed USB device number 7 using ehci-pci<br>[ +0.406782] usb 1-1.1: device not accepting address 7, error -32<br>[ +0.069870] usb 1-1.1: new low-speed USB device number 8 using ehci-pci<br>[ +0.406659] usb 1-1.1: device not accepting address 8, error -32<br>[ +0.000199] usb 1-1-port1: unable to enumerate USB device<br><br><br><br></div>I stopped it after a few minutes of blinking lights:<br><br>^C<br>Traceback (most recent call last):<br> File "./upgrade_by_passwd.py", line 130, in <module><br> main(wait_e, keyno, passwd, data_regnual, data_upgrade[4096:])<br> File "./upgrade_by_passwd.py", line 73, in main<br> time.sleep(wait_e)<br>KeyboardInterrupt<br><br><br></div>Do note that this was on a different laptop with a different OS. My first attempts were on Arch, I did this on an ubuntu 14.04 machine with gnupg 2.1 compiled. <br><br></div>I also have ordered two FST-01 without case, to see if the upgrade works there. If that is the case, there might be a nitrokey issue. If not, then I hope my STM adapter comes in soon to restore these devices and see if the upgrade works via the stm.<br><br></div>I still have the nitrokey plugged in, lights blinking. If someone has some magic USB scripts or so, I'll leave it plugged in as long as it goes.<br><br></div>Cheers,<br></div>Remy<br><div><div><div><div><div><br><br><br><br></div></div></div></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><br><br><a href="https://raymii.org" target="_blank">https://raymii.org</a><br></div></div>
<br><div class="gmail_quote">On Fri, Aug 19, 2016 at 7:27 AM, Jan Suhr <span dir="ltr"><<a href="mailto:jan@nitrokey.com" target="_blank">jan@nitrokey.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Gentlemen!<br>
<span class=""><br>
Am 19.08.2016 um 06:28 schrieb Remy van Elst:<br>
><br>
><br>
> Op 19 aug. 2016 om 03:12 heeft NIIBE Yutaka <<a href="mailto:gniibe@fsij.org">gniibe@fsij.org</a><br>
</span>> <mailto:<a href="mailto:gniibe@fsij.org">gniibe@fsij.org</a>>> het volgende geschreven:<br>
<div><div class="h5">><br>
>> Hello,<br>
>><br>
>> On 08/19/2016 01:55 AM, Remy van Elst wrote:<br>
>>> The output of:<br>
>>><br>
>>> data_in_device = gnuk.cmd_read_binary(fileid)<br>
>>> print(data_in_device)<br>
>>><br>
>>> before and after the commands for key 0 was:<br>
>>><br>
>>> array('B', [212, 53, 156, 129, 194, 146, 131, 155, 213, 187, 122, 61,<br>
>><br>
>> Thanks. It seemed that it didn't work as I expected (= writing the<br>
>> first two-byte to zero). I'll check.<br>
>><br>
>>> Then, reGNUal works somehow. I don't know if reGNUal's USB worked<br>
>>> well or not. Do you still run your PC? What output of dmesg, can you<br>
>>> see before the time of 142898.997643?<br>
>>><br>
>>><br>
>>> This:<br>
>>><br>
>>> [10978.547877] wlp3s0: authentication with fa:8f:ca:54:8d:12 timed out<br>
>>> [10986.526488] IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready<br>
>>> [11011.497347] IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready<br>
>>> [11014.721191] wlp3s0: authenticate with 34:31:c4:8e:d9:4c<br>
>>> [11014.723742] wlp3s0: send auth to 34:31:c4:8e:d9:4c (try 1/3)<br>
>>> [11014.809521] wlp3s0: authenticated<br>
>>> [11014.810153] wlp3s0: associate with 34:31:c4:8e:d9:4c (try 1/3)<br>
>>> [11014.829753] wlp3s0: RX AssocResp from 34:31:c4:8e:d9:4c (capab=0x411<br>
>>> status=0 aid=1)<br>
>>> [11014.849389] wlp3s0: associated<br>
>>> [11014.849513] IPv6: ADDRCONF(NETDEV_CHANGE): wlp3s0: link becomes ready<br>
>>> [11014.909665] wlp3s0: Limiting TX power to 20 (23 - 3) dBm as<br>
>>> advertised by 34:31:c4:8e:d9:4c<br>
>>> [34439.950737] perf: interrupt took too long (5281 > 5185), lowering<br>
>>> kernel.perf_event_max_sample_<wbr>rate to 37800<br>
>>> [142898.997643] usb 1-1.1: USB disconnect, device number 7<br>
>>> [142900.418569] usb 1-1.1: new full-speed USB device number 8 using<br>
>>> ehci-pci<br>
>>> [145925.226816] usb 1-1-port1: disabled by hub (EMI?), re-enabling...<br>
>><br>
>> It seemed that USB part of reGNUal didn't work well. When upgrade is<br>
>> requested, Gnuk shutdowns the USB port, erases flash ROM pages, and<br>
>> then, gives the control to reGNUal. It is reGNUal which again enables<br>
>> USB port. When it is enabled again, we should see something like:<br>
>><br>
>> usb 1-1.1: New USB device found, idVendor=234b, idProduct=0000<br>
>><br>
>> We need to check how USB port works with Nitrokey Start.<br>
><br>
> I did receive a message from Jan from Nitrokey stating that they don't<br>
> change the vidpid when compiling gnuk for the nitrokey, but I did add<br>
</div></div>> the --vidpid option when configuring set to the out/put /of lsusb, clay<br>
<span class="">> logic's usb id. The other compile option was for the board.<br>
<br>
</span>My initial statement was wrong. The actual USB VID and PID of Nitrokey<br>
Start are in fact 20a0:4211 as Remy mentioned.<br>
<br>
We compile Gnuk with these options:<br>
./configure --vidpid=20a0:4211 --target=NITROKEY_START --enable-certdo<br>
--enable-keygen<br>
<span class=""><br>
<br>
>>> I did find a thread somewhere where it was advised to change the sleep<br>
>>> in this script to 10 seconds. Would that have helped?<br>
>><br>
>> Now, it loops until it finds the USB port. The problem here is Nitrokey<br>
>> Start's USB port issue.<br>
>><br>
>> I don't know if it was tested by the engineers at Nitrokey.<br>
>><br>
>><br>
><br>
> I hope one of them reads the mailing list and can give some more<br>
> information on this part, because I'm also unsure of that.<br>
<br>
</span>We didn't test the upgrade procedure.<br>
<br>
Nitrokey's Start hardware is based on FST's hardware so that both should<br>
behave very similarly. Are you sure the USB port issue is specific for<br>
NK Start?<br>
<br>
Best regards,<br>
Jan<br>
<span class=""><br>
>>> So that part worked at least :). Now on to make the rest also work, and<br>
>>> after that test the 1.2.1 release!<br>
>><br>
>> Yes. Gnuk 1.0.4 on Nitrokey Start worked.<br>
>><br>
>>> I do really appriciate the help and support, so thank you for that. I<br>
>>> did order the swd device (two actually) from aliexpress, so that will<br>
>>> take at least two weeks to get here. I also ordered two more nitrokey<br>
>>> devices, which will hopefully arrive sooner.<br>
>>><br>
>>> I'll document the process there and will use the password upgrade script<br>
>>> at first, before hosing it :)<br>
>><br>
>> Thanks a lot. I suggest to identify/fix the problem of reGNUal at<br>
>> first.<br>
>><br>
>> How did you configure Gnuk 1.2.1 for Nitrokey Start? It effects<br>
>> reGNUal too.<br>
><br>
> As said above, when using the ./configure script I gave the board<br>
> parameter and the vidpid parameter.<br>
><br>
> Do you have any suggestions on debugging this more when the two other<br>
> nitrokeys come in?<br>
><br>
><br>
>> --<br>
>><br>
>> ______________________________<wbr>_________________<br>
>> gnuk-users mailing list<br>
>> <a href="mailto:gnuk-users@lists.alioth.debian.org">gnuk-users@lists.alioth.<wbr>debian.org</a><br>
</span>>> <mailto:<a href="mailto:gnuk-users@lists.alioth.debian.org">gnuk-users@lists.<wbr>alioth.debian.org</a>><br>
>> <a href="https://lists.alioth.debian.org/mailman/listinfo/gnuk-users" rel="noreferrer" target="_blank">https://lists.alioth.debian.<wbr>org/mailman/listinfo/gnuk-<wbr>users</a><br>
<span class="im HOEnZb">><br>
><br>
> ______________________________<wbr>_________________<br>
> gnuk-users mailing list<br>
> <a href="mailto:gnuk-users@lists.alioth.debian.org">gnuk-users@lists.alioth.<wbr>debian.org</a><br>
> <a href="https://lists.alioth.debian.org/mailman/listinfo/gnuk-users" rel="noreferrer" target="_blank">https://lists.alioth.debian.<wbr>org/mailman/listinfo/gnuk-<wbr>users</a><br>
><br>
<br>
</span><span class="im HOEnZb">--<br>
Jan Suhr<br>
<br>
Nitrokey UG (haftungsbeschränkt)<br>
Web: <a href="https://www.nitrokey.com" rel="noreferrer" target="_blank">https://www.nitrokey.com</a><br>
<br>
Email: <a href="mailto:jan@nitrokey.com">jan@nitrokey.com</a><br>
Phone: +49 163 7010 408<br>
<br>
Berliner Str. 166, 10715 Berlin, Germany<br>
CEO / Geschäftsführer: Jan Suhr<br>
Register Record: AG Charlottenburg, HRB 164549 B<br>
VAT ID / USt-IdNr.: DE300136599<br>
<br>
</span><div class="HOEnZb"><div class="h5">______________________________<wbr>_________________<br>
gnuk-users mailing list<br>
<a href="mailto:gnuk-users@lists.alioth.debian.org">gnuk-users@lists.alioth.<wbr>debian.org</a><br>
<a href="https://lists.alioth.debian.org/mailman/listinfo/gnuk-users" rel="noreferrer" target="_blank">https://lists.alioth.debian.<wbr>org/mailman/listinfo/gnuk-<wbr>users</a><br>
</div></div></blockquote></div><br></div>