Support me via monero please if you like this project:
monero:42eQ1sZtR1USUcGRwc4hiTLNvL7q8U9XSCVVtuhRFKKREpevd4F1X3aN8X4UzkqNTy3n4BsfUooLvj1ydjpem5Ee9SRA2dZ
tdongle-yk is a LilyGO T-Dongle S3 focused fork of pico-fido2 / pico-openpgp.
The goal of this fork is simple:
- run
FIDO2,OTP,OATH,OpenPGPandPIVon theLilyGO T-Dongle S3 - expose a
YubiKey 5compatible USB identity for better Windows / Yubico tool compatibility - make the board usable as a compact USB security token with native support for its button, RGB LED and display power behavior
- provide working helper scripts for build, flash and Windows PIV / BitLocker import workflows
This is not an official Yubico product.
- Native
LilyGO T-Dongle S3board support ESP32-S3board selection viaPICO_FIDO_ESP_BOARD=tdongle-s3- Native button mapping for FIDO user presence on
GPIO 0 APA102RGB LED support using the T-Dongle S3 pins- Safe ST7735 display sleep handling so the display does not stay white and powered
- A stable
Yubikey5build profile for Windows smartcard tooling - Windows-focused PIV fixes for:
SELECT PIVGET METADATA- certificate reads
- Microsoft smartcard container mapping
CHUIDandCCCobject population
- Helper scripts for:
- full erase + flash
- PKCS#12 import into PIV
- generating a BitLocker-compatible self-signed PFX
Board: LilyGO T-Dongle S3
| Function | Pin |
|---|---|
| User button | GPIO 0 |
| APA102 data | GPIO 40 |
| APA102 clock | GPIO 39 |
| ST7735 MOSI | GPIO 3 |
| ST7735 SCK | GPIO 5 |
| ST7735 CS | GPIO 4 |
| ST7735 DC | GPIO 2 |
| ST7735 backlight | GPIO 38 |
- The boot button is used as the
FIDO user presencebutton. - The RGB LED is configured as an
APA102device. - The ST7735 display is put into
Sleep In (0x10)and its backlight is driven low during init to avoid a permanently lit white screen.
Implementation file: src/fido2/board_tdongle.c
src/fido2/board_tdongle.c- LilyGO T-Dongle S3 hardware support
tools/flash_clean_yk5.cmd- full chip erase + flash of the YubiKey-compatible build
tools/flash_clean_recovery.cmd- full chip erase + flash of the known-good recovery build
tools/import_piv_pkcs12.py- direct PKCS#12 import into the PIV applet
- writes certificate,
CHUID,CCC,MSCMAP, andMSROOTS
tools/new_bitlocker_pfx.ps1- generates a self-signed PFX with the BitLocker EKU
This fork is primarily documented for Windows + ESP-IDF + ESP32-S3.
ESP-IDF 5.5.x- Python available for
idf.pyandesptool - Git submodules initialized
$env:PATH='C:\Users\rapha\AppData\Local\Programs\Python\Python311;' + $env:PATH
. 'C:\Espressif\frameworks\esp-idf-v5.5.3\export.ps1'
python "$env:IDF_PATH\tools\idf.py" -B build-tdongle-yk5 -DPICO_FIDO_ESP_BOARD=tdongle-s3 -DVIDPID=Yubikey5 buildImportant build options:
-DPICO_FIDO_ESP_BOARD=tdongle-s3-DVIDPID=Yubikey5
Current supported ESP board values:
generictdongle-s3
Current supported VIDPID presets include:
Yubikey5YubikeyNeoNitroFIDO2GnukGnuPG
Both flash helper scripts always do a full erase first.
tools\flash_clean_yk5.cmd COM5tools\flash_clean_recovery.cmd COM5If the board is not detected:
- Hold the
BOOTbutton while plugging in the dongle. - Run the flash script again.
- Unplug / replug after flashing.
This fork includes a direct PIV import workflow for Windows.
python tools\import_piv_pkcs12.py -i C:\bitlocker.pfx -p DeinPasswort -s 9a --auth-mode off --reader "Yubico"The import script writes:
- private key into the PIV slot
- X.509 certificate object
CHUID(0x5FC102)CCC/ capability container (0x5FC107)- Microsoft smartcard mapping object (
0x5FFF10) - Microsoft roots object (
0x5FFF11)
python tools\import_piv_pkcs12.py --reader "Yubico" --connect-only
python tools\import_piv_pkcs12.py --reader "Yubico" --select-only
python tools\import_piv_pkcs12.py --reader "Yubico" -s 9a --read-metadata
python tools\import_piv_pkcs12.py --reader "Yubico" -s 9a --read-cert
certutil -scinfoFor a full Windows and BitLocker walkthrough, see:
This repository now supports a working Windows smartcard / PIV path for BitLocker certificate handling.
Important caveats:
- Smartcard certificate protectors are for
fixed data drivesandremovable data drives. - Native Windows
smartcard loginfor alocal standalone accountis not supported by this repository alone. - For
BitLocker, you need a certificate profile that matches the BitLocker EKU requirements.
Helper for generating a compatible test certificate:
powershell -ExecutionPolicy Bypass -File tools\new_bitlocker_pfx.ps1 -PfxPath C:\bitlocker-bitlocker-oid.pfx -Password DeinPasswortThis fork is focused on:
LilyGO T-Dongle S3ESP32-S3Windowssmartcard compatibilityPIVstability and helper tooling
It is not intended to be a polished generic multi-board distribution.
This repository is based on:
pico-fido2pico-openpgppico-keys-sdk
Please keep upstream attribution intact when redistributing the fork.
This repository currently keeps the upstream components as submodules:
pico-fidopico-openpgppico-keys-sdk
The .gitmodules file is configured with relative URLs:
../pico-fido.git../pico-openpgp.git../pico-keys-sdk.git
That means the cleanest GitHub layout is:
- top-level repo:
tdongle-yk - sibling repos in the same GitHub account or organization:
pico-fidopico-openpgppico-keys-sdk
If you want to publish this fork as a working project, push the modified submodule repositories first, then push the top-level repository.
Publishing notes:
This fork inherits the licensing model of the upstream project and its subcomponents.
Review the upstream license files before redistributing binaries, modified firmware, or downstream forks.
