| Crates.io | qudag-vault-core |
| lib.rs | qudag-vault-core |
| version | 0.5.1 |
| created_at | 2025-06-21 15:19:15.37642+00 |
| updated_at | 2025-06-24 03:08:06.693161+00 |
| description | Quantum-resistant password vault library with post-quantum cryptography |
| homepage | https://github.com/ruvnet/QuDAG/tree/main/core/vault |
| repository | https://github.com/ruvnet/QuDAG |
| max_upload_size | |
| id | 1720890 |
| size | 386,837 |
A quantum-resistant password vault library with post-quantum cryptography for secure password management.
Add this to your Cargo.toml:
[dependencies]
qudag-vault-core = "0.1.0"
Or install via cargo:
cargo add qudag-vault-core
The vault library is designed as a separate crate within the QuDAG workspace, ensuring clean separation of concerns while leveraging QuDAG's powerful cryptographic and DAG modules.
vault.rs - Main vault implementation providing high-level APIcrypto.rs - Integration with QuDAG's quantum-resistant cryptodag_storage.rs - DAG-based secret storage using QuDAG's DAG modulekdf.rs - Argon2id key derivation for master passwordsecret.rs - Secret entry types with automatic memory zeroizationerror.rs - Error handling with proper error chain mappingutils.rs - Password generation and utility functionsuse qudag_vault_core::Vault;
// Create a new vault
let mut vault = Vault::create("vault.qdag", "master_password")?;
// Add a secret with auto-generated password
vault.add_secret("github", "myusername", None)?;
// Add a secret with specific password
vault.add_secret("email", "user@example.com", Some("my_password"))?;
// Retrieve a secret
let secret = vault.get_secret("github")?;
println!("Username: {}", secret.username);
println!("Password: {}", secret.password.as_str());
// List all secrets
let secrets = vault.list_secrets(None)?;
for label in secrets {
println!("- {}", label);
}
// Export vault for backup
vault.export("backup.qdag")?;
use qudag_vault_core::utils::generate_password;
// Generate a secure password
let password = generate_password(16, true, true, true)?;
// Organize secrets in categories
vault.add_secret("work/email", "user@company.com", None)?;
vault.add_secret("work/github", "work_account", None)?;
vault.add_secret("personal/email", "user@personal.com", None)?;
// List secrets in a category
let work_secrets = vault.list_secrets(Some("work"))?;
QuDAG Vault is also available through the QuDAG CLI tool:
# Install QuDAG CLI
cargo install qudag-cli
# Generate secure passwords
qudag vault generate --length 16 --count 3
# Initialize a vault
qudag vault init
# Add passwords
qudag vault add github --username myuser
# Retrieve passwords
qudag vault get github
# List all entries
qudag vault list --format json
# Export vault for backup
qudag vault export ~/vault-backup.qdag
# Show vault configuration
qudag vault config show
zeroize crateZeroizeOnDropThe vault library seamlessly integrates with QuDAG's infrastructure:
qudag-crypto for all cryptographic operationsqudag-dag for DAG-based storage# Build the vault library
cargo build -p qudag-vault-core
# Run tests
cargo test -p qudag-vault-core
# Run benchmarks
cargo bench -p qudag-vault-core
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
This project is part of the QuDAG ecosystem, building quantum-resistant distributed systems for the future.