From mishaad051 at gmail.com Wed Feb 3 11:12:14 2021 From: mishaad051 at gmail.com (Mike) Date: Wed, 3 Feb 2021 13:12:14 +0300 Subject: GNUK 1.2.15 on XNUCLEO-F103RB does not respond to gpg --card-status Message-ID: The XNUCLEO-F103RB does not respond to gpg --card-status after flashing GNUK 1.2.15 with commit hash 2142d0aa3533a9bb0686da27f803543301b1c88b. I flashed it via connecting ST-LINKv2 based on STM32F103C816. The target controller is STM32F103RBT6. OpenOCD writing log is at https://termbin.com/6kdp Versions of used software: pacman -Q openocd arm-none-eabi-gcc arm-none-eabi-newlib openocd 1:0.10.0-4 arm-none-eabi-gcc 10.2.0-1 arm-none-eabi-newlib 4.1.0-1 After writing, I pressed onboard reset button twice before attempting to use it with gpg. From szczepan at nitrokey.com Wed Feb 3 12:44:06 2021 From: szczepan at nitrokey.com (Szczepan Zalega | Nitrokey) Date: Wed, 3 Feb 2021 12:44:06 +0100 Subject: GNUK 1.2.15 on XNUCLEO-F103RB does not respond to gpg --card-status In-Reply-To: References: Message-ID: <70fa4b69-4622-60d9-34ab-049e89bbf8d9@nitrokey.com> On 2/3/21 11:12 AM, Mike wrote: > The XNUCLEO-F103RB does not respond to gpg --card-status after flashing > GNUK 1.2.15 with commit hash 2142d0aa3533a9bb0686da27f803543301b1c88b. > I flashed it via connecting ST-LINKv2 based on STM32F103C816. The target > controller is STM32F103RBT6. > (...) Hi! Make sure you have selected the right kind of the board during GNUK configuration building. Which one have you used? -- Best regards, Szczepan From mishaad051 at gmail.com Wed Feb 3 13:08:30 2021 From: mishaad051 at gmail.com (Mike) Date: Wed, 3 Feb 2021 15:08:30 +0300 Subject: GNUK 1.2.15 on XNUCLEO-F103RB does not respond to gpg --card-status In-Reply-To: <70fa4b69-4622-60d9-34ab-049e89bbf8d9@nitrokey.com> References: <70fa4b69-4622-60d9-34ab-049e89bbf8d9@nitrokey.com> Message-ID: I ran ./configure --vidpid=234b:0000 --enable-factory-reset --target=ST_NUCLEO_F103 What should I look at to make the board work? From szczepan at nitrokey.com Wed Feb 3 13:28:40 2021 From: szczepan at nitrokey.com (Szczepan Zalega | Nitrokey) Date: Wed, 3 Feb 2021 13:28:40 +0100 Subject: GNUK 1.2.15 on XNUCLEO-F103RB does not respond to gpg --card-status In-Reply-To: References: <70fa4b69-4622-60d9-34ab-049e89bbf8d9@nitrokey.com> Message-ID: <9eda2764-2134-224a-0602-5fceb1c2fbeb@nitrokey.com> On 2/3/21 1:08 PM, Mike wrote: > I ran ./configure --vidpid=234b:0000 --enable-factory-reset --target=ST_NUCLEO_F103 > > What should I look at to make the board work? 1. How is your USB connected to the board? What pins do you use? 2. Are there any dmesg messages from the USB connection (USB enumeration)? (I am sorry, if I am making obvious questions) -- Best regards, Szczepan From mishaad051 at gmail.com Wed Feb 3 13:44:30 2021 From: mishaad051 at gmail.com (Mike) Date: Wed, 3 Feb 2021 15:44:30 +0300 Subject: GNUK 1.2.15 on XNUCLEO-F103RB does not respond to gpg --card-status In-Reply-To: <9eda2764-2134-224a-0602-5fceb1c2fbeb@nitrokey.com> References: <70fa4b69-4622-60d9-34ab-049e89bbf8d9@nitrokey.com> <9eda2764-2134-224a-0602-5fceb1c2fbeb@nitrokey.com> Message-ID: 1. The ST-LINK is connected to a target via a 8-pin port near USB. 2. No, dmesg shows me nothing even after a couple of reset button presses and reconnecting the USB. From marian.buschsieweke at ovgu.de Wed Feb 3 13:34:26 2021 From: marian.buschsieweke at ovgu.de (Marian Buschsieweke) Date: Wed, 3 Feb 2021 13:34:26 +0100 Subject: GNUK 1.2.15 on XNUCLEO-F103RB does not respond to gpg --card-status In-Reply-To: References: <70fa4b69-4622-60d9-34ab-049e89bbf8d9@nitrokey.com> Message-ID: <20210203133426.006c2fc5@faultier2go.lan> Hi, note that the Nucleo-F103RB only has a single USB socket, which is connected to the debbuger. You won't be able to connect to the Nucleo with that socket. (I couldn't find any hint to that in the documentation. IMO, this would be something worth pointing out.) IMO you're better of with e.g. an STM32F103 BluePill and a cheap ST-Link V2 programmer (each ~2? at the usual sources), as the single USB socket on the BluePill is indeed connected to the MCU. Kind regards, Marian On Wed, 3 Feb 2021 15:08:30 +0300 Mike wrote: > I ran ./configure --vidpid=234b:0000 --enable-factory-reset --target=ST_NUCLEO_F103 > > What should I look at to make the board work? > > _______________________________________________ > Gnuk-users mailing list > Gnuk-users at gnupg.org > https://lists.gnupg.org/mailman/listinfo/gnuk-users -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 228 bytes Desc: OpenPGP digital signature URL: From mishaad051 at gmail.com Wed Feb 3 15:26:50 2021 From: mishaad051 at gmail.com (Mike) Date: Wed, 3 Feb 2021 17:26:50 +0300 Subject: GNUK 1.2.15 on XNUCLEO-F103RB does not respond to gpg --card-status In-Reply-To: <20210203133426.006c2fc5@faultier2go.lan> References: <70fa4b69-4622-60d9-34ab-049e89bbf8d9@nitrokey.com> <20210203133426.006c2fc5@faultier2go.lan> Message-ID: It is XNUCLEO, debugger is attached separately. https://www.waveshare.com/wiki/XNUCLEO-F103RB Mind poining on how to attach USB to the Nucleo directly, please? From marian.buschsieweke at ovgu.de Wed Feb 3 15:31:03 2021 From: marian.buschsieweke at ovgu.de (Marian Buschsieweke) Date: Wed, 3 Feb 2021 15:31:03 +0100 Subject: GNUK 1.2.15 on XNUCLEO-F103RB does not respond to gpg --card-status In-Reply-To: References: <70fa4b69-4622-60d9-34ab-049e89bbf8d9@nitrokey.com> <20210203133426.006c2fc5@faultier2go.lan> Message-ID: <20210203153103.64cb69af@faultier2go.lan> Hi, the XNUCLEO-F103RB seems to have to USB interfaces, one for an internal USB<-->UART adapter, one is connected to the MCU. You want to use the second. Also mind this note on the website: USB connector ============= Except the XNUCLEO-F030R8, all the other XNUCLEO devices have reserved a USB connector which can be enabled by setting JP1 to ON. Kind regards, Marian On Wed, 3 Feb 2021 17:26:50 +0300 Mike wrote: > It is XNUCLEO, debugger is attached separately. https://www.waveshare.com/wiki/XNUCLEO-F103RB > > Mind poining on how to attach USB to the Nucleo directly, please? > > _______________________________________________ > Gnuk-users mailing list > Gnuk-users at gnupg.org > https://lists.gnupg.org/mailman/listinfo/gnuk-users -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 228 bytes Desc: OpenPGP digital signature URL: From mishaad051 at gmail.com Wed Feb 3 16:33:29 2021 From: mishaad051 at gmail.com (Mike) Date: Wed, 3 Feb 2021 18:33:29 +0300 Subject: GNUK 1.2.15 on XNUCLEO-F103RB does not respond to gpg --card-status In-Reply-To: <20210203153103.64cb69af@faultier2go.lan> References: <70fa4b69-4622-60d9-34ab-049e89bbf8d9@nitrokey.com> <20210203133426.006c2fc5@faultier2go.lan> <20210203153103.64cb69af@faultier2go.lan> Message-ID: J1 is on the contacts. I attempted to replace the jumper. After replacing the jumper, I reset the board. Still, dmesg is oddly silent. As is GPG. I used the memory inspector from STCUBE (the GNUK was not personalized yet) and bits of gnuk.elf in range 0x0 - 0x3F0 and the bits of controller in same range are the same. From gniibe at fsij.org Thu Feb 4 08:06:13 2021 From: gniibe at fsij.org (NIIBE Yutaka) Date: Thu, 04 Feb 2021 16:06:13 +0900 Subject: GNUK 1.2.15 on XNUCLEO-F103RB does not respond to gpg --card-status In-Reply-To: <20210203133426.006c2fc5@faultier2go.lan> References: <70fa4b69-4622-60d9-34ab-049e89bbf8d9@nitrokey.com> <20210203133426.006c2fc5@faultier2go.lan> Message-ID: <877dnonwgq.fsf@iwagami.gniibe.org> Marian Buschsieweke wrote: > (IMO, this would be something worth pointing out.) Here it is: https://www.fsij.org/gnuk/neug-on-stm32-nucleo-f103.html When I wrote this, STM32 Nucleo F103 was the best one for availability. Although it is written for NeuG, same hardware can be used to run Gnuk. -- From mishaad051 at gmail.com Fri Feb 5 12:21:50 2021 From: mishaad051 at gmail.com (Mike) Date: Fri, 5 Feb 2021 14:21:50 +0300 Subject: GNUK 1.2.15 on XNUCLEO-F103RB does not respond to gpg --card-status In-Reply-To: <877dnonwgq.fsf@iwagami.gniibe.org> References: <70fa4b69-4622-60d9-34ab-049e89bbf8d9@nitrokey.com> <20210203133426.006c2fc5@faultier2go.lan> <877dnonwgq.fsf@iwagami.gniibe.org> Message-ID: Afer applying the instructions to XNUCLEO, I got it to work. Thank you. (Side note: count pins from bottom of the circuit). From gniibe at fsij.org Fri Feb 26 01:58:13 2021 From: gniibe at fsij.org (NIIBE Yutaka) Date: Fri, 26 Feb 2021 09:58:13 +0900 Subject: Chopstx 1.19 / Chopstx 2.2 Message-ID: <874khzbq6y.fsf@iwagami.gniibe.org> Hello, Chopstx 1.19 is released. tag release/1.19 Tagger: NIIBE Yutaka Date: Thu Feb 18 11:04:09 2021 +0900 commit 71cc5a8f32e0b037def54530fb85c0cda0c5c4e7 This release is from STABLE-BRANCH-1 branch. Major change is only for GNU/Linux emulation. Backported from master, now, it supports AckBtn driver, and its (fake)ADC driver uses getrandom(2). Chopstx 2.2 is released (2.1 was not announced). tag release/2.2 Tagger: NIIBE Yutaka Date: Fri Feb 26 09:17:27 2021 +0900 commit 5a3a3e98d4cde3e5f613e4740805cd5a101ae22b This release is from master branch. 2.0 was buggy (and 2.1 too), it only worked well with Sipeed Longan nano (GD32VF103). Major changes for Cortex-M0/M3/M4 are adoption of GCC option of -masm-syntax-unified, and no use of PendSV any more. After 10 years of experience, I learned about difference between old and new syntax of ARM asm. (It is quite confusing.) In GNU/Linux emulation, it supports AckBtn driver (using terminal), and its (fake)ADC driver uses getrandom(2). -- From gniibe at fsij.org Fri Feb 26 02:56:32 2021 From: gniibe at fsij.org (NIIBE Yutaka) Date: Fri, 26 Feb 2021 10:56:32 +0900 Subject: Gnuk 1.2.17 Message-ID: <871rd3bnhr.fsf@iwagami.gniibe.org> Hello, again, Gnuk 1.2.17 is released. tag release/1.2.17 Tagger: NIIBE Yutaka Date: Thu Feb 25 15:49:02 2021 +0900 commit 4af98308e06c42dcc4e0be7a4faedc77e98de297 This release is from STABLE-BRANCH-1-2 branch. Please note that, master switched to Chopstx 2.x. Basically, it's a release for GNU/Linux emulation. Chopstx is updated to 1.19 to use new drivers for GNU/Linux emulation. We had discussion that... it is good to require setup of KDF Data Object in advance before keygen or key import. For GNU/Linux emulation only, I am testing rejecting keygen and key import in a situation with no KDF Data Object setup. Applying following patch, you can test the rejection for GNU/Linux emulation. Note that this rejection would give users a bad experience, in existing tools and documentation. diff --git a/src/configure b/src/configure index 8e7000c..4318d56 100755 --- a/src/configure +++ b/src/configure @@ -219,7 +219,7 @@ if test "$target" = "GNU_LINUX"; then emulation="yes" cross="" mcu="none" - kdf_do_require=yes + kdf_do_required=yes def_emulation="-DGNU_LINUX_EMULATION" def_memory_size="-DMEMORY_SIZE=1024" enable_hexoutput="" I think that for GNU/Linux emulation, this makes sense. Because GNU/Linux emulation simply uses a file to store private keys. Here is a session log using three terminals: In the terminal #1, I built Gnuk executable (the command "gnuk"), by configure and make. And then, run "./build/gnuk" (you can use --vidpid=234b:0000 argument, but it's not needed). The "gnuk" executable kindly shows how to type by root. So, I typed as it saied in the terminal #2. Then, I checked by "usbip port" command if it is correctly attached. (You can also see by "dmesg" command.) For some reason (I don't know), lsusb output was too long. In the terminal #3, I invoked the test suite of Gnuk, which uses PyTest. I confirmed all tests went well. (Note that the test suite assumes that no rejection of keygen and key import.) Lastly, back in the terminal #1, I killed the process of "gnuk" by typing Ctrl-C. When you run "gnuk" executable, you will see a file will be created at ~/.gnuk-flash-image. -------------------------- Terminal #1 gniibe at iwagami:~/work/gnuk/gnuk12/src$ ./configure --enable-factory-reset --target=GNU_LINUX Header file is: board-gnu-linux.h Debug option disabled Configured for bare system (no-DFU) PIN pad option disabled CERT.3 Data Object is NOT supported Card insert/removal by HID device is NOT supported Life cycle management is supported Acknowledge button is supported gniibe at iwagami:~/work/gnuk/gnuk12/src$ make mkdir -p build gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/main.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/main.o.d -I. -I../polarssl/include -I../chopstx main.c -o build/main.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/call-rsa.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/call-rsa.o.d -I. -I../polarssl/include -I../chopstx call-rsa.c -o build/call-rsa.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/usb_desc.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/usb_desc.o.d -I. -I../polarssl/include -I../chopstx usb_desc.c -o build/usb_desc.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/usb_ctrl.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/usb_ctrl.o.d -I. -I../polarssl/include -I../chopstx usb_ctrl.c -o build/usb_ctrl.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/usb-ccid.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/usb-ccid.o.d -I. -I../polarssl/include -I../chopstx usb-ccid.c -o build/usb-ccid.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/openpgp.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/openpgp.o.d -I. -I../polarssl/include -I../chopstx openpgp.c -o build/openpgp.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/ac.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/ac.o.d -I. -I../polarssl/include -I../chopstx ac.c -o build/ac.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/openpgp-do.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/openpgp-do.o.d -I. -I../polarssl/include -I../chopstx openpgp-do.c -o build/openpgp-do.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/flash.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/flash.o.d -I. -I../polarssl/include -I../chopstx flash.c -o build/flash.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/bn.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/bn.o.d -I. -I../polarssl/include -I../chopstx bn.c -o build/bn.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/mod.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/mod.o.d -I. -I../polarssl/include -I../chopstx mod.c -o build/mod.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/modp256r1.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/modp256r1.o.d -I. -I../polarssl/include -I../chopstx modp256r1.c -o build/modp256r1.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/jpc_p256r1.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/jpc_p256r1.o.d -I. -I../polarssl/include -I../chopstx jpc_p256r1.c -o build/jpc_p256r1.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/ec_p256r1.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/ec_p256r1.o.d -I. -I../polarssl/include -I../chopstx ec_p256r1.c -o build/ec_p256r1.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/call-ec_p256r1.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/call-ec_p256r1.o.d -I. -I../polarssl/include -I../chopstx call-ec_p256r1.c -o build/call-ec_p256r1.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/modp256k1.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/modp256k1.o.d -I. -I../polarssl/include -I../chopstx modp256k1.c -o build/modp256k1.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/jpc_p256k1.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/jpc_p256k1.o.d -I. -I../polarssl/include -I../chopstx jpc_p256k1.c -o build/jpc_p256k1.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/ec_p256k1.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/ec_p256k1.o.d -I. -I../polarssl/include -I../chopstx ec_p256k1.c -o build/ec_p256k1.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/call-ec_p256k1.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/call-ec_p256k1.o.d -I. -I../polarssl/include -I../chopstx call-ec_p256k1.c -o build/call-ec_p256k1.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/mod25638.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/mod25638.o.d -I. -I../polarssl/include -I../chopstx mod25638.c -o build/mod25638.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/ecc-edwards.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/ecc-edwards.o.d -I. -I../polarssl/include -I../chopstx ecc-edwards.c -o build/ecc-edwards.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/ecc-mont.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/ecc-mont.o.d -I. -I../polarssl/include -I../chopstx ecc-mont.c -o build/ecc-mont.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/sha512.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/sha512.o.d -I. -I../polarssl/include -I../chopstx sha512.c -o build/sha512.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/random.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/random.o.d -I. -I../polarssl/include -I../chopstx random.c -o build/random.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/neug.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/neug.o.d -I. -I../polarssl/include -I../chopstx neug.c -o build/neug.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/sha256.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/sha256.o.d -I. -I../polarssl/include -I../chopstx sha256.c -o build/sha256.o gcc -c -O3 -g -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/bignum.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/bignum.o.d -I. -I../polarssl/include -I../chopstx ../polarssl/library/bignum.c -o build/bignum.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/rsa.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/rsa.o.d -I. -I../polarssl/include -I../chopstx ../polarssl/library/rsa.c -o build/rsa.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/aes.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/aes.o.d -I. -I../polarssl/include -I../chopstx ../polarssl/library/aes.c -o build/aes.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/entry-gnu-linux.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/entry-gnu-linux.o.d -I. -I../polarssl/include -I../chopstx ../chopstx/entry-gnu-linux.c -o build/entry-gnu-linux.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/chopstx.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/chopstx.o.d -I. -I../polarssl/include -I../chopstx ../chopstx/chopstx.c -o build/chopstx.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/eventflag.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/eventflag.o.d -I. -I../polarssl/include -I../chopstx ../chopstx/eventflag.c -o build/eventflag.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/chx-gnu-linux.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/chx-gnu-linux.o.d -I. -I../polarssl/include -I../chopstx ../chopstx/mcu/chx-gnu-linux.c -o build/chx-gnu-linux.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/sys-gnu-linux.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/sys-gnu-linux.o.d -I. -I../polarssl/include -I../chopstx ../chopstx/mcu/sys-gnu-linux.c -o build/sys-gnu-linux.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/usb-usbip.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/usb-usbip.o.d -I. -I../polarssl/include -I../chopstx ../chopstx/mcu/usb-usbip.c -o build/usb-usbip.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/adc-gnu-linux.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/adc-gnu-linux.o.d -I. -I../polarssl/include -I../chopstx ../chopstx/contrib/adc-gnu-linux.c -o build/adc-gnu-linux.o gcc -c -O3 -Os -g -ffunction-sections -fdata-sections -fno-common -Wall -Wextra -Wstrict-prototypes -Wa,-alms=build/ackbtn-gnu-linux.lst -DGNU_LINUX_EMULATION -DMEMORY_SIZE=1024 -DMHZ=72 -DBN256_C_IMPLEMENTATION -DUSE_SYS -D_GNU_SOURCE -MD -MP -MF .dep/ackbtn-gnu-linux.o.d -I. -I../polarssl/include -I../chopstx ../chopstx/contrib/ackbtn-gnu-linux.c -o build/ackbtn-gnu-linux.o gcc -o build/gnuk build/main.o build/call-rsa.o build/usb_desc.o build/usb_ctrl.o build/usb-ccid.o build/openpgp.o build/ac.o build/openpgp-do.o build/flash.o build/bn.o build/mod.o build/modp256r1.o build/jpc_p256r1.o build/ec_p256r1.o build/call-ec_p256r1.o build/modp256k1.o build/jpc_p256k1.o build/ec_p256k1.o build/call-ec_p256k1.o build/mod25638.o build/ecc-edwards.o build/ecc-mont.o build/sha512.o build/random.o build/neug.o build/sha256.o build/bignum.o build/rsa.o build/aes.o build/entry-gnu-linux.o build/chopstx.o build/eventflag.o build/chx-gnu-linux.o build/sys-gnu-linux.o build/usb-usbip.o build/adc-gnu-linux.o build/ackbtn-gnu-linux.o -lpthread gniibe at iwagami:~/work/gnuk/gnuk12/src$ ./build/gnuk Gnuk (emulation with USBIP), a GnuPG USB Token implementation Copyright (C) 2021 Free Software Initiative of Japan This is free software under GPLv3+. USBIP thread started. You can use this by attaching following commands: # modprobe vhci_hcd # usbip attach -r 127.0.0.1 -b 1-1 User interaction thread for AckBtn started. ^C gniibe at iwagami:~/work/gnuk/gnuk12/src$ exit -------------------------- Terminal #2 root at iwagami:/# modprobe vhci_hcd root at iwagami:/# usbip attach -r 127.0.0.1 -b 1-1 root at iwagami:/# usbip port Imported USB devices ==================== Port 00: at Full Speed(12Mbps) unknown vendor : unknown product (0000:0000) 3-1 -> usbip://127.0.0.1:3240/1-1 -> remote bus/dev 000/000 -------------------------- Terminal #3 gniibe at iwagami:~/work/gnuk/gnuk12/tests$ py.test-3 -x ================================================================== test session starts =================================================================== platform linux -- Python 3.9.1+, pytest-3.10.1, py-1.7.0, pluggy-0.8.0 rootdir: /home/gniibe/work/gnuk/gnuk12/tests, inifile: collected 416 items test_000_empty_card.py .............................. [ 7%] test_001_personalize_card.py ..................................................... [ 19%] test_002_personalize_reset.py ............ [ 22%] test_003_remove_keys.py ... [ 23%] test_004_reset_pw3.py .... [ 24%] test_005_personalize_admin_less.py ............................................................................ [ 42%] test_009_keygen.py ........... [ 45%] test_011_kdf_full.py .......................................................................... [ 63%] test_016_kdf_single.py .......................................................................... [ 81%] test_021_personalize_admin_less.py ............................................................................ [ 99%] test_025_kdf_none.py ... [100%] ============================================================== 416 passed in 84.70 seconds =============================================================== gniibe at iwagami:~/work/gnuk/gnuk12/tests$ -------------------------- Enjoy, --