An open API service indexing awesome lists of open source software.

https://github.com/professorlearncode/cs50p-cryptkeep


https://github.com/professorlearncode/cs50p-cryptkeep

Last synced: 12 months ago
JSON representation

Awesome Lists containing this project

README

          

# ๐Ÿ” CS50P Final Project: CryptKeep - Encrypted Password Manager (CLI-based)

This is my final project for **Harvard's CS50P: Introduction to Programming with Python**. The project is a simple yet functional **Command Line Interface (CLI) Password Manager** that encrypts and stores your passwords securely using Python and the `cryptography` library.

---

## ๐ŸŽฅ Demo Video

> ๐ŸŽฌ *Coming Soon (Optional)*

---

## ๐Ÿง  Project Overview

The **Encrypted Password Manager** allows users to:
- Generate and save **secure encryption keys**
- Create and manage **encrypted password vaults**
- Retrieve saved passwords for specific websites or services
- Run simple interactive commands via the CLI

### ๐Ÿ”’ Key Concepts Demonstrated
- File I/O with Python
- Object-Oriented Programming (OOP)
- CLI-based user interaction
- Symmetric encryption using `cryptography.fernet`
- Secure password handling and persistence

---

## ๐Ÿ“‚ Project Structure

```

cs50p-CryptKeep/
โ”œโ”€โ”€ password\_manager.py # Main application logic
โ”œโ”€โ”€ test\_password\_manager.py # Basic testing module
โ”œโ”€โ”€ requirements.txt # Required Python packages

````

---

## ๐Ÿš€ Features

- ๐Ÿ›ก๏ธ AES encryption for password storage using `Fernet` (from `cryptography`)
- ๐Ÿ—‚๏ธ Store multiple site-password pairs securely in a local file
- ๐Ÿ”‘ Key-based encryption and decryption for secure access
- ๐Ÿง  Interactive text-based menu for ease of use
- ๐Ÿงช Includes basic test file to validate functionality

---

## ๐Ÿ’ป Technologies Used

- Python 3.x
- `cryptography` library (`Fernet` encryption)
- CLI (Command Line Interface)
- File I/O operations

---

## ๐Ÿ“ฆ Installation

### ๐Ÿ“Œ Prerequisites
Make sure you have:
- Python 3.8 or above installed
- `pip` package manager

### ๐Ÿ”ง Setup

1. **Clone the repository:**
```bash
git clone https://github.com/professorlearncode/cs50p-CryptKeep.git
cd cs50p-CryptKeep
```

2. **Install dependencies:**

```bash
pip install -r requirements.txt
```

3. **Run the program:**

```bash
python password_manager.py
```

---

## ๐Ÿงฉ How It Works

Upon running the script, you'll be presented with an interactive menu:

```text
What do you want to do?
1. Create a new key
2. Load an existing key
3. Create a new password file
4. Load existing password file
5. Add a new password
6. Get a password
q. Quit
```

### Example Use Case

1. Generate a new encryption key and store it securely
2. Create a password vault and store initial passwords
3. Load the key and vault later to retrieve or add passwords

All passwords are encrypted before being saved to disk and decrypted only in memory at runtime.

---

## ๐Ÿงช Testing

A basic test script (`test_password_manager.py`) is included to verify core functionality like:

* Key creation and loading
* Password encryption/decryption
* File-based persistence

You can extend it using `unittest` or `pytest` for further robustness.

---

## ๐Ÿ“ Notes

* Encryption keys should be stored securely. Anyone with access to the key file can decrypt the stored passwords.
* This project is intended for **educational purposes only** โ€” not recommended for production use without further security hardening.
* Developed as part of the **CS50P curriculum** โ€” to apply core Python concepts in a real-world inspired mini-application.

---

## ๐Ÿ™Œ Acknowledgements

* Inspired by the need for basic password management and encryption.
* Thanks to the **CS50 team** and **David J. Malan** for making learning fun and practical.

---

> ๐Ÿ“Œ *Feel free to explore, modify, and enhance this project for your own needs!*