Skip to content

Repository files navigation

Secure Data Annihilator

Secure Data Annihilator is a high-security file encryption and digital shredding application. Written in Python utilizing Tkinter and industry-standard cryptography libraries, it provides a lightweight desktop utility for sanitizing sensitive files and directories or encrypting them for secure transit.

The application operates under a secure-by-default architecture, offering two primary workflows:

  1. Encrypt & Retain: Encrypts files in-place using AES-256-CBC, outputting a base64-encoded decryption key for the user to store safely.
  2. Encrypt & Annihilate (Shred): Encrypts files, securely overwrites the storage blocks with random bytes, and unlinks them from the file system, ensuring zero trace of the data remains.

📸 User Interface

Home Screen

Home Screen

Encryption Screen

Encryption Screen

Decryption Screen

Decryption Screen


🚀 Features

  • High-Grade Encryption: Defaults to AES-256-CBC with secure PKCS7 block padding.
  • Recursive Folder Processing: Bulk-encrypts directories recursively.
  • Secure Shredding (Zero Trace): Overwrites original files on disk with random bytes before deletion to thwart data recovery tools.
  • Sleek Cyber-Dark Theme: Built with a custom, eye-friendly dark design theme.
  • Activity Log Console: Real-time logging of operations and status updates directly in the interface.

🛠️ Technology Stack

  • Language: Python 3.x
  • GUI Engine: Tkinter (Python Standard Library)
  • Cryptographic Primitives: PyCA Cryptography (utilizes OpenSSL bindings)
  • File System Operations: OS module (for byte streams and file unlinking)

📦 Installation

To deploy the application, ensure you have Python 3 installed. Follow these setup steps:

  1. Clone the Repository

    git clone https://github.com/yourusername/secure-data-annihilator.git
    cd secure-data-annihilator
  2. Install Cryptography Dependencies Install the required cryptography package via pip:

    pip install cryptography
  3. Verify Installation Verify the installation completes cleanly by running:

    python -c "import cryptography; print('Cryptography successfully installed, v' + cryptography.__version__)"

🖥️ Usage

Running the Application

Execute the finalized GUI script:

python ZT_Finalized.py

Encryption Workflow

  1. Navigate to the ENCRYPT tab.
  2. Click Select File or Select Folder to pick the target.
  3. Select your desired settings (defaults to AES-256).
  4. Click <<< ENCRYPT >>>.
  5. You will be prompted with a choice:
    • Yes (Secure Delete): The file is encrypted, the key is immediately destroyed, and the target is securely overwritten and deleted.
    • No (Keep File): The file is encrypted in-place, and the generated base64 key is displayed in the key input box. Copy or save the key securely.

Decryption Workflow

  1. Navigate to the DECRYPT tab.
  2. Click Choose File to select the encrypted target file.
  3. Paste the base64-encoded decryption key into the Paste Key box (or click Use Last Key if the key was generated in the current session).
  4. Click DECRYPT. The file will be restored to its original plaintext format.

📐 Architecture Diagram

Below is the conceptual flow showing how GUI frames interact with core security modules and the underlying disk:

graph TD
    User([User]) <--> GUI[App Tkinter Window]
    
    subgraph GUI Screens
        GUI <--> MainFrame[Main Screen]
        GUI <--> EncryptFrame[Encryption Frame]
        GUI <--> DecryptFrame[Decryption Frame]
    end
    
    subgraph Core Logic
        EncryptFrame --> |Encrypt request| EF[encrypt_file]
        EncryptFrame --> |Delete choice| SD[secure_delete]
        DecryptFrame --> |Decrypt request| DF[decrypt_file]
    end
    
    subgraph Data Operations
        EF --> |1. Generates 32-byte Key & 16-byte IV| AES[AES-256-CBC Primitive]
        EF --> |2. Applies PKCS7 Padding| AES
        AES --> |3. Writes IV + Ciphertext| Disk[(Local Disk)]
        
        DF --> |1. Extracts 16-byte IV| AES_D[AES-256-CBC Decryptor]
        DF --> |2. Decrypts Ciphertext| AES_D
        DF --> |3. Unpads and Writes Plaintext| Disk
        
        SD --> |1. Reads File Size| OS_Ops[OS Bytes Overwrite]
        OS_Ops --> |2. Writes os.urandom stream to target path| Disk
        OS_Ops --> |3. Calls os.remove| Disk
    end
Loading

🔮 Future Enhancements

  • Robust Multi-Algorithm Support: Integrate working alternatives to the AES fallback UI placeholders.
  • Folder Key Export Engine: Implement export of multi-file keys map into a single formatted JSON catalog.
  • Automated Key Mapping: Add decryption lookup to automatically parse imported JSON key files and resolve keys based on target files.
  • Direct OS Syncing: Utilize OS flush commands (fsync) in secure delete to bypass file system caches and write directly to media.

About

Deletion of data after encryption to ensure permanent deletion of confidential data. Works on AES algorithm along with CBC encoding to prevent pattern detection.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages