Skip to content
 
 

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Password Manager (Educational)

⚠️ Educational project — not a real password manager. This is a small teaching example of the Java AES API, kept deliberately tiny so it can be read in one sitting. It contains known security flaws, documented below on purpose. Do not use it to store real passwords — use an established manager like Bitwarden or KeePassXC.

What it does

Console app: add site/password pairs, retrieve them. Passwords are AES-encrypted and held in memory while the program runs.

Known flaws (these are the lesson)

Flaw Why it's a problem Production-grade fix
Hardcoded key in source code Fixed Anyone with the code can decrypt everything Key is now derived from a master password via PBKDF2-HMAC-SHA256 with a random salt — see CryptoUtil
Cipher.getInstance("AES") defaults to ECB mode Fixed ECB leaks patterns — identical plaintexts produce identical ciphertexts Now uses AES/GCM/NoPadding with a random IV per entry — see CryptoUtil
No salt or IV Fixed Same input always encrypts to the same output Random salt (key derivation) and random IV (per encryption) are now generated and stored alongside the ciphertext — see CryptoUtil
In-memory HashMap only Nothing is saved — all entries are lost when the program exits Encrypted vault file or SQLite

Want to fix one? See the open good first issues.

Run it

git clone https://github.com/chaudhary-lakshay/Password-Manager.git
cd Password-Manager/src
javac PasswordManager/PasswordManager.java
java PasswordManager.PasswordManager

More of my work

This repo is a learning artifact. For production-grade projects, see:

  • CarCatalog — Spring Boot vehicle catalog & rental API: JWT auth, Flyway migrations, Stripe PaymentIntents
  • VitaLink — remote patient monitoring backend: HL7 ADT, MQTT device ingest, live ECG streaming (TimescaleDB + STOMP), FHIR R4
  • VitaLink Android — Jetpack Compose clinician app for the above

License

MIT

About

Password Manager is a simple and secure application designed to store and manage your passwords. Developed using Java, it employs AES encryption to ensure that your passwords are stored securely. The application features a console-based interface for adding and retrieving passwords.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages