Skip to content

About

A secure password management system built with Java, featuring client-server architecture and robust encryption.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Password Vault

A secure password management system built with Java, featuring client-server architecture and robust encryption.

Table of Contents

Project Structure

The client logic is located in the client package and the server logic in the server package.

Architecture

Command Pattern (console package)

For executing different commands, a functional interface Command with a single execute method was implemented. All implementations of this interface are located in the console package.

  • Command Validation: All commands use methods from the validation package, also found in console.
  • CommandExecutor: Used for selecting the correct command from the client (in the same package as the commands).

Enums for Consistency

Due to the frequent reuse of responses, command names, and error messages, enums are used to maintain consistency across the codebase and in tests, keeping the code cleaner.

Database (database package)

FilesManager (files package)

Responsible for:

  • Creating personal user files where passwords for different sites are stored
  • Querying these files for password retrieval

DatabaseManager

Handles:

  • Database operations
  • Registering new users
  • Checking for existing users

Logging (logging package)

ErrorLogger

Responsible for logging serious errors during execution. To avoid burdening clients with technical details, they only receive error messages while the actual details are logged.

  • Uses an enum for exception types (user and system exceptions)
  • Custom RuntimeExceptions created for more detailed error descriptions and to catch them in specially designated blocks

Security (security package)

API Integration (api.enzoic package)

Contains the class for making requests to the Enzoic API for checking password validity against known breaches.

Encryption (encryption package)

Contains the class used for encrypting user passwords for different sites.

Key Features:

  • Uses a special encryption algorithm (PBKDF2) that utilizes the user's password and username
  • No need to store encryption keys for all users
  • If a user forgets their master password, their data cannot be accessed (security by design)

Password Generation (password package)

Contains the class that generates secure passwords.

Implementation:

  • Uses SecureRandom (non-deterministic) instead of regular Random
  • More reliable and cryptographically secure
  • Generated passwords are validated using the password validation class

Hashing (hash package)

Contains a class for SHA-256 hashing, used for hashing master user passwords.

Session Management (session package)

UserSession

Used primarily to track which users are currently logged in to the system.

Data Formatting (formatter package)

Contains a class used for converting to/from JSON format. All data written to files is stored in JSON format for easy parsing and readability.

Records

Special records are used throughout the project for data transfer:

  • ErrorLog - for ErrorLogger
  • Login - for DatabaseManager
  • Profile - for FilesManager

Features

  • Secure password storage with military-grade encryption
  • Password generation using cryptographically secure random
  • Master password hashing with SHA-2560
  • Password validation via Enzoic API
  • User session management
  • Comprehensive error logging
  • JSON-based data storage
  • Client-server architecture that allows 10 parallel clients
  • User-friendly command-line interface
  • Unit tests with Junit 6 and Mockito

About

A secure password management system built with Java, featuring client-server architecture and robust encryption.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages