Open source · WireGuard® compatible
Your VPN key can't be copied.
Latchwire keeps your WireGuard private key inside a hardware security key such as a YubiKey. The key is generated on the device and never touches your disk or memory. No key plugged in, no tunnel.
Early preview — command-line core for macOS and Linux
How it works
Plug in your key
Latchwire generates the WireGuard key inside it, in a dedicated PIV slot. Your login slots are left untouched.
Add the public key to your server
Any standard WireGuard server works — OPNsense, pfSense, Linux, MikroTik and others. No plugins, no server changes.
Enter your PIN and connect
The PIN is asked once while the key is plugged in. Pull the key out and the tunnel closes within about two seconds.
Classic WireGuard vs Latchwire
| Question | Classic WireGuard | Latchwire |
|---|---|---|
| Where is the private key? | A file on your computer | Inside the hardware key |
| Can it be copied? | Yes, silently | No |
| Laptop stolen? | Rotate the key everywhere | No access without the key |
| Server side | Standard WireGuard | The same — standard WireGuard |
Hardware
Latchwire talks to the key through standard interfaces. Support is added one device family at a time.
YubiKey 5
Supported nowPIV, firmware 5.7 or later
OpenPGP cards
PlannedYubiKey, Nitrokey 3
PKCS#11 / HSM
PlannedDevices with X25519 support
TPM · Secure Enclave
RoadmapListed separately: here the key is only encrypted at rest, not uncopyable.
Security
What Latchwire does and does not protect against, stated plainly.
Protects against
- Copying the key from your disk or backups
- A stolen laptop when the key is not with it
- Config files that carry a private key — Latchwire rejects them
Does not protect against
- Malware on your computer: while the key is plugged in, it can use the tunnel.
Good to know
- The PIN is never stored.
- The default PIN is never tried.
- Every claim on this page is documented.
Install
Build from source
git clone https://github.com/Kodviva/latchwire
cd latchwire
go build -o latchwire ./cmd/latchwire
Requirements: Go 1.25+, a YubiKey 5 with firmware 5.7+; on Linux also pcscd and libpcsclite.
Desktop apps for macOS, Windows and Linux are in development.
Roadmap
CoreDone
Command-line client for macOS and Linux
Full network features
DNS, full tunnel, kill switch
Desktop app and translations
Desktop app for macOS, Windows and Linux
Signed releases
Homebrew, Microsoft Store, Linux packages