A command-line password manager Stores credentials encrypted with AES-256-GCM, verifies vault integrity with ElGamal digital signatures, and supports secure vault transfer between users via Diffie-Hellman key exchange.
Requirements: Python 3.8+
python -m venv venv
venv\Scripts\activate # for Windows
**or**
source venv/bin/activate # for Mac and Linux
pip install -r requirements.txtAll commands are run from the project root:
python src/main.py <command> <arguments>python src/main.py setup aliceGenerates Alice's ElGamal key pair and saves it to the keys/ folder.
python src/main.py create-vault alice mypassword123Creates an encrypted vault for Alice, locked with her master password, and signs it.
python src/main.py add alice mypassword123 github.com alice_user p@ssword1
python src/main.py add alice mypassword123 google.com alice@gmail.com abc123python src/main.py list alice mypassword123python src/main.py get alice mypassword123 github.compython src/main.py update alice mypassword123 github.com newpassword99python src/main.py delete alice mypassword123 github.compython src/main.py verify aliceChecks the ElGamal signature on Alice's vault. If the vault file was tampered with, access is denied.
First set up the recipient:
python src/main.py setup bob
python src/main.py create-vault bob bobpasswordThen export:
python src/main.py export alice mypassword123 bob bobpasswordThis runs the full Diffie-Hellman key exchange, encrypts Alice's vault with the session key, signs it, and imports it into Bob's vault re-encrypted under his master password.
pytest tests/project/
├── src/
│ ├── modules/
│ │ ├── elgamal.py # Module 1 — key generation
│ │ ├── vault.py # Module 2 — AES encryption + CRUD
│ │ ├── integrity.py # Module 3 — ElGamal signatures
│ │ └── diffie_hellman.py # Module 4 — DH key exchange + export
│ ├── utils/
│ │ └── crypto_utils.py # AES-GCM + SHA-256 helpers
│ └── main.py # CLI entry point
├── tests/
│ ├── test_elgamal.py
│ ├── test_vault.py
│ ├── test_integrity.py
│ └── test_dh.py
├── keys/ # Generated key files (private keys git-ignored)
├── vaults/ # Encrypted vault files
├── config.json # Shared DH/ElGamal parameters (p, alpha)
├── requirements.txt
└── README.md