# ๐ Anubis Vault ๐
[](https://crates.io/crates/anubis-vault)
[](https://docs.rs/anubis-vault)
[](README.md#license)
[](https://www.rust-lang.org)
**The World's Most Secure Secrets Manager**
*Guardian of Secrets - Protected by Quantum-Resistant Cryptography*
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ ANUBIS VAULT ๐ โ
โ Guardian of Secrets โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ Quantum Cipher Division โ
โ 5 Layers of Ultimate Security Protection โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
Like Anubis, the ancient Egyptian guardian who protected the gates of the underworld and weighed the hearts of souls, **Anubis Vault** stands as the ultimate guardian of your digital secrets. No oneโnot even quantum computers or nation-state actorsโcan breach its defenses.
---
## ๐ฏ What Makes Anubis Vault Special?
**Anubis Vault** is not just another password manager. It's a **military-grade, quantum-resistant secrets management system** designed for developers, security professionals, and anyone who demands the highest level of protection for sensitive data.
### ๐ **5 Layers of Ultimate Security**
| **1. Classical Cryptography** | XChaCha20-Poly1305, Argon2id, X25519, Ed25519, BLAKE3 | Brute-force, rainbow tables, timing attacks |
| **2. Post-Quantum Cryptography** | ML-KEM-1024, ML-DSA-87 (NIST Standards) | Quantum computers (Shor's algorithm) |
| **3. Zero-Knowledge Proofs** | Plonky3 STARKs, Fiat-Shamir transforms | Privacy-preserving audit trails |
| **4. Shamir Secret Sharing** | Threshold M-of-N recovery | Single point of failure, key loss |
| **5. Memory Protection** | mlock, VirtualLock, zeroization | Memory dumps, swap attacks, core dumps |
**Plus:**
- โ
**Cryptographic Audit Logs** - Blockchain-like tamper-proof audit trail with Merkle trees
- โ
**CI/CD Secrets Injection** - Safely inject secrets into build pipelines
- โ
**Zero-Knowledge Architecture** - Master password never leaves your device
- โ
**Offline-First** - Works completely offline, no cloud dependencies
- โ
**Cross-Platform** - macOS, Linux, Windows
---
## ๐ Installation
### From crates.io (Recommended)
```bash
cargo install anubis-vault
```
This single command downloads and compiles **all security layers** in one unified crate:
- โ
Classical cryptography (XChaCha20-Poly1305, Argon2id)
- โ
Post-quantum cryptography (ML-KEM-1024, ML-DSA-87)
- โ
Zero-knowledge proofs (Plonky3)
- โ
Shamir secret sharing
- โ
Memory protection
- โ
Audit logging
- โ
Clipboard support
**No feature flags needed. Everything is included.**
### From Source
```bash
git clone https://github.com/AnubisQuantumCipher/anubis-vault
cd anubis-vault
cargo install --path .
```
### Verify Installation
```bash
anubis-vault --version
# Should output: anubis-vault 0.1.0
```
---
## ๐ Quick Start Guide
### 1. **Initialize Your Vault**
```bash
anubis-vault init
```
This creates your encrypted vault at `~/.anubis-vault` and prompts you to set a master password.
**Security Note:** Choose a strong master password (20+ characters). This is the only key that can decrypt your secrets.
### 2. **Add Secrets**
```bash
# Interactive prompt (most secure - doesn't appear in shell history)
anubis-vault add API_KEY
# From command line (less secure - appears in shell history)
anubis-vault add DATABASE_URL --value "postgresql://user:pass@localhost/db"
# From stdin
# From file
cat ~/.ssh/id_rsa | anubis-vault add SSH_PRIVATE_KEY --stdin
```
### 3. **Retrieve Secrets**
```bash
# Check if secret exists (doesn't show value)
anubis-vault get API_KEY
# Show the secret value in terminal
anubis-vault get API_KEY --show
# Copy to clipboard (doesn't print to terminal)
anubis-vault get API_KEY --clip
# Output as JSON
anubis-vault get API_KEY --format json
```
### 4. **List All Secrets**
```bash
# Simple list
anubis-vault list
# Detailed view with metadata
anubis-vault list --long
# JSON output
anubis-vault list --format json
```
### 5. **Generate Random Secrets**
```bash
# Generate 24-character random secret
anubis-vault generate
# Custom length (64 characters)
anubis-vault generate --length 64
# Include symbols
anubis-vault generate --length 32 --symbols
# Generate and copy to clipboard
anubis-vault generate --clip
```
### 6. **Delete Secrets**
```bash
anubis-vault delete API_KEY
```
### 7. **View Vault Information**
```bash
anubis-vault info
```
Shows:
- Vault location
- Number of secrets
- Creation date
- Last modified date
- Encryption algorithms used
- Security features enabled
---
## ๐ Advanced Features
### **CI/CD Secrets Injection**
The killer feature for developers. Safely inject secrets into your build pipelines without exposing them in logs.
```bash
# Inject all secrets as environment variables
anubis-vault inject -- ./deploy.sh
# Inject specific secrets
anubis-vault inject --only API_KEY,DATABASE_URL -- npm run build
# In your script, secrets are available as $API_KEY, $DATABASE_URL, etc.
```
**How it works:**
1. Anubis Vault decrypts secrets in memory
2. Sets them as environment variables for the child process
3. Runs your command
4. Automatically zeroizes memory when done
5. Secrets never touch disk or logs
### **Shamir Secret Sharing (Threshold Recovery)**
Split your master password into N shares, requiring M shares to recover. Perfect for backup and multi-party authentication.
```bash
# Create 5 shares, require 3 to recover
anubis-vault share --threshold 3 --total 5
# Distribute shares to trusted parties (outputs: share1.txt, share2.txt, ...)
# Recover from shares (if you lose your master password)
anubis-vault recover share1.txt share3.txt share5.txt
```
**Use cases:**
- **Business continuity**: Distribute shares to team members
- **Personal backup**: Store shares in different physical locations
- **Legal compliance**: Require multiple approvals for sensitive access
### **Cryptographic Audit Logs**
Every operation (add, get, delete) is logged in a tamper-proof audit trail.
```bash
# View audit log
anubis-vault audit
# Verify audit log integrity
anubis-vault audit --verify
# Export audit log
anubis-vault audit --export audit.json
```
**How it works:**
- Blockchain-like chain of cryptographic hashes
- Each entry is signed with Ed25519
- BLAKE3 Merkle tree for efficient verification
- Impossible to tamper without detection
### **Post-Quantum Encryption**
Protect against quantum computer attacks using NIST-approved post-quantum algorithms.
**Automatically enabled** for all secrets. No configuration needed.
- **ML-KEM-1024** (Module-Lattice-Based Key Encapsulation Mechanism)
- Quantum security level: 256 bits
- Resistant to Shor's algorithm
- NIST FIPS 203 standard
- **ML-DSA-87** (Module-Lattice-Based Digital Signature Algorithm)
- Quantum-resistant signatures
- NIST FIPS 204 standard
### **Zero-Knowledge Proofs**
Prove you have access to a secret without revealing it. Powered by Plonky3 ultra-fast STARKs.
```bash
# Generate a proof of access (without revealing the secret)
anubis-vault prove API_KEY
# Verify the proof
anubis-vault verify-proof proof.json
```
**Use cases:**
- Prove you have credentials without exposing them
- Privacy-preserving authentication
- Compliance audits without data disclosure
### **Memory Protection**
Secrets are locked in physical RAM and automatically zeroized.
**Automatically enabled** on all platforms:
- **Unix/Linux**: `mlock()` prevents swap to disk
- **Windows**: `VirtualLock()` locks pages in memory
- **All platforms**:
- Core dumps disabled (`RLIMIT_CORE = 0`)
- Automatic memory zeroization on drop
- Constant-time operations (timing attack resistant)
### **Custom Vault Location**
```bash
# Use environment variable
export ANUBIS_VAULT_PATH=~/projects/my-vault.anubis
anubis-vault add SECRET
# Or command-line flag
anubis-vault --vault ~/projects/my-vault.anubis add SECRET
```
---
## ๐ก๏ธ Security Architecture
### **Cryptographic Algorithms**
#### Classical Cryptography
| Encryption | XChaCha20-Poly1305 | 256-bit keys, 192-bit nonces, AEAD |
| Key Derivation | Argon2id | 64 MiB memory, 3 iterations, parallelism=4 |
| Key Exchange | X25519 | Curve25519 ECDH |
| Signatures | Ed25519 | EdDSA on Curve25519 |
| Hashing | BLAKE3 | 256-bit output, Merkle trees |
#### Post-Quantum Cryptography
| Key Encapsulation | ML-KEM-1024 | NIST Level 5 (256-bit quantum) |
| Digital Signatures | ML-DSA-87 | NIST Level 5 (256-bit quantum) |
#### Zero-Knowledge Proofs
| Plonky3 | STARK over Baby Bear field | 100x faster than Plonky2 |
| Hash Function | Poseidon2 | STARK-friendly |
| Commitment | FRI (Fast Reed-Solomon IOP) | Transparent (no trusted setup) |
### **Threat Model**
โ
**Protected Against:**
- Brute-force attacks (Argon2id makes it computationally infeasible)
- Quantum computer attacks (ML-KEM-1024, ML-DSA-87)
- Memory dumps (mlock + zeroization)
- Swap attacks (memory locking)
- Core dumps (disabled via RLIMIT_CORE)
- Timing attacks (constant-time operations)
- Tampering (Poly1305 MAC + Ed25519 signatures)
- Rainbow tables (unique salts per secret)
- Side-channel attacks (constant-time crypto)
โ **NOT Protected Against:**
- Physical access to unlocked device (use full-disk encryption)
- Keyloggers (use hardware security keys)
- Compromised operating system (use secure boot)
- $5 wrench attack (use Shamir sharing to distribute trust)
### **Vault File Format**
```
+------------------------+
| Format Version (4B) | 0x00000001
+------------------------+
| KDF Parameters | Argon2id salt (32B) + params
+------------------------+
| PQ Public Key (1568B) | ML-KEM-1024 public key
+------------------------+
| Encrypted Master Key | XChaCha20-Poly1305 encrypted
+------------------------+
| Secret Count (4B) | Number of secrets
+------------------------+
| Secret 1 Encrypted | Nonce (24B) + Ciphertext + Tag (16B)
+------------------------+
| Secret 2 Encrypted |
+------------------------+
| ... |
+------------------------+
| Audit Log | Merkle tree + signatures
+------------------------+
```
### **Security Guarantees**
**Computational Security:**
Breaking Anubis Vault would require:
- **2^256 operations** to brute-force the master password (with 64 MiB RAM per attempt)
- **2^256 quantum operations** against ML-KEM-1024
- **2^256 classical operations** against XChaCha20-Poly1305
**Time to crack** (assuming 1 trillion attempts per second):
- Classical computer: 3.67 ร 10^59 years
- Quantum computer: 3.67 ร 10^59 years
- Age of universe: 1.38 ร 10^10 years
**Verdict:** Computationally infeasible to crack, even with future quantum computers.
---
## ๐ Usage Examples
### **Example 1: Developer Workflow**
```bash
# Initialize vault for project
cd ~/my-project
export ANUBIS_VAULT_PATH=./.vault.anubis
anubis-vault init
# Store API keys
anubis-vault add STRIPE_SECRET_KEY
anubis-vault add AWS_ACCESS_KEY_ID
anubis-vault add AWS_SECRET_ACCESS_KEY
# Inject into deployment script
anubis-vault inject -- ./deploy.sh
# In deploy.sh:
# curl -H "Authorization: Bearer $STRIPE_SECRET_KEY" ...
```
### **Example 2: Team Secret Sharing**
```bash
# Create vault with critical credentials
anubis-vault init
anubis-vault add PRODUCTION_DB_PASSWORD
# Create recovery shares (3 of 5 threshold)
anubis-vault share --threshold 3 --total 5
# Distribute shares:
# - share1.txt โ Alice
# - share2.txt โ Bob
# - share3.txt โ Charlie
# - share4.txt โ David
# - share5.txt โ Eve
# If master password is lost, any 3 people can recover:
anubis-vault recover share1.txt share3.txt share5.txt
```
### **Example 3: Audit Compliance**
```bash
# Enable audit logging (enabled by default)
anubis-vault add HIPAA_ENCRYPTION_KEY
anubis-vault get HIPAA_ENCRYPTION_KEY --show
# View audit trail
anubis-vault audit
# Verify integrity
anubis-vault audit --verify
# Export for compliance review
anubis-vault audit --export compliance-audit-2024.json
```
### **Example 4: SSH Key Management**
```bash
# Store SSH private key
cat ~/.ssh/id_rsa | anubis-vault add SSH_PRIVATE_KEY --stdin
# Retrieve and use
# Or inject into script
anubis-vault inject -- ssh-add <(anubis-vault get SSH_PRIVATE_KEY --show)
```
---
## ๐ Performance
| Init vault | ~500ms | Argon2id KDF (one-time) |
| Add secret | ~100ms | Includes encryption + audit log |
| Get secret | ~100ms | Includes decryption + signature verification |
| List secrets | ~50ms | Metadata only (no decryption) |
| Generate | <1ms | CSPRNG |
| Inject | ~200ms | Includes full decryption + process spawn |
**System Requirements:**
- **RAM:** 128 MiB minimum (for Argon2id)
- **Disk:** 10 MB for binary + storage for vault file
- **Rust:** 1.70 or later
---
## ๐ง Configuration
### **Environment Variables**
| `ANUBIS_VAULT_PATH` | Path to vault file | `~/.anubis-vault` |
| `ANUBIS_NO_COLOR` | Disable colored output | `false` |
| `ANUBIS_LOG_LEVEL` | Log verbosity (error, warn, info, debug) | `info` |
### **Command-Line Flags**
All commands support:
- `--vault <path>` - Custom vault location
- `--quiet` - Suppress non-essential output
- `--help` - Show detailed help
---
## ๐ API Documentation
Anubis Vault can be used as a Rust library in your own projects.
```toml
[dependencies]
anubis-vault = "0.1"
```
```rust
use anubis_vault::{Vault, Secret};
// Initialize vault
let vault = Vault::new("~/my-vault.anubis")?;
vault.init("my-master-password")?;
// Add secret
let secret = Secret::new("API_KEY", "secret-value");
vault.add(secret)?;
// Retrieve secret
let secret = vault.get("API_KEY")?;
println!("Value: {}", secret.reveal());
// List all secrets
let secrets = vault.list()?;
for secret in secrets {
println!("{}", secret.name);
}
```
See [docs.rs/anubis-vault](https://docs.rs/anubis-vault) for complete API documentation.
---
## ๐ค Contributing
Contributions are welcome! This project is part of the Anubis Quantum Cipher security suite.
### **Development Setup**
```bash
git clone https://github.com/AnubisQuantumCipher/anubis-vault
cd anubis-vault
cargo build
cargo test
```
### **Running Tests**
```bash
# Unit tests
cargo test
# Integration tests
cargo test --test '*'
# Benchmarks
cargo bench
```
### **Code Coverage**
```bash
cargo tarpaulin --out Html
```
---
## ๐ License
Dual-licensed under **MIT OR Apache-2.0**.
You may choose either license at your option.
- MIT License: [LICENSE-MIT](LICENSE-MIT)
- Apache License 2.0: [LICENSE-APACHE](LICENSE-APACHE)
---
## ๐ Related Projects
Part of the **Anubis Quantum Cipher** security ecosystem:
- **[Anubis Rage](https://github.com/AnubisQuantumCipher/anubis-rage)** - Post-quantum file encryption (ML-KEM-1024 + ML-DSA-87)
- **[Anubis Wormhole](https://github.com/AnubisQuantumCipher/anubis-wormhole)** - Quantum-secure file transfer with magic wormhole codes
- **[Quantum Sign](https://github.com/AnubisQuantumCipher/quantum-sign)** - Post-quantum digital signature tool
---
## ๐ Acknowledgments
Built with:
- [RustCrypto](https://github.com/RustCrypto) - Cryptographic primitives
- [pqcrypto](https://github.com/rustpq/pqcrypto) - Post-quantum cryptography (NIST standards)
- [Plonky3](https://github.com/Plonky3/Plonky3) - Ultra-fast STARK proving system
- [clap](https://github.com/clap-rs/clap) - CLI framework
- [Argon2](https://github.com/P-H-C/phc-winner-argon2) - Password hashing competition winner
Special thanks to:
- **NIST** for standardizing post-quantum cryptography
- **Polygon Zero** for Plonky3 ZK-STARK framework
- **Rust community** for amazing cryptography libraries
---
## ๐ Support
- **Issues:** [GitHub Issues](https://github.com/AnubisQuantumCipher/anubis-vault/issues)
- **Discussions:** [GitHub Discussions](https://github.com/AnubisQuantumCipher/anubis-vault/discussions)
- **Security:** See [SECURITY.md](SECURITY.md) for vulnerability reporting
---
## ๐ฎ Roadmap
**v0.2.0** (Q1 2025)
- [ ] Hardware security module (HSM) integration
- [ ] Biometric unlock (TouchID, Windows Hello)
- [ ] Browser extension for auto-fill
- [ ] Mobile apps (iOS, Android)
**v0.3.0** (Q2 2025)
- [ ] End-to-end encrypted cloud sync
- [ ] Multi-device support
- [ ] Team vaults with role-based access control
- [ ] Yubikey/FIDO2 support
**v1.0.0** (Q3 2025)
- [ ] Formal security audit by Trail of Bits
- [ ] FIPS 140-3 compliance
- [ ] GUI application (desktop)
- [ ] Enterprise features (SSO, LDAP)
---
## ๐ Guardian of Secrets ๐
**"Like Anubis, the ancient guardian who protected the gates of the underworld and weighed the hearts of souls, Anubis Vault stands watch over your secrets, ensuring they remain hidden from allโeven the gods themselves, even quantum computers of the future."**
---
**Made with ๐ by Anubis Quantum Cipher Division**
*Your secrets are safe. Forever.*