Status: Secure Backup has not yet had an independent security audit. The design uses only standard, widely reviewed primitives, and the code is open for anyone to inspect.
Threat model
Secure Backup assumes that any storage outside your computer may be read or tampered with: Google Drive, a stolen USB disk, or someone with access to your account. Encrypted snapshots must stay confidential there, and any modification must be detected before data is restored.
It does not protect against malware or an attacker with administrator access on the computer while you use it, or against a lost passphrase.
Cryptography
| Purpose | Algorithm | Parameters |
|---|---|---|
| Passphrase → key | Argon2id (v1.3) | 19 MiB memory, 2 passes, 1 lane, 16-byte random salt, 256-bit output |
| File encryption | AES-256-GCM, STREAM construction | 1 MiB chunks, 7-byte random nonce prefix + 32-bit counter + last-chunk flag |
| Per-file subkey | SHA-256 | SHA-256("SECBKP02 file key" ‖ master key ‖ 16-byte file salt) |
| Manifest encryption | AES-256-GCM | Fresh salt and 96-bit random nonce |
| Integrity | SHA-256 | Computed while each file is written; checked on every restore |
| Randomness | OS CSPRNG | OsRng in Rust, crypto.getRandomValues for generated passphrases |
File format (SECBKP02)
[ "SECBKP02" (8) | Argon2 salt (16) | file salt (16) | nonce prefix (7) | chunk size (4) ]
[ chunk 1: ciphertext + 16-byte tag ][ chunk 2 ] … [ final chunk, flagged as last ]
- The whole header is authenticated with every chunk, so it can’t be altered.
- Reordering, dropping, duplicating or truncating chunks makes decryption fail.
- Each file has its own subkey, so random nonce prefixes can never collide across files that share a snapshot key.
- Encrypted manifests use the single-shot
SECBKP01format, which older file payloads also used. Both remain readable.
Restore protections
- Verify before write: plaintext goes to a temporary file and is moved into place only after every chunk authenticates and the SHA-256 matches the manifest.
- Downgrade protection: if a snapshot is known to be encrypted (from the catalog, its ID format, or because you supplied a passphrase), a plaintext “unencrypted” manifest is refused.
- Substitution protection: a manifest must name the snapshot it is found in.
- Path safety: absolute paths,
.., drive letters, UNC paths and symlinked destinations are rejected; snapshot IDs are validated before touching the disk. - No surprise overwrites: the default policy keeps existing files; overwriting needs explicit confirmation.
What the cloud sees
| Item | Encrypted snapshot | Unencrypted snapshot |
|---|---|---|
| File contents | Hidden | Readable |
| File and folder names | Hidden (random <uuid>.enc names) | Hidden in file names, readable in the manifest |
| Manifest (paths, hashes) | Encrypted | Readable |
| Number and sizes of files, upload times | Visible | Visible |
Unencrypted snapshots are never uploaded automatically.
Google account access
- Sign-in uses Google’s OAuth 2.0 flow with PKCE and a one-time loopback address on a random local port; the app never sees your Google password.
- Scopes:
drive.file(only files the app creates),openidandemail. - Access and refresh tokens are stored in the local catalog database, readable only by your user account on Linux and macOS. Moving them to the OS keychain is planned (#29).
App hardening
- A strict Content Security Policy in the app window; the Tauri API is not exposed as a global object.
- App folders and files are created with owner-only permissions (
700/600) on Linux and macOS. - Every change runs
cargo test(114 tests, including tamper, truncation and traversal cases),clippyand a type-checked frontend build in CI.
Limitations
- No independent audit yet.
- File sizes and counts are visible to the storage provider.
- Unencrypted snapshots offer no confidentiality and only limited tamper detection.
- No incremental or deduplicated snapshots yet: each snapshot is a full copy.
Reporting a vulnerability
Please report security issues privately through GitHub Security Advisories rather than a public issue. See SECURITY.md.