Users may safely save, manage, and retrieve their passwords with Pass-Lock, a command-line interface (CLI) key-value store. It uses AES encryption to safeguard private information, guaranteeing security and privacy. This project prioritizes usability without sacrificing security and exemplifies excellent practices for encryption.
cli: Contains the functionSetupto initialize the CLI.cmd: Contains the commands likedelete,edit,setup, andget.helpers: Contains the helper functions used within the project likeDeriveKey,Encrypt,ReadPassword, andValidateInput.types: Contains the data typesCommand,CommandDistance, andPlockEntry.main.go: Main entry file.
Make sure you have the following installed:
- Golang (Go): Installation Guide
- Clone the repository:
git clone https://github.com/Ege-Okyay/passlock.git
- Navigate to the project directory:
cd passlock - Install dependencies: No external libraries are required. Ensure Go is installed and properly configured.
- Build the application
go build
- Run the application:
./passlock
-
Initialize the vault with a master password:
./passlock setup
- Prompts for a master password and encrypts it for future use.
-
Store a new key-value pair:
./passlock set <key> <value>
- Example:
./passlock set apiKey "secret123"
- Example:
-
Retrieve and display the specified key-value pair from the data vault:
./passlock get <key>
- Example:
./passlock get apiKey
- Example:
-
Retrieve and display all key-value pairs from the data vault:
./passlock get-all
-
Edit the value of an existing key.:
./passlock edit <key>
- Example:
./passlock edit apikey
- Example:
-
Delete a key-value pair from the vault:
./passlock delete <key>
- Example:
./passlock delete apiKey
- Example:
-
Delete all stored data and remove passlock configuration:
./passlock self-destruct
-
AES Encryption:
- AES is used to encrypt and decrypt the master password and data entries. The encryption key is derived from the master password using a key derivation function.
-
Storage Files:
keys.plock: Stores the encrypted master password and AES key.data.plock: Stores encrypted user data entries as key-value pairs.
-
Cross-Platform Storage:
- The data is saved in platform-specific directories (e.g.,
APPDATAfor Windows,~/Libraryfor macOS).
- The data is saved in platform-specific directories (e.g.,
For a detailed explanation of the encryption strategies used in this project, check out the project report: Click Here
Watch the video walkthrough of the project to understand how it works: Work in progress
Contributions are welcome! Feel free to open an issue or submit a pull request if you have ideas for improvements or find any bugs.
- Fork the repository
- Create a new branch (
git checkout -b feature-branch) - Commit your changes (
git commit -m "Add feature") - Push to the branch (
git push origin feature-branch) - Open a Pull Request
