Gnuk Token on ST Dongle with STM32F103CBU6
Based on Daniel Kucera's implementation of the confirmation button, adapted for a different ST Dongle using an STM32F103CBU6 microcontroller.
Order of the 4 SWD interface holes from left to right:
The left PINs where you can solder the confirmation button are connected as follow:
- RST is connected to GPIO PB6.
- SWIM is connected to GPIO PB8 and PB11.
You can use a multimeter in continuity mode and the below pinout diagram (from the STM32F103 datasheet) in order to confirm you have an ST dongle compatible with this patch.
Patch, build and flash the Gnuk firmware.
git clone --branch=release/1.2.14 --recurse-submodules https://salsa.debian.org/gnuk-team/gnuk/gnuk cd gnuk git apply ../gnuk-1.2.14-st-dongle-button.patch cd src ./configure --vidpid=234b:0000 --enable-factory-reset --enable-confirm-button --enable-certdo --disable-sys1-compat --target=ST_DONGLE make openocd -f ../../stm32write.cfg
The Gnuk patch requires button confirmation for signature, encryption and authentication operations. You can comment out some calls to the
wait_button function if you need button confirmation only for some of these operations.