Security Architecture
Don't trust us, verify the code. Complete transparency into how Tether protects your dotfiles.
Security Philosophy
Your dotfiles contain sensitive information about your development environment. Tether is built on the principle that you own your data and should have complete control over it. We achieve this through:
- End-to-end encryption - Files encrypted locally before syncing
- Open source code - Every line of code is auditable
- Your infrastructure - Uses your Git repo, keys protected by passphrase
- Zero trust - Tether never sees your data or keys
Encryption Implementation
AES-256-GCM
Tether uses AES-256-GCM (Galois/Counter Mode), an industry-standard authenticated encryption algorithm that provides both confidentiality and integrity.
- Algorithm: AES-256-GCM (Advanced Encryption Standard)
- Key Size: 256 bits (32 bytes)
- Nonce Size: 96 bits (12 bytes), randomly generated per operation
- Authentication: Built-in tamper detection via authentication tag
Encryption Flow
- Dotfile changes detected (e.g.,
~/.zshrc) - Generate random 96-bit nonce for this operation
- Read file contents as plaintext
- Encrypt using AES-256-GCM with cached key + nonce
- Prepend nonce to ciphertext (needed for decryption)
- Save as
.zshrc.encin Git repo - Commit and push to remote Git repository
// Simplified encryption pseudocode
$ fn encrypt_file(path: &Path, key: &[u8; 32]) -> Result<()> {
// Generate fresh random nonce
$ let nonce = random_nonce(); // 96 bits
// Read plaintext
$ let plaintext = read_file(path)?;
// Encrypt with AES-256-GCM
$ let ciphertext = aes_gcm_encrypt(&plaintext, key, &nonce)?;
// Prepend nonce (needed for decryption)
$ let encrypted_data = [nonce, ciphertext].concat();
// Write to .enc file in Git repo
$ write_encrypted(path, &encrypted_data)?;
$ Ok(())
}
$ Key Management
Passphrase-Based Key Encryption
Encryption keys are protected using age encryption with your passphrase. The encrypted key syncs via Git, allowing cross-platform access from any machine.
First Machine (Key Generation)
- Run
tether init - Generate cryptographically random 256-bit key
- Prompt for passphrase (min 8 characters)
- Encrypt key with passphrase using
age - Store encrypted key in sync repo as
encryption.key.age - Cache decrypted key locally for session
Additional Machines (Key Retrieval)
- Clone sync repo (contains
encryption.key.age) - Run
tether unlock - Enter passphrase to decrypt key
- Key cached locally for future operations
- Decrypt dotfiles from Git using key
// Passphrase-based key management
$ fn unlock_with_passphrase(passphrase: &str) -> Result<Vec<u8>> {
// Read encrypted key from sync repo
$ let encrypted = fs::read("encryption.key.age")?;
// Decrypt using age with passphrase
$ let decryptor = age::Decryptor::new(&encrypted)?;
$ let key = decryptor.decrypt(passphrase)?;
// Cache locally for session
$ cache_key(&key)?;
$ Ok(key)
}
$ Cross-Platform Compatible
The passphrase-based approach works on any platform — macOS, Linux, or Windows. Your encrypted key travels with your sync repo, protected by your passphrase.
Secret Detection
Preventing Credential Leaks
Before syncing dotfiles, Tether scans for accidentally committed secrets using pattern matching. If detected, it warns you and shows redacted versions of the secrets found.
Detected Secret Types
- • AWS Access Keys (
AKIA...) - • GitHub Personal Access Tokens (
ghp_...,gho_...) - • Generic API keys (patterns like
API_KEY=...) - • SSH/RSA private keys (
-----BEGIN ... PRIVATE KEY-----) - • Passwords in configs (
password=...) - • Database URLs with credentials
- • Bearer tokens
- • High-entropy strings (potential secrets)
AWS_ACCESS_KEY_ID="AKIA****************ABCD"AWS_SECRET_ACCESS_KEY="************************************"GITHUB_TOKEN="ghp_****************************"Privacy Model
You Own
- • Your Git repository (GitHub/GitLab/self-hosted)
- • Your passphrase (never stored)
- • Your encryption keys
- • Your dotfiles (plaintext local, encrypted remote)
What's Private
- • Dotfile contents (encrypted in Git)
- • Encryption keys (passphrase-protected)
- • No telemetry or tracking
- • No external services used
Zero Knowledge Architecture
Tether operates on a zero-knowledge principle. The application itself never transmits your data to any servers we control. Everything stays between your devices and your Git repository. We literally cannot access your data even if we wanted to.
Threat Model
✓ What Tether Protects Against
- • Unauthorized access to your Git repository (encrypted data)
- • Man-in-the-middle attacks during Git sync
- • Accidental credential exposure (secret detection)
- • Data tampering (authenticated encryption)
⚠ What Tether Doesn't Protect Against
- • Compromised local machine (dotfiles are plaintext locally)
- • Weak passphrase (brute-force attack on encrypted key)
- • Malicious Git server (could serve wrong encrypted data)
- • Physical access to unlocked Mac
Security Best Practices
1. Use a Private Git Repository
Always use a private repository. Even though dotfiles are encrypted, there's no reason to make the encrypted data publicly accessible.
2. Enable 2FA on GitHub/GitLab
Protect your Git repository with two-factor authentication to prevent unauthorized access.
3. Use a Strong Passphrase
Choose a strong, unique passphrase for your encryption key. This protects your dotfiles even if your Git repository is compromised.
4. Review Secret Warnings
When Tether detects potential secrets, review them carefully. Consider using environment variables or a dedicated secrets manager for sensitive credentials.
5. Enable FileVault
Enable full-disk encryption on your Mac. This protects your local plaintext dotfiles if your device is stolen.
Verify the Code
Don't Trust, Verify
Tether is fully open source. You can (and should!) review the security-critical code yourself:
Repository will be open sourced soon
Security Vulnerability Reporting
If you discover a security vulnerability in Tether CLI, please report it responsibly:
- DO NOT open a public GitHub issue
- Email security concerns to:
security@tether-cli.com - Provide details: affected versions, reproduction steps, potential impact
- Allow reasonable time for a fix before public disclosure
We take security seriously and will respond to legitimate reports within 48 hours.
Security through transparency
Every line of Tether's security code is open for review. Because your dotfiles deserve the best protection.