# fatehali-abbasali/cipherforge-encryption-tool architecture

> Architecture diagram of the GitHub repository fatehali-abbasali/cipherforge-encryption-tool, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fatehali-abbasali/cipherforge-encryption-tool
- Repository: https://github.com/fatehali-abbasali/cipherforge-encryption-tool

## Overview

CipherForge is a cross-platform desktop application for encrypting and decrypting files and folders. The main workflow runs from the GUI through the application service and workflow orchestrator to the file or folder engines; encryption can also store a recovery key locally or on removable media. Key management and persistent settings are supporting layers. The graph follows explicit source-index references and README capabilities; several backend modules were not sampled, so uncertain connections are omitted rather than inferred.

Main entry points: [`core/app_service.py`](https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/app_service.py) (Application service), [`core/workflow.py`](https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/workflow.py) (Workflow orchestrator), [`app/gui/main_window.py`](https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/app/gui/main_window.py) (Main window), [`core/key_manager.py`](https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/key_manager.py) (Key management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gui["Desktop interface"]
  node_window["Main window<br/>[main_window.py]"]
  node_encrypt_page["Encryption page<br/>[encryption_page.py]"]
  node_decrypt_page["Decryption page<br/>[decryption_page.py]"]
  node_settings_page["Settings page<br/>[settings_page.py]"]
end

subgraph group_operations["Encryption workflow"]
  node_service["Application service<br/>[app_service.py]"]
  node_workflow["Workflow orchestrator<br/>[workflow.py]"]
  node_file_engine["File encryption<br/>[file_crypto.py]"]
  node_folder_engine["Folder encryption<br/>[folder_crypto.py]"]
  node_errors["Error handling<br/>[app_errors.py]"]
end

subgraph group_security["Cryptographic services"]
  node_key_manager["Key management<br/>[key_manager.py]"]
  node_kdf["Key derivation<br/>[kdf.py]"]
  node_crypto["Cipher primitives<br/>[crypto.py]"]
  node_container["Crypto container<br/>[container.py]"]
  node_exceptions["Crypto exceptions<br/>[exceptions.py]"]
end

subgraph group_support["Persistence and recovery"]
  node_recovery["Recovery services<br/>[recovery.py]"]
  node_storage["Recovery key storage<br/>[storage_manager.py]"]
  node_usb["Removable drives<br/>[usb_manager.py]"]
  node_config[("Settings persistence<br/>[config_manager.py]")]
  node_secure_delete["Secure deletion<br/>[secure_delete.py]"]
end

node_user(("User"))

node_user -->|"uses"| node_window
node_window -->|"shows"| node_encrypt_page
node_window -->|"shows"| node_decrypt_page
node_window -->|"shows"| node_settings_page
node_encrypt_page -->|"requests encryption"| node_service
node_decrypt_page -->|"requests decryption"| node_service
node_settings_page -->|"uses"| node_service
node_service -->|"delegates operations"| node_workflow
node_service -->|"inspects containers"| node_file_engine
node_service -->|"inspects containers"| node_folder_engine
node_service -->|"manages recovery keys"| node_storage
node_service -->|"lists drives"| node_usb
node_service -->|"loads settings"| node_config
node_service -->|"normalizes errors"| node_errors
node_workflow -->|"encrypts files"| node_file_engine
node_workflow -->|"encrypts folders"| node_folder_engine
node_workflow -->|"stores recovery keys"| node_storage
node_workflow -->|"manages keys"| node_key_manager
node_file_engine -->|"uses key envelopes"| node_key_manager
node_folder_engine -->|"uses key envelopes"| node_key_manager
node_storage -.->|"detects removable media"| node_usb
node_container -->|"uses primitives"| node_crypto
node_container -->|"raises"| node_exceptions
node_crypto -->|"raises"| node_exceptions
node_key_manager -.->|"derives keys"| node_kdf
node_user -.->|"requests recovery"| node_recovery
node_user -.->|"requests deletion"| node_secure_delete

click node_window "https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/app/gui/main_window.py"
click node_encrypt_page "https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/app/gui/encryption_page.py"
click node_decrypt_page "https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/app/gui/decryption_page.py"
click node_settings_page "https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/app/gui/settings_page.py"
click node_service "https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/app_service.py"
click node_workflow "https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/workflow.py"
click node_file_engine "https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/file_crypto.py"
click node_folder_engine "https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/folder_crypto.py"
click node_errors "https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/app_errors.py"
click node_key_manager "https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/key_manager.py"
click node_kdf "https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/kdf.py"
click node_crypto "https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/crypto.py"
click node_container "https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/container.py"
click node_exceptions "https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/exceptions.py"
click node_recovery "https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/recovery.py"
click node_storage "https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/storage_manager.py"
click node_usb "https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/usb_manager.py"
click node_config "https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/config_manager.py"
click node_secure_delete "https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/secure_delete.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_window,node_encrypt_page,node_decrypt_page,node_settings_page,node_user toneBlue
class node_service,node_workflow,node_file_engine,node_folder_engine,node_errors toneAmber
class node_key_manager,node_kdf,node_crypto,node_container,node_exceptions toneMint
class node_recovery,node_storage,node_usb,node_config,node_secure_delete toneRose
```

## Components

### Desktop interface

- [Main window](https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/app/gui/main_window.py): `app/gui/main_window.py`
- [Encryption page](https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/app/gui/encryption_page.py): `app/gui/encryption_page.py`
- [Decryption page](https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/app/gui/decryption_page.py): `app/gui/decryption_page.py`
- [Settings page](https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/app/gui/settings_page.py): `app/gui/settings_page.py`

### Encryption workflow

- [Application service](https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/app_service.py): `core/app_service.py`
- [Workflow orchestrator](https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/workflow.py): `core/workflow.py`
- [File encryption](https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/file_crypto.py): `core/file_crypto.py`
- [Folder encryption](https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/folder_crypto.py): `core/folder_crypto.py`
- [Error handling](https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/app_errors.py): `core/app_errors.py`

### Cryptographic services

- [Key management](https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/key_manager.py): `core/key_manager.py`
- [Key derivation](https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/kdf.py): `core/kdf.py`
- [Cipher primitives](https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/crypto.py): `core/crypto.py`
- [Crypto container](https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/container.py): `core/container.py`
- [Crypto exceptions](https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/exceptions.py): `core/exceptions.py`

### Persistence and recovery

- [Recovery services](https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/recovery.py): `core/recovery.py`
- [Recovery key storage](https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/storage_manager.py): `core/storage_manager.py`
- [Removable drives](https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/usb_manager.py): `core/usb_manager.py`
- [Settings persistence](https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/config_manager.py): `core/config_manager.py`
- [Secure deletion](https://github.com/fatehali-abbasali/cipherforge-encryption-tool/blob/main/core/secure_delete.py): `core/secure_delete.py`

### Other components

- **User**

## Connections

- User → Main window: uses (evidence: `README.md`)
- Main window → Encryption page: shows (evidence: `app/gui/main_window.py`)
- Main window → Decryption page: shows (evidence: `app/gui/main_window.py`)
- Main window → Settings page: shows (evidence: `app/gui/main_window.py`)
- Encryption page → Application service: requests encryption (evidence: `app/gui/encryption_page.py`)
- Decryption page → Application service: requests decryption (evidence: `app/gui/decryption_page.py`)
- Settings page → Application service: uses (evidence: `app/gui/settings_page.py`)
- Application service → Workflow orchestrator: delegates operations (evidence: `core/app_service.py`)
- Application service → File encryption: inspects containers (evidence: `core/app_service.py`)
- Application service → Folder encryption: inspects containers (evidence: `core/app_service.py`)
- Application service → Recovery key storage: manages recovery keys (evidence: `core/app_service.py`)
- Application service → Removable drives: lists drives (evidence: `core/app_service.py`)
- Application service → Settings persistence: loads settings (evidence: `core/app_service.py`)
- Application service → Error handling: normalizes errors (evidence: `core/app_service.py`)
- Workflow orchestrator → File encryption: encrypts files (evidence: `core/workflow.py`)
- Workflow orchestrator → Folder encryption: encrypts folders (evidence: `core/workflow.py`)
- Workflow orchestrator → Recovery key storage: stores recovery keys (evidence: `core/workflow.py`)
- Workflow orchestrator → Key management: manages keys (evidence: `core/workflow.py`)
- File encryption → Key management: uses key envelopes (evidence: `core/file_crypto.py`)
- Folder encryption → Key management: uses key envelopes (evidence: `core/folder_crypto.py`)
- Recovery key storage → Removable drives: detects removable media
- Crypto container → Cipher primitives: uses primitives (evidence: `core/container.py`)
- Crypto container → Crypto exceptions: raises (evidence: `core/container.py`)
- Cipher primitives → Crypto exceptions: raises (evidence: `core/crypto.py`)
- Key management → Key derivation: derives keys
- User → Recovery services: requests recovery (evidence: `README.md`)
- User → Secure deletion: requests deletion
