Skip to content

SecureNoteVault is command line based, password protected note storage application which utilises AES 128 with PBKDF2.

Notifications You must be signed in to change notification settings

pro-yash-jects/SecureNoteVault

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

SecureNoteVault

A command-line encrypted note storage application that provides secure, password-protected note management with military-grade encryption.

🔐 Features

  • Strong Encryption: Uses Fernet (AES 128) encryption with PBKDF2 key derivation
  • Password Protection: Master password required to access notes
  • Organized Storage: Add tags to categorize your notes
  • Rich Interface: Beautiful command-line interface using Rich library
  • Clipboard Integration: Copy decrypted notes directly to clipboard
  • Timestamped: Automatic timestamps for all notes
  • Secure Password Changes: Change master password while preserving existing notes
  • Zero-Knowledge: Notes are encrypted before storage - only you can read them

🚀 Installation

Prerequisites

  • Python 3.7 or higher
  • pip package manager

Dependencies

Install the required packages:

pip install cryptography rich pyperclip

Setup

  1. Clone this repository:
git clone https://github.com/pro-yash-jects/SecureNoteVault.git
cd SecureNoteVault
  1. Run the application:
python vault_cli.py --help

📖 Usage

Basic Commands

List all notes (metadata only)

python vault_cli.py list

Shows a table with index numbers, timestamps, and tags - but not the actual note content.

Add a new note

python vault_cli.py add

You'll be prompted to enter your master password and then your note content.

Add a note with tags

python vault_cli.py add --tags personal important

View a specific note

python vault_cli.py view 0

Replace 0 with the index number from the list command. You'll have the option to copy the decrypted note to your clipboard.

Delete a note

python vault_cli.py delete 0

Replace 0 with the index number of the note you want to delete.

Change master password

python vault_cli.py changepw

Safely change your master password while preserving all existing notes.

Example Workflow

# Add your first note
$ python vault_cli.py add --tags work urgent
Enter master password: ********
Enter your note: Remember to submit the quarterly report by Friday

# List your notes
$ python vault_cli.py list
Enter master password: ********
┏━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┓
┃ Index ┃ Timestamp         ┃ Tags        ┃
┡━━━━━━━┇━━━━━━━━━━━━━━━━━━━┇━━━━━━━━━━━━━┩
│     0 │ 08 Jun 2025 19:30 │ work, urgent│
└───────┴───────────────────┴─────────────┘

# View the note
$ python vault_cli.py view 0
Enter master password: ********
Note: Remember to submit the quarterly report by Friday
Copy to clipboard? (y/n): y
Copied to clipboard.

🏗️ Architecture

File Structure

SecureNoteVault/
│
├── vault_cli.py      # Main CLI application
├── crypto_utils.py   # Cryptographic utilities
├── vault_utils.py    # Vault storage management
├── vault.dat         # Encrypted vault file (created on first use)
├── vault.salt        # Salt file for key derivation (created on first use)
└── README.md         # This file

Security Implementation

  • Encryption: Fernet (AES 128 in CBC mode with HMAC-SHA256 authentication)
  • Key Derivation: PBKDF2-HMAC-SHA256 with 390,000 iterations
  • Salt: 16-byte random salt stored separately from the vault
  • Authentication: Built-in authentication prevents tampering

Data Storage

  • Notes are stored in vault.dat as an encrypted JSON array
  • Each note entry contains:
    • note: Encrypted note content
    • timestamp: Creation timestamp
    • tags: Array of tags for organization

🔒 Security Notes

  • Your master password is never stored - only used for key derivation
  • Each note is individually encrypted before being stored
  • The vault file cannot be decrypted without the correct master password
  • Salt prevents rainbow table attacks
  • High iteration count (390,000) prevents brute force attacks

⚠️ Important Security Considerations

  1. Backup: The salt file (vault.salt) is crucial - losing it makes your vault unrecoverable
  2. Password Strength: Use a strong, unique master password
  3. Memory: Notes are temporarily decrypted in memory during viewing
  4. Clipboard: Be aware that clipboard contents may be logged by some systems

🛠️ Development

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Testing

Run basic functionality tests:

# Test adding and viewing a note
python vault_cli.py add --tags test
python vault_cli.py list
python vault_cli.py view 0

📋 Requirements

  • Python 3.7+
  • cryptography >= 3.0.0
  • rich >= 10.0.0
  • pyperclip >= 1.8.0

🐛 Troubleshooting

Common Issues

"Failed to decrypt vault. Wrong password?"

  • Ensure you're entering the correct master password
  • Check that the vault.salt file exists in the same directory

"Invalid index"

  • Use python vault_cli.py list to see valid index numbers
  • Remember that indexing starts from 0

Clipboard not working

  • On Linux, you may need to install xclip or xsel
  • On some systems, clipboard functionality may require additional permissions

🤝 Support

If you encounter any issues or have questions:

  1. Check the troubleshooting section above
  2. Search existing GitHub issues
  3. Open a new issue with detailed information about your problem

⚡ Quick Start: python vault_cli.py add → Enter password → Enter note → Done!

About

SecureNoteVault is command line based, password protected note storage application which utilises AES 128 with PBKDF2.

Resources

Stars

Watchers

Forks

Languages