Skip to content

Instantly share code, notes, and snippets.

@openoms
Last active September 13, 2025 12:43
Show Gist options
  • Select an option

  • Save openoms/510b2876cab19e15c4190456ea8aad82 to your computer and use it in GitHub Desktop.

Select an option

Save openoms/510b2876cab19e15c4190456ea8aad82 to your computer and use it in GitHub Desktop.
Smartcard applets for Bitcoin and PGP on Debian Linux
# cards tested (same used for the SpecterDIY):
# https://www.alibaba.com/product-detail/JCOP-Dual-Interface-Support-RSA4096-ECC_1600070838098.html (no NFC)
# find more links to compatible products at:
# https://github.com/Toporin/SatochipApplet#supported-hardware and
# https://github.com/cryptoadvance/specter-javacard#cards-that-make-sense
# Install the drivers and apps as for the SpecterDIY.
# The Satochip applet can be used parallel on the same card and will have a separate PIN.
# Download the applet from:
# https://github.com/Toporin/SatochipApplet/releases
# https://github.com/cryptoadvance/specter-javacard#tools
git clone https://github.com/cryptoadvance/specter-javacard.git
cd specter-javacard
git submodule update --init --recursive
alias gp="java -jar $PWD/gp.jar"
# list existing applets on the card
gp -l
# delete existing Satochip applet (this removes the PIN and seed set for this applet)
# gp --delete 5361746F43686970
# install the Satochip applet
gp --install ./SatoChip-0.12-05.cap
# Initialize and use with Sparrow Wallet v1.8+
# cards tested (same used for the SpecterDIY):
# https://www.alibaba.com/product-detail/JCOP-Dual-Interface-Support-RSA4096-ECC_1600070838098.html (no NFC)
# find more links to compatible products at:
# https://github.com/Toporin/SatochipApplet#supported-hardware and
# https://github.com/cryptoadvance/specter-javacard#cards-that-make-sense
# Install the drivers and apps as for the SpecterDIY.
# The Satochip applet can be used parallel on the same card and will have a separate PIN.
# Download the applet from:
# https://github.com/Toporin/Seedkeeper-Applet/releases
# https://github.com/cryptoadvance/specter-javacard#tools
git clone https://github.com/cryptoadvance/specter-javacard.git
cd specter-javacard
git submodule update --init --recursive
alias gp="java -jar $PWD/gp.jar"
# list existing applets on the card
gp -l
# delete existing Seedkeeper applet (this removes the PIN and secrets set for this applet)
# gp --delete 536565644B6565706572
# install the Satochip applet
gp --install ./SeedKeeper-0.1-0.1.cap
# Initialize with the https://github.com/Toporin/Seedkeeper-Tool or this alpha SeedSigner image: https://github.com/3rdIteration/seedsigner/releases
# download applet from https://github.com/github-af/SmartPGP/releases
wget https://github.com/github-af/SmartPGP/releases/download/v1.22.2-3.0.4/SmartPGP-v1.22.2-jc304-rsa_up_to_4096.cap
# install applet on a card
java -jar gp.jar --install ./SmartPGP-v1.22.2-jc304-rsa_up_to_4096.cap
# check if functional
gpg --card-status
Reader ...........: ACS ACR39U ICC Reader 00 00
Application ID ...: D276000124010304AFAF000000000000
Application type .: OpenPGP
Version ..........: 3.4
Manufacturer .....: unknown
Serial number ....: 00000000
Name of cardholder: [not set]
Language prefs ...: en
Salutation .......:
URL of public key : [not set]
Login data .......: [not set]
Signature PIN ....: forced
Key attributes ...: rsa2048 rsa2048 rsa2048
Max. PIN lengths .: 127 127 127
PIN retry counter : 3 0 3
Signature counter : 0
KDF setting ......: off
Signature key ....: [none]
Encryption key....: [none]
Authentication key: [none]
General key info..: [none]
# Load an existing PGP private key to the card
gpg --edit-key <YOUR_GPG_PUBKEY>
gpg> keytocard
y
1 <will need your PGP key passphrase> <the default Admin PIN of the Applet is: 12345678>
gpg> save
gpg> quit
# check if the key is now on the card
gpg --card-status
# configure git to use it for signing
git config --global user.signingkey <YOUR_GPG_PUBKEY>
git config --global commit.gpgsign true
git config --global gpg.program gpg
# test
echo 1234 | gpg --clearsign
# the default PIN is: 123456 as in https://github.com/github-af/SmartPGP/tree/v1.22.2-3.0.4?tab=readme-ov-file#default-values
# To change the PIN codes you can use the Kleopatra - Certificate Manager and Unified Crypto GUI
# INSTRUCTIONS FOR DEBIAN BUSTER DESKTOP
# Smartcard reader examples
# Dell SK-3205 (£10-20 used or new on eBay and Amazon)
# $ lsusb
# Bus 001 Device 015: ID 413c:2101 Dell Computer Corp. SK-3205 SmartCard Reader Keyboard
# ACR122U USB NFC reader https://www.aliexpress.com/w/wholesale-acr122u.html
# ACS ACR39U-N1 PocketMate II USB Smart Card Reader
# https://www.amazon.co.uk/dp/B0758TS5JR/
# https://www.aliexpress.com/item/1005009102088769.html
# extension adapter for the usb C card reader: https://www.aliexpress.com/item/1005008714457233.html
# $ lsusb
# Bus 001 Device 014: ID 072f:b100 Advanced Card Systems, Ltd ACR39U
# Smartcards
# https://www.alibaba.com/product-detail/JCOP-Dual-Interface-Support-RSA4096-ECC_1600070838098.html
# INSTALL DRIVERS
# deprecated method
# https://askubuntu.com/questions/571828/how-to-use-dell-smart-card-keyboard-rt7d60-in-ubuntu#571829
# echo "# for smartcard
# deb http://ftp.de.debian.org/debian jessie main" | sudo tee -a /etc/apt/sources.list
# import key
# sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7638D0442B90D010
# sudo apt update
# sudo apt-get install libacr38u libacr38ucontrol0 libacr38ucontrol-dev
# Couldn't check the signatures any more so will likely need a driver from a .zip from:
# https://www.acs.com.hk/en/drivers/
# See the packages for the other supported readers:
# https://wiki.debian.org/Smartcards
# Download:
# https://www.acs.com.hk/download-driver-unified/11929/ACS-Unified-PKG-Lnx-118-P.zip
# unzip
unzip ACS-Unified-PKG-Lnx-118-P.zip
# install
sudo dpkg -i ACS-Unified-PKG-Lnx-118-P/debian/buster/libacsccid1_1.1.8-1~bpo10+1_amd64.deb
sudo systemctl restart pcscd.service
# INSTALL JAVACARD
# https://github.com/cryptoadvance/specter-javacard#linux
# https://adoptopenjdk.net/installation.html?variant=openjdk8&jvmVariant=hotspot#linux-pkg
sudo apt-get install wget apt-transport-https gnupg
wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -
echo "deb https://adoptopenjdk.jfrog.io/adoptopenjdk/deb buster main" | sudo tee /etc/apt/sources.list.d/adoptopenjdk.list
sudo apt-get update
sudo apt install adoptopenjdk-8-hotspot
sudo apt install ant
sudo apt install pcscd
# https://github.com/cryptoadvance/specter-javacard#tools
git clone https://github.com/cryptoadvance/specter-javacard.git
cd specter-javacard
git submodule update --init --recursive
alias gp="java -jar $PWD/gp.jar"
# https://github.com/cryptoadvance/specter-javacard#how-to-build
ant MemoryCard
# list existing applets on the card
gp -l
# delete existing applet
# gp --delete B00B5111CB
# install only the MemoryCard applet
gp --install build/cap/MemoryCardApplet.cap
# Telegram discussion: https://t.me/c/1414047573/2823
# Seedsigner feature request: https://github.com/SeedSigner/seedsigner/issues/231
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment