Salt escrow (Plan B)
Last updated: 28 Jun 2026
Premium Plan B—not required for local-only vaults.
Who this is for
Premium users enabling cloud sync who want new devices to fetch KDF salt and public Key DID material from NT² without manually transferring salt—while still entering the master password locally for every unlock.
What you need
| Tier | NT² Premium when re-registering existing cloud rows in production |
| Vault state | Unlocked to upload salt on first sync enable |
| Network | Online for register/bootstrap fetch |
| Feature toggle | Cloud sync registration (automatic on enable) |
Steps
Plan A vs Plan B
| Plan A (default local) | Plan B (salt escrow) | |
|---|---|---|
| Salt storage | Per-vault vault_meta.saltHex in local SQLite | Same salt copied to D1 on cloud register |
| New device unlock | .nt2backup or manual salt transfer | GET /api/vault/bootstrap?keyDid= + master password |
| Master password on server | Never | Never |
Most users start on Plan A; first sync enable migrates to Plan B without generating a new salt.
Upload salt (first sync enable)
- Open Settings → Vault & sync → Cloud sync and choose Enable cloud sync.
- After Key DID authentication,
registerUsersends your existingvault_meta.saltHex, password verifier (when present), and public Key DID fields. - NT² rejects a conflicting salt for the same Key DID (409)—one canonical salt per vault.
Fetch salt on a new device
- On a cold device, start vault setup or replica handoff (setup QR / recovery kit flow).
- Client calls
GET /api/vault/bootstrap?keyDid=(public, no session) for salt, verifier, and public signing keys. - Enter your master password; PBKDF2 (100k iterations, SHA-256) runs in the browser to derive the vault key.
- Wrong password fails via verifier—same as local-only unlock.
Session salt fetch
- Authenticated devices may use
GET /api/salt?keyDid=with a sync session token matching the Key DID. - Response includes salt and optional verifier ciphertext—still no master password transit.
Tips and common mistakes
- Salt is not secret—it slows offline guessing; security comes from your master password strength.
- Plan B does not escrow private signing keys in current client builds—threshold unlock still uses local Shamir material after bootstrap.
- Local-only vaults never need Plan B; recovery kit + backup remain sufficient.
- Disabling sync does not delete the D1 row; salt may remain for future re-enable unless account data is removed through support.