Algorithms
| Purpose | Algorithm | Key size | Notes |
|---|
| Vault encryption | AES-256-GCM | 256-bit | Client-side, Web Crypto API |
| Key derivation | Argon2id | 256-bit output | 64 MiB memory, 3 iterations |
| Key wrapping | AES-KW | 256-bit | For family vault key distribution |
| Asymmetric encryption | RSA-OAEP | 2048-bit | SHA-256 hash, for sharing |
| TOTP generation | HMAC-SHA1 | 160-bit | RFC 6238 compliant |
| Transport | TLS 1.3 | Various | All API communication |
| Password hashing | bcrypt | 184-bit | Supabase Auth (account passwords) |
AES-256-GCM parameters
{
"algorithm": "AES-GCM",
"keyLength": 256,
"ivLength": 96,
"tagLength": 128,
"implementation": "Web Crypto API (crypto.subtle)"
}
- IV: 12 bytes (96 bits), randomly generated per encryption
- Authentication tag: 16 bytes (128 bits), appended to ciphertext
- Associated data: none (no AAD used)
Argon2id parameters
{
"algorithm": "argon2id",
"memory": 65536,
"iterations": 3,
"parallelism": 4,
"hashLength": 32,
"salt": "per-user, 16 bytes random"
}
Fallback parameters (low-memory devices):
{
"memory": 32768,
"iterations": 4,
"parallelism": 4
}
Implementation
All cryptographic operations use the Web Crypto API (crypto.subtle) in the browser:
crypto.subtle.importKey() — import derived key material
crypto.subtle.encrypt() / crypto.subtle.decrypt() — AES-256-GCM operations
crypto.subtle.wrapKey() / crypto.subtle.unwrapKey() — AES-KW key wrapping
crypto.subtle.generateKey() — RSA keypair generation
crypto.getRandomValues() — cryptographically secure random number generation
The Web Crypto API provides hardware-accelerated cryptographic operations and is available in all modern browsers. No third-party cryptographic libraries are used for core vault operations.
Key storage
| Key | Storage location | Protection |
|---|
| Master password | Never stored | User memory only |
| Vault key | JavaScript memory (React state) | Wiped on lock/logout |
| Salt | vault_salts database table | Not secret (public) |
| RSA private key | vault_keys database table | Encrypted with vault key |
| RSA public key | vault_keys database table | Plaintext (public key) |
| Server encryption key | Environment variable | Server-side only |