[Gnuk-users] Nitrokey support in Gnuk-1.1.x

Mateusz Zalega mateusz at nitrokey.com
Wed Aug 26 23:58:40 UTC 2015


Hi Yutaka-san,
On 08/26/2015 01:50 PM, NIIBE Yutaka wrote:
>> I've been trying to add Nitrokey Lite board to chopstx, but suprisingly
>> I couldn't get USB to work. The rest appears to be working fine. Do you
>> think there may be anything _obvious_ I overlooked, like a related
>> change in architecture since Gnuk-1.0.x, etc? I feel that asking for
>> help with debugging would be too much, so just a hint would be nice.
> 
> I think that chopstx/board/board-stbee-mini.h may help.
> 
> Like STBee Mini, you need to configure AFIO (to disable SWD or JTAG).
> If it is done so, we need to configure AFIO clock.  For STBee Mini,
> it includes RCC_APB2ENR_AFIOEN and RCC_APB2RSTR_AFIORST.
> 
> ---------------- In chopstx/board/board-stbee-mini.h:
> #define RCC_ENR_IOP_EN      (RCC_APB2ENR_IOPAEN | RCC_APB2ENR_AFIOEN)
> #define RCC_RSTR_IOP_RST    (RCC_APB2RSTR_IOPARST | RCC_APB2RSTR_AFIORST)
> ----------------

Thanks! It started working after I added RCC_APB2ENR_AFIOEN. I attached
both chopstx board and GNUK_USB_DEVICE_ID patches. The board name was
changed before it has been put into production.

2048-bit RSA is working fine, however when I tried using ECC (NIST
P-256) with current Gnuk-1.1.x, gnupg-2.1.7 and libgcrypt-1.6.3, I have
always ended up with:
> gpg: KEYTOCARD failed: Invalid value

Am I missing something here?

+ CC gnuk-users

Best regards,
Mateusz Zalega
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-board-add-Nitrokey-Start.patch
Type: text/x-patch
Size: 2764 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/gnuk-users/attachments/20150827/0daaceca/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-GNUK_USB_DEVICE_ID-add-Nitrokey-Start.patch
Type: text/x-patch
Size: 1004 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/gnuk-users/attachments/20150827/0daaceca/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/gnuk-users/attachments/20150827/0daaceca/attachment.sig>


More information about the gnuk-users mailing list