Sun 17 Jan 2021 02:55:48 PM -03
Sobre tokens criptográficos USB.
Intro
FST-01: Gnuk and Neug
FST-01
- FST-01 (Gniibe)
- FST-01 (Seedstudio)
- unixjazz / DIYNuk · GitLab
- » Reading and Writing Firmware on an STM32 using SWD
- Serial Wire Debug (SWD) - Silicon Labs
- ST-LINK/V2 - ST-LINK/V2 in-circuit debugger/programmer for STM8 and STM32 - STMicroelectronics
- STM8S-DISCOVERY - Discovery kit with STM8S105C6 MCU - STMicroelectronics
- FST-01 gnuk firmware update via USB - Raymii.org
- FST-01 - Seeed Wiki.
- Questions - FST-01 Q&A Forum.
- Programming the FST-01 (gnuk) with a Bus Pirate + OpenOCD.
Gnuk
- Free Software Initiative of Japan - gnuk
- Gnuk Documentation — Gnuk Documentation 1.0 documentation
- Gnuk - Noisebridge.
- Gnuk Token and GnuPG scdaemon.
- Gnuk source code.
Neug
- NeuG, a True Random Number Generator Implementation
- Gnuk / gnuk / neug · GitLab
- Gnuk, NeuG, FST-01
- How can I install Gnuk on FST-01 with NeuG 1.0.5?
- udev-rules for my FST-01 gnuk security token
- Device Configuration for Gnuk Token with libusb — Gnuk Documentation 1.0 documentation
- How to install or update NeuG firmware with STLink/v2 debugger on FST-01
- How can I use NeuG standalone device on my Debian box?
- linux - Using the NeuG TRNG with /dev/random? - Unix & Linux Stack Exchange
Threat modeling
- How safe is Gnuk against side channel attacks, USB sniffer, or electron/tunneling microscope? - FST-01 Q&A Forum.
- How does Gnuk protect against attacks to extract private keys? - FST-01 Q&A Forum.
- What types of risk are more likely? What's "best practice" against that? - FST-01 Q&A Forum.
Programando o FST-01
Agradecimento ao unixjazz
do projeto DIYNuk por fornecer estas instruções!
Roteiro baseado no programador (STLink) ligado a um STM8 com os pinos soldados:
- Ligar ambas as pacas conforme este diagrama dos pinos.
- Configurar o ST-Link (programador) no PC. Instruções aqui.
- Compilar (mesmo procedimento para Gnuk e Neug (se diz Noisy com sotaque japones)) conforme estas instruções.
Em geral, o procedimento e' o seguinte:
- Instalar o ultimo NeuG do repo do Debian.
- Instalar o GNU Toolchan for ARM (4.5 ou maior).
- Instalar o OpenOCD (pacote do Debian).
- Compilar o NeuG.
Configurar o ST-Link com as seguintes regras do udev (por exemplo em
/etc/udev/rules.d/10-stlink.rules
):ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0483", \ ATTR{idProduct}=="3748", GROUP="tape", MODE="664", SYMLINK+="stlink"
Plugar o ST-Link, rodar o OpenOCD e escrever o binario na flash do STM8 conforme este procedimento
- Pronto! Agora basta ler a serial.