# vaibhavs825/image-encryption-using-aes-and-shuffing architecture

> Architecture diagram of the GitHub repository vaibhavs825/image-encryption-using-aes-and-shuffing, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vaibhavs825/image-encryption-using-aes-and-shuffing
- Repository: https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing

## Overview

This is a Python desktop image-encryption application. A user selects an image and enters a password; the application derives a key, encrypts image data with AES, and uses a modified two-share pixel scheme. Decryption combines the secret and cipher shares, then decrypts and reconstructs the image. The README documents the two encryption stages; the excerpt shows the GUI handlers and share reconstruction, but omits some intermediate calls, so those relationships are attributed to the README where appropriate.

Main entry points: [`final.py`](https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing/blob/master/final.py) (Action handlers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_gui["Tkinter GUI<br/>[final.py]"]
  node_handlers["Action handlers<br/>[final.py]"]
end

subgraph group_crypto["Image encryption"]
  node_key["Password key derivation<br/>[final.py]"]
  node_aes["AES image encryption<br/>[final.py]"]
  node_visual["Visual image encoding<br/>[final.py]"]
  node_shares["Two-share encoding<br/>[final.py]"]
  node_combine["Share reconstruction<br/>[final.py]"]
  node_aesdec["AES image decryption<br/>[final.py]"]
end

subgraph group_outputs["Image artifacts"]
  node_encrypted["Encrypted image files<br/>[final.py]"]
  node_secret["Secret share image<br/>[final.py]"]
  node_cipher["Cipher share image<br/>[final.py]"]
  node_restored["Restored image files<br/>[final.py]"]
end

node_user(("User"))

node_user -->|"uses"| node_gui
node_gui -->|"triggers"| node_handlers
node_handlers -->|"derives key"| node_key
node_handlers -->|"encrypts or decrypts"| node_aes
node_aes -->|"encodes image"| node_visual
node_visual -->|"feeds"| node_shares
node_shares -.->|"generates"| node_secret
node_shares -.->|"generates"| node_cipher
node_aes -.->|"writes"| node_encrypted
node_cipher -->|"provides share"| node_combine
node_secret -->|"provides share"| node_combine
node_combine -->|"restores image data"| node_aesdec
node_aesdec -->|"writes"| node_restored

click node_gui "https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing/blob/master/final.py"
click node_handlers "https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing/blob/master/final.py"
click node_key "https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing/blob/master/final.py"
click node_aes "https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing/blob/master/final.py"
click node_visual "https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing/blob/master/final.py"
click node_shares "https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing/blob/master/final.py"
click node_combine "https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing/blob/master/final.py"
click node_aesdec "https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing/blob/master/final.py"
click node_encrypted "https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing/blob/master/final.py"
click node_secret "https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing/blob/master/final.py"
click node_cipher "https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing/blob/master/final.py"
click node_restored "https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing/blob/master/final.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_gui,node_handlers,node_user toneBlue
class node_key,node_aes,node_visual,node_shares,node_combine,node_aesdec toneAmber
class node_encrypted,node_secret,node_cipher,node_restored toneMint
```

## Components

### Desktop interface

- [Tkinter GUI](https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing/blob/master/final.py): `final.py`
- [Action handlers](https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing/blob/master/final.py): `final.py`

### Image encryption

- [Password key derivation](https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing/blob/master/final.py): `final.py`
- [AES image encryption](https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing/blob/master/final.py): `final.py`
- [Visual image encoding](https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing/blob/master/final.py): `final.py`
- [Two-share encoding](https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing/blob/master/final.py): `final.py`
- [Share reconstruction](https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing/blob/master/final.py): `final.py`
- [AES image decryption](https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing/blob/master/final.py): `final.py`

### Image artifacts

- [Encrypted image files](https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing/blob/master/final.py): `final.py`
- [Secret share image](https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing/blob/master/final.py): `final.py`
- [Cipher share image](https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing/blob/master/final.py): `final.py`
- [Restored image files](https://github.com/vaibhavs825/image-encryption-using-aes-and-shuffing/blob/master/final.py): `final.py`

### Other components

- **User**

## Connections

- User → Tkinter GUI: uses (evidence: `README.md`)
- Tkinter GUI → Action handlers: triggers (evidence: `final.py`)
- Action handlers → Password key derivation: derives key (evidence: `final.py`)
- Action handlers → AES image encryption: encrypts or decrypts (evidence: `final.py`)
- AES image encryption → Visual image encoding: encodes image (evidence: `README.md`)
- Visual image encoding → Two-share encoding: feeds (evidence: `README.md`)
- Two-share encoding → Secret share image: generates (evidence: `final.py`)
- Two-share encoding → Cipher share image: generates (evidence: `final.py`)
- AES image encryption → Encrypted image files: writes (evidence: `final.py`)
- Cipher share image → Share reconstruction: provides share (evidence: `final.py`)
- Secret share image → Share reconstruction: provides share (evidence: `final.py`)
- Share reconstruction → AES image decryption: restores image data (evidence: `README.md`)
- AES image decryption → Restored image files: writes (evidence: `final.py`)
