Security
The security model.
What KeyTap protects, what crosses the network, and – just as important – what it does not protect against.
What stays true
- Key, PIN and presence are still required. The private key never leaves the YubiKey®; the PIN goes only to the YubiKey and is never stored; the tap is the presence.
- No server. KeyTap talks to one peer only: your own computer, directly over your network or your own VPN. There is no KeyTap service, no account, no cloud.
- No notifications. A push message travels through Apple’s servers and would reveal when and from where you decrypt, so KeyTap has none – keep the app open while you decrypt.
- The computer only listens while a decrypt waits for you, only on the address you chose, and each request expires after 120 seconds.
- Nothing is collected. No analytics, no crash reports, no third-party code. See the privacy policy.
What crosses the network
Only between your phone and your own computer, over TLS 1.3 with the computer’s certificate pinned on the phone:
- To the phone: the wrapped age stanza (the encrypted file key, which is useless without your YubiKey) and the request details shown on the screen – the command that asked, its working folder, the computer and user, a short display code, a one-time nonce and the expiry time.
- Back to the computer: the 16-byte file key, over the pinned TLS 1.3 connection, together with a signature from the phone’s Secure Enclave key that binds the answer to the exact request you saw and the nonce.
The PIN and the YubiKey’s private key never appear here: the PIN goes over NFC to the YubiKey only, and the key agreement happens inside it.
The file key is the 16-byte key of one file, not your identity. It is held in memory on the computer only for as long as age or sops needs it, and the bridge’s log records metadata only – never a file key.
With notifications switched on
Only if you opt in, one more hop exists: your computer sends our relay (push.keytap.me, open source) your iPhone’s push token, a random request id, the expiry and an AES-256-GCM ciphertext of the summary, sealed under a key that only your computer and your iPhone share (exchanged at pairing over the pinned connection; the request id is authenticated data, so a ciphertext cannot be moved to another request). The relay forwards it to Apple’s push service and stores nothing. Neither the relay nor Apple ever sees a file key, a stanza, the PIN or the request details. The relay cannot approve anything: approvals still go only from the phone to your computer, signed by the Secure Enclave key. If the relay is down or blocked, KeyTap works exactly as without notifications.
Who trusts whom
- The phone trusts only the certificate it pinned during pairing. It will not talk to another computer or to a look-alike at the same address.
- The computer trusts only the paired phone’s Secure Enclave key. That key is created on the phone and cannot be exported. It signs every answer over a hash of the exact request bytes shown to you, plus a one-time nonce, so an answer cannot be replayed or attached to content you never saw.
- Pairing uses a one-time code from the link the bridge prints, and registers the YubiKeys you tap.
What it does not protect against
Someone who controls your computer can start a decrypt request of their own. KeyTap cannot prevent that – and neither could a YubiKey plugged into that computer. That is why the phone shows the command and a short code before you approve: compare them with your terminal, and approve only what you started.
- If you approve a request you did not start, the file it unlocks is decrypted for whoever asked. The code and the command are there to stop that.
- An attacker who holds your unlocked phone, your YubiKey and your PIN can approve. This is the same as using the YubiKey directly.
- KeyTap does not hide that you decrypt from your own network. Use a VPN you trust if that matters.
- Files that have already been decrypted are as safe as the computer they are on.
What is stored where
- On the iPhone: the computer’s address, its certificate fingerprint, a pairing token and the handle of the Secure Enclave key – in the keychain, this device only: never in iCloud, never in a backup. Requests are held in memory only.
- On the computer: the bridge keeps its certificate, the list of paired devices and a metadata-only log in its state folder (
$KEYTAP_DIR, by default~/.secure/keytap).
Reporting a problem
If you find a security problem, write to support@keytap.me. See also security.txt. The source of the bridge is open at github.com/keytap-me/keytap.