TOTP-AES-256-GCM Encrypted Handshake

Your secrets, your phone, your rules.

iPhone Keychain + Face ID + TOTP-encrypted transfer + human approval. Your passwords live only on your phone; servers keep them in memory only and forget them on restart.

Data flow

How it works

0

vault-client starts

Runs under PM2 and enters the "waiting for seed" state. Unix socket ready.

1

Inject the TOTP seed manually

POST /seed — the seed lives only in memory, never on disk. It connects to the proxy and requests passwords automatically.

2

vault-proxy relays

A public VPS relay that writes audit logs and wakes the iPhone via APNs. Zero plaintext, zero seeds.

3

iPhone approval + TOTP encryption

Face ID unlocks the Keychain → reads the password → encrypts with an AES-256-GCM key derived from TOTP → only ciphertext leaves the device.

4

vault-client decrypts into memory

Derives the same AES key from TOTP to decrypt → stores in an in-memory Map → serves it over a Unix socket. Restart = everything wiped.

Protocol architecture

Three components, zero trust

dns 01 / SERVERS

vault-client

Runs on each application server. Passwords stay in memory only, the TOTP seed never touches disk, local API over a Unix socket.

DISK: ZERO_SENSITIVE | MEM: SECRETS + SEED
security 02 / VPS_RELAY
Relay only

vault-proxy

Public WSS relay. No passwords, no seeds, forwards ciphertext only. Audit logs + APNs push.

PLAINTEXT: NEVER | SEED: NEVER
smartphone 03 / IPHONE

vault-approve

Standalone iPhone app. Passwords stored in the iOS Keychain behind Face ID, and they leave the device only after TOTP encryption.

STORAGE: SECURE_ENCLAVE | AUTH: FACE_ID

Hardened by design

Every layer assumes the others have already been breached.

face

Face ID + iOS Keychain

Hardware encryption via the Apple Secure Enclave. Reading a password requires Face ID; no other process can access it.

key_visualizer

Rolling TOTP encryption

The AES key rotates every 30 seconds. Captured ciphertext is useless: once the window expires it can't be decrypted, so replay attacks fail.

memory

Memory-only servers

Neither passwords nor TOTP seeds are written to disk. With zero secrets on disk, an attacker who reads the disk gets nothing.

touch_app

Human approval required

Every password request is pushed to the iPhone. No approval = no ciphertext. Automated scripts can't bypass it.

encrypted

Zero-knowledge proxy

The VPS relay only ever sees ciphertext. Even if it's compromised, no password or seed can be recovered.

emergency_home

Emergency lockdown

One-tap lockdown on the iPhone: pushes a revoke to every agent and instantly wipes all passwords from server memory.

Security analysis

Threat Matrix

Attack scenario Attacker gets Result
Application server compromised agent-token (the only thing on disk) Secure
WSS man-in-the-middle Encrypted traffic Secure
VPS compromised Audit logs + relay access Secure
Server + VPS both compromised token + relay (no seed on disk) Secure
iPhone compromised iOS Keychain (Face ID protected) Hard
Everything compromised All components GG
shield_locked
Encryption standard
AES-256

GCM mode

Key rotation
30 sec

TOTP window

Authentication
Two-factor

Token + human

Passwords on disk
Zero

Memory only

Ready to lock down your infrastructure?

Free and open source. Self-hosted, so you stay in control of your servers.

code GitHub repo