Required:
- Rust and Cargo (install via rustup)
System Dependencies:
libudev-dev- Required for UHID device accesslibtss2-dev- TPM 2.0 TSS libraries (includes tss2-esys, tss2-tctildr, tss2-mu) fortpmfeature.
Ubuntu/Debian:
sudo apt install libudev-dev libtss2-devArch Linux:
sudo pacman -S systemd-libs tpm2-tss# Clone the repository
git clone https://github.com/arunanshub/passless.git
cd passless
# Standard debug build
cargo build
# Optimized release build
cargo build --release
# Run directly
cargo run
# Run with verbose logging
cargo run -- --verboseQuick steps to run a software TPM for local testing.
- Install the
swtpmpackage from your distribution
Ubuntu/Debian:
sudo apt install swtpmArch Linux:
sudo pacman -S swtpmCreate runtime directories and start the software TPM:
rm -rf /tmp/swtpm-state /tmp/tpm-store
mkdir -p /tmp/swtpm-state /tmp/tpm-store
# Start the software TPM and attach it to the char device:
swtpm socket \
--tpm2 \
--tpmstate dir=/tmp/swtpm-state \
--server type=tcp,port=2321 \
--ctrl type=tcp,port=2322 \
--flags not-need-init,startup-clear \
--log level=20In another terminal, run passless with the TPM backend:
cargo run -- --backend-type tpm --tpm-tcti "swtpm:host=localhost,port=2321" --tpm-path /tmp/tpm-store -vThe --tpm-tcti flag accepts various TCTI (TPM Command Transmission Interface) specifications:
device:/dev/tpm0- Hardware TPM character devicedevice:/dev/tpmrm0- TPM resource managerswtpm:host=localhost,port=2321- Software TPM over TCPswtpm:path=/path/to/socket- Software TPM over Unix sockettabrmd:- TPM2 Access Broker & Resource Manager
For more details, see docs/TPM_SETUP.md and docs/SWTPM_QUICK_START.md.