This Python program securely manages website passwords. It encrypts credentials, analyzes password strength, and lets you add, delete, update, and view them (decrypted for a short time). It can also open website login pages or copy passwords to your clipboard. Currently educational, it lays the foundation for a robust password management solution.
- Purpose: The program's entry point. Initializes the database (commented out for subsequent runs), presents the sign-up/sign-in menu, and handles user interaction based on their choice.
- Parameters: None
- Returns: None (exits the program)
- Purpose: Guides the user through the sign-up process (creating username, setting master password, storing verification key).
- Parameters: None
- Returns: None (prints confirmation message and launches main menu)
- Purpose: Derives a strong encryption key from the master password using a Key Derivation Function (KDF) with added salt.
- Parameters:
master_password:
The user's master password.salt_type:
String specifying the type of salt to be used.
- Returns: The derived encryption key (bytes)
- Purpose: Inserts a new user record into the "master" table, storing the username and verification key derived from the master password.
- Parameters:
username:
The user's chosen username.verification_key:
The KDF-derived key used for verification during sign-in.
- Returns: None (data is inserted into the database)
- Purpose: Prompts the user for username and master password, verifies them, derives encryption/decryption key.
- Parameters: None
- Returns: None (launches program menu on successful verification)
- Purpose: Verifies user credentials during sign-in against stored information.
- Parameters:
username
: Username entered during sign-in.verification_key
: Verification key derived from user's master password.encryption_key
: Encryption/decryption key derived from master password.
- Returns: None (prints message indicating successful verification or invalid credentials, launches program menu on success)
- Purpose: Presents the main menu with options for managing credentials.
- Parameters:
mt_username
: Master username for the current session.enc_dec_key
: Encryption/Decryption key derived from the master password.
- Returns: None
- Purpose: Adds new website credentials after encrypting the password.
- Parameters:
mt_username
: Master username for the current session.enc_dec_key
: Encryption/Decryption key derived from the master password.
- Returns: None (prints confirmation message)
- Purpose: Deletes credentials for a specific website.
- Parameters:
mt_username
: Master username for the current session.enc_dec_key
: Encryption/Decryption key derived from the master password.
- Returns: None (prints confirmation message)
- Purpose: Updates the password for a specific website after encrypting the new password.
- Parameters:
mt_username
: Master username for the current session.enc_dec_key
: Encryption/Decryption key derived from the master password.
- Returns: None (prints confirmation message)
- Purpose: Retrieves and decrypts all stored credentials, displaying them for a limited time.
- Parameters:
mt_username
: Master username for the current session.enc_dec_key
: Encryption/Decryption key derived from the master password.
- Returns: None (credentials are displayed)
- Purpose: Retrieves website URL, opens it in the browser, decrypts and copies password to clipboard (limited time).
- Parameters:
mt_username
: Master username for the current session.enc_dec_key
: Encryption/Decryption key derived from the master password.
- Returns: None
- Purpose: Generates a random password based on user-specified criteria.
- Parameters:
mt_username
: Master username for the current session.enc_dec_key
: Encryption/Decryption key derived from the master password.
- Returns: None (generated password is displayed and offered for addition to password manager)
- Purpose: Analyzes the strength of a given password.
- Parameters:
mt_username
: Master username for the current session.enc_dec_key
: Encryption/Decryption key derived from the master password.
- Returns: String indicating password strength ("Weak", "Medium", "Strong")