Skip to content

Lif28/Aegis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aegis - File Encryptor

Hardware-authenticated file encryption using physical USB keys.

Aegis is a desktop application that encrypts and decrypts files using AES-256-GCM encryption with the cryptographic key stored exclusively on a physical USB drive. No passwords, no cloud storage - just plug in your USB key and protect your files.


Aegis
License Platform Python

Features

  • Physical key authentication: Your encryption key lives only on your USB drive
  • AES-256-GCM encryption: Military-grade authenticated encryption
  • Simple GUI: Modern interface with dark/light theme support
  • Batch processing: Encrypt or decrypt multiple files simultaneously
  • Cross-platform: Works on Windows and Linux
  • Zero knowledge architecture: Without the USB key, encrypted files are permanently inaccessible

Quick Start

Prerequisites

  • Python 3.11 or higher
  • USB drive (any size)

Installation

  1. Clone the repository
git clone https://github.com/Lif28/Aegis.git
cd Aegis
  1. Install dependencies
pip install -r requirements.txt
  1. Run the application
python3 main.py

First Use

  1. Insert a USB drive into your computer
  2. Click "Generate key" in the application
  3. A 256-bit encryption key will be created and saved as key.aegis on your USB drive
  4. Keep this USB drive secure - it's your master key

Usage

aegis_app

Encrypting Files

  1. Insert your USB key (status indicator will turn green)
  2. Click the file browser area
  3. Select Encrypt mode
  4. Click "Process Files"
  5. Encrypted files will have the .aegis extension

Decrypting Files

  1. Insert your USB key
  2. Add .aegis files to the list
  3. Select Decrypt mode
  4. Click "Process Files"
  5. Original files will be restored

Additional Options

  • Delete original files: Removes source files after successful encryption/decryption
  • Theme toggle: Switch between dark and light interface themes
  • Batch operations: Process multiple files in a single operation

How It Works

Encryption Process

1. Read plaintext file
2. Generate cryptographically secure 16-byte nonce
3. Encrypt using AES-256-GCM with USB key
4. Write: [nonce(16) + ciphertext + tag(16)] to .aegis file

File Structure

Encrypted files (.aegis) contain:

[Nonce - 16 bytes][Ciphertext - variable][Authentication Tag - 16 bytes]

Security Model

  • Key storage: 256-bit key stored on USB drive as key.aegis
  • Algorithm: AES-256 in Galois/Counter Mode (GCM)
  • Authentication: Built-in integrity verification prevents tampering
  • Nonce: Unique random IV for each encryption operation
  • Key isolation: Encryption key never persists on computer disk

Building Executable

Create a standalone executable without requiring Python installation:

Install PyInstaller

pip install pyinstaller

Build executable

On Windows:

pyinstaller --onefile --windowed --name Aegis --icon=logo.ico --add-data "logo.png;." --hidden-import=PIL._tkinter_finder --collect-submodules PIL --collect-all sv_ttk --clean main.py

The executable will be in dist\Aegis.exe. You can:

  • Run it directly from dist\ folder
  • Move it anywhere you want (Desktop, Documents, etc.)
  • Create a shortcut for easy access

On Linux (tested on Ubuntu):

sudo apt install make python3-tk
make install

This will:

  • Compile the executable with PyInstaller
  • Install it to ~/.local/bin/Aegis
  • Create desktop entry and icon

Project Structure

Aegis/
├── main.py           # GUI and application logic
├── crypto.py         # Encryption/decryption core
├── logo.png          # Application icon
├── logo.ico          # Windows icon
├── aegis.desktop     # Linux desktop entry
├── Makefile          # Linux build/install automation
├── requirements.txt  # Python dependencies
└── README.md         # Documentation

Dependencies

pycryptodome>=3.23.0
psutil>=5.9.8
sv-ttk>=2.6.1
Pillow>=10.2.0

Security Considerations

Best Practices

  • Store your USB key in a physically secure location
  • Create a backup copy of key.aegis and store it separately
  • Test decryption before deleting original files
  • Never share your USB key or the key.aegis file

Threat Model

Protects against:

  • Unauthorized access to encrypted files on compromised systems
  • Data breaches where only encrypted files are stolen
  • Theft of laptop/computer without USB key

Does not protect against:

  • Physical theft of both computer and USB key simultaneously
  • Malware that captures files before encryption
  • Coerced key disclosure
  • Keyloggers
  • Loss or destruction of the USB key (results in permanent data loss)

Critical Warnings

  • Loss of USB key = permanent data loss. There is no password reset or recovery mechanism.
  • No backdoor exists by design - this ensures your security but means we cannot help recover lost keys.
  • Always maintain backups of the key.aegis file in secure, separate locations.

Troubleshooting

"USB Key: Not Connected"

  • Verify USB drive is inserted and mounted
  • On Linux, check /media/ or /mnt/ directories
  • Ensure proper filesystem permissions
  • Try removing and reinserting the drive

"Key not found on USB"

  • Generate a new key using the "Generate key" button
  • Verify key.aegis exists in the USB root directory
  • Check that you're using the correct USB drive
  • Ensure the file hasn't been renamed or moved

Decryption Failures

  • Confirm you're using the correct USB key
  • Verify the .aegis file isn't corrupted
  • Ensure the file was encrypted with this specific key
  • Check for filesystem errors on storage device

Technical Specifications

  • Cipher: AES-256 (Advanced Encryption Standard, 256-bit key)
  • Mode: GCM (Galois/Counter Mode - authenticated encryption)
  • Key Length: 256 bits (32 bytes)
  • Nonce Length: 128 bits (16 bytes)
  • Authentication Tag: 128 bits (16 bytes)
  • Library: PyCryptodome

Disclaimer

This software is provided "as is" without warranty of any kind. The developer is not responsible for data loss, security breaches, or any damages arising from the use of this software. Users are responsible for:

  • Maintaining secure backups of encryption keys
  • Protecting physical USB keys from loss or theft
  • Testing encryption/decryption before deleting original files
  • Understanding the risks of hardware-based key storage

Main libraries used

  • PyCryptodome for cryptographic primitives
  • sv-ttk for modern theme implementation
  • psutil for cross-platform USB detection

Why "Aegis"?

Aegis comes from Greek mythology - the impenetrable shield of Zeus and Athena that provided divine protection. The name reflects the application's main purpose: providing unbreakable defense for your files through hardware-authenticated encryption. Just as the mythological Aegis was a physical object of protection, this tool uses a physical USB key to safeguard your data.

About

Hardware-authenticated file encryption. Encrypt files using AES-256-GCM with your cryptographic key stored on a physical USB drive.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors