Skip to content

About

Qt6 C++23 desktop application to encrypt or decrypt a given file on Linux, MacOS, Windows with AES-256 CBC

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

Β 

History

120 Commits

Folders and files

Repository files navigation

File Encryption & Decryption (Desktop)

Desktop application for securely encrypting and decrypting files on Linux, Windows, and MacOS

Report Issue Β· Request Feature

MIT License Platform GitHub release (latest by date)


Table of Contents


Description

Qt Language Platform

A modern desktop application for securely encrypting and decrypting files on Linux, Windows, and macOS. Developed with C++23 and Qt 6.

The application uses AES-256 CBC encryption and is optimized for high performance with low memory usage (streaming processing).

✨ Features

  • Secure Encryption: Uses AES-256 in CBC mode with SHA-256 hashed passwords.
  • High Performance: Files are streamed in 4 MB chunks. This allows even very large files (GB/TB range) to be encrypted without burdening the RAM.
  • User Friendly:
    • Always starts in the user's Home directory.
    • Smart path suggestions (saving next to the source file).
    • Drag & Drop support (via file dialog).
  • Internationalization (i18n):
    • Automatic language detection on first start (English/German).
    • Language switchable via menu (settings are persisted).
  • Cross-Platform: Runs natively on all systems supporting Qt.

Status

GitHub Created At GitHub release (latest by date) GitHub Release Date Status

GitHub Issues GitHub Pull Requests

breaking Changes

Caution

Please be aware of breaking changes

Version status Comment
v0.1.0 NOT compatible to higher versions. initial creation, text mode
v1.0.0 NOT compatible with lower versions. optimized input/output, text mode limited to some text-based files
v2.0.0 NOT compatible with lower versions. binary-mode, works on every readable file. No filesize limit.

(back to top)

Getting Started

Windows

Setup

There are two options:

  1. Unzip

    -> no Administrator rights needed

  • unzip file_encryption-decryption_x86_amd64.zip and execute file_encryption-decryption.exe
  1. Setup

    -> no Administrator rights needed (optional)

  • execute file_encryption-decryption_x86_amd64_v2.1.0.exe and follow the instructions (see Github Pages for details.)
  • doubleclick file_encryption-decryption.exe or your Desktop-Shortcut

Linux

  • doubleclick File_Encryption_&_Decryption-x86_64.AppImage or your Dekstop-Shortcut

macOS

  • doubleclick the downloaded .dmg package to open it.
  • doubleclick the file_encryption-decryption application inside to start it directly. There is no installation required.

Warning

don't loose your password. Decryption/Recovery without valid password is impossible!

Tip

see Github Pages for Usage & Screenshots

πŸš€ Installation & Build

Several installation packages are available, depending on your Operating System

Tip

see Releases or Github Pages

Prerequisites

  • C++ Compiler with C++23 support (GCC, Clang, MSVC)
  • CMake (>= 3.23)
  • Qt 6 (Core, Widgets, Gui)

πŸ“‚ Project Structure

.
β”œβ”€β”€ CMakeLists.txt           # Build configuration
β”œβ”€β”€ resources.qrc            # Qt Resources (Icons, i18n)
β”œβ”€β”€ include/                 # Header files (.h)
β”‚   β”œβ”€β”€ encryption_manager.h
β”‚   β”œβ”€β”€ encrypt_file_dialog.h
β”‚   β”œβ”€β”€ decrypt_file_dialog.h
β”‚   β”œβ”€β”€ menu_page.h
β”‚   └── ...
└── src/                     # Source files (.cpp)
    β”œβ”€β”€ main.cpp
    β”œβ”€β”€ encryption_manager.cpp
    β”œβ”€β”€ encrypt_file_dialog.cpp
    β”œβ”€β”€ decrypt_file_dialog.cpp
    └── ...

Build Steps

  1. Clone Repository:
git clone https://github.com/Zheng-Bote/qt-desktop_file_encryption-decryption.git
cd qt-desktop_file_encryption-decryption
  1. Create Build Directory:
mkdir build && cd build
  1. Compile with CMake:
cmake ..
make -j$(nproc)
  1. Run:
./file_encryption-decryption

i18n

Update Translation Files

/opt/Qt/6.10.0/gcc_64/bin/lupdate -no-obsolete src/ -ts i18n/qt_file_encryption-decryption_en.ts

Compile Translation Files

/opt/Qt/6.10.0/gcc_64/bin/lrelease i18n/qt_file_encryption-decryption_en.ts -qm i18n/qt_file_encryption-decryption_en.qm

Build Linux AppImage

Depending on your Linux distribution you might need to install additional packages to build the AppImage.

./create_appimage.sh

or

./create_appimage_modern.sh

Build macOS DMG

To build the macOS DMG package, you need to have create-dmg installed (e.g., via Homebrew: brew install create-dmg).

./create_dmg.sh

(back to top)


Documentation & Screenshots

Note

please visit Github Pages for more.

App Screenshot Linux App Screenshot MacOS

SBoM (CycloneDX)

nvm use --lts
atom -J-Xmx16g usages -o ./docs/app.atom --slice-outfile ./docs/atom_v2.1.0.json -l cpp ./src
cdxgen -o ./docs/sbom_v2.1.0.json -t cpp --usages-slices-file ./docs/atom_v2.1.0.json --author "ZHENG Robert" --deep -r ./src

πŸ—οΈ Architecture

The project follows the "Composition over Inheritance" principle and strictly separates UI logic from encryption logic.

Tip

πŸ“š Detailed Architecture Models: For comprehensive UML and architectural diagrams (Context, Class, Component, Deployment, Use Case, etc.), please see our new documentation:

Structure Diagram

classDiagram
    class MenuPage {
        +loadLanguage()
        +createLanguageMenu()
        -EncryptFileDialog* encryptDialog
        -DecryptFileDialog* decryptDialog
    }

    class EncryptionManager {
        <<Core Logic>>
        +encryptFile(source, pass, overwrite)
        +decryptFile(source, pass, overwrite)
        -processFile(stream processing)
    }

    class EncryptFileDialog {
        <<UI Dialog>>
        -EncryptionManager* logic
        +encrypt_file_slot()
    }

    class DecryptFileDialog {
        <<UI Dialog>>
        -EncryptionManager* logic
        +decrypt_file_slot()
    }

    MenuPage --> EncryptFileDialog : opens
    MenuPage --> DecryptFileDialog : opens
    EncryptFileDialog *-- EncryptionManager : owns (Composition)
    DecryptFileDialog *-- EncryptionManager : owns (Composition)
Loading

Data Flow (Streaming)

To keep memory usage minimal, files are never loaded completely into RAM. Instead, a QFile stream is used:

  1. Open: Source and destination files are opened.

  2. Loop:

  • Read 4 MB chunk from source stream.
  • Process block (AES Encode/Decode) via QAESEncryption.
  • Write processed block to destination stream.
  1. Close: Streams are closed, temporary files are renamed/moved.

(back to top)

Authors and License

πŸ“ License

This project is released under the MIT License. See LICENSE for details.

Copyright (c) 2024 ZHENG Robert

🀝 Authors

  • Zheng Robert - Core Development

Code Contributors

Contributors

Zheng Robert

(back to top)


πŸ––

About

Qt6 C++23 desktop application to encrypt or decrypt a given file on Linux, MacOS, Windows with AES-256 CBC

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages