Skip to content

JustWhit3/key-manager

Repository files navigation

A desktop app for password management and creation, developed using Qt

v1.0 license C++20
code size repo size total lines
codeq doc

Table of contents

Introduction

key-manager is a cross-platform (Linux/Windows/MacOS) and safe desktop app for password management and creation written in C++20 and developed using Qt v6.4.2. No use of QtCreator was made for development, but only "raw" code written by hand and CMake tool for building.

The app has been tested with gcc and clang compilers and required minimum versions are respectively 9.3 and 10. It can be compiled on MSVC too of course.

The app offers two services.

  • Password management: a password storage tool to safely lock information about given accounts (ex: platform, password, username, etc...). See the corresponding paragraph of this README for further information about how passwords are protected.
  • Password creation: a tool to generate strong passwords based on several requirements chosen by the user (upper/lower letters only, length, etc...).

All the passwords are saved into an hidden directory located into the system.

All contributions are more than welcome. Before contributing, please look at the contributing file. To propose ideas post something in the discussion page.

The app is and will stay free, but if you want to support me with a donation it would be really appreciated!

Buy Me A Coffee

Architectures support

Operating systems

  • Linux
    • Ubuntu (tested)
    • WSL (tested)
  • Windows
    • Windows 10 or higher (tested)
  • MacOS

Compilers

  • gcc: v. 9/10/11/12
  • clang: v. 11/12/13/14
  • MSVC: not directly tested, but should work

How passwords are protected

A login system is applied to the app and a new password setup is required during the first app run. The inserted user password is encrypted using the AES (Advanced Encryption Standard) method through the crypto++ library and a generated random key of lenght 100 alpha-numerical characters is used for encryption and decryption operations. The encrypted password and the key are then saved into a configuration file hidden in the system.

At every login the user password is required and it is verified the matching among it and the user password of the configuration file, which for this occasion is decrypted using the previously mentioned algorithm and the saved key.

Once a new password is added to the database, it is saved into a Json file located into the passwords directory (which lies in the application data directory, located in the system), which is created at the first app run. Every password sensitive data (username and password itself) is encrypted using the previous algorithm and the saved key.

Once a password is displayed into the password manager state it is decrypted and shown in the corresponding interface so only the logged user can see it. Passwords reading is also protected with a toggle system.

Install and use

Install

Steps to be reproduced:

1) Download one of the releases of the repository.

2) Unzip and enter the downloaded repository directory.

3) Install and compile the app and its dependencies:

cmake -B build

⚠️ The three Qt modules required for the project building (QtCore, QtWidgets and QtStateMachine) will be installed during the build part and in case of Ubuntu installation all the prerequisite packages will be installed with apt. The Qt build is supported on Ubuntu, Windows and MacOS. On Windows there may be a known issue related to the Qt building, so if you encounter it proceed with a separated installation of Qt and then build the project.

Install:

sudo cmake --build build --target install

⚠️ sudo is not required on Windows.

Mandatory prerequisites:

  • C++20 standard
  • g++ compiler (app developed on Ubuntu v22.04.1 with g++ v11.3.0)
  • CMake (at least v3.15)
  • Qt library (v6.4.2), installed during the app installation.
  • crypto++ library (v8.8.0), installed during the app installation.

To run the app:

key-manager

Or if you don't want to install it:

cmake -B build
sudo cmake --build build
./build/src/key-manager

Debug mode

Debug mode is used from developers to test the app. To build the app in debug mode:

cmake -B build -DCMAKE_BUILD_TYPE=Debug
sudo cmake --build build

This will automatically compile unit tests and source code with debug tools.

Prerequisites for debug mode:

To run all the unit tests:

./build/test/unit_tests/key-manager_unit_tests

To run IWYU checks:

./test/IWYU.sh

To run profiling tests:

./test/all_tests.sh

All the code documentation is generated automatically using Doxygen and is stored here.

States

Menu state

This state contains the main menu of the app and is used to access password manager and password creation tools. App metadata and release information is displayed on the left side. From this state it is possible also to come back to the login state.

Password manager state

This state contains the password manager tool. Here you can add, delete and modify passwords from the database; there is also a third button which gives a more detailed information about a given password. See the corresponding paragraph to understand how passwords are kept safe. Passwords are ordered in alphabetical order and can be searched through the corresponding tool.

Password generator state

This state contains the password generator. Here you can generate strong and safe passwords and save them to clipboard with a click. You can also choose which kind of letters and symbols type you want to use for the password generation.

Other states

  • Add password state:

  • Login state:

Other states will not be shown but could be observed directly through the app.

Credits

Project leaders


Gianluca Bianco

Stargazers over time

Stargazers over time