# xzaxzax15-lang/ciphers_gateway architecture

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

- Interactive diagram: https://gitdiagram.com/xzaxzax15-lang/ciphers_gateway
- Repository: https://github.com/xzaxzax15-lang/ciphers_gateway

## Overview

CryptoMatrix is a local Streamlit learning app for exploring classical and modern ciphers. A user selects an algorithm, enters text or uploads a file, chooses encryption or decryption, and views or downloads the result; the README says processing stays local. The main UI coordinates the algorithm pages, while cipher implementations and shared helpers provide the internal layer. The README documents the full feature set, but unsampled portions of main.py limit certainty about individual page-to-cipher calls, so the graph shows only supported module-level relationships.

Main entry points: [`main.py`](https://github.com/xzaxzax15-lang/ciphers_gateway/blob/main/main.py) (Streamlit application), [`utils.py`](https://github.com/xzaxzax15-lang/ciphers_gateway/blob/main/utils.py) (Text and math helpers), [`ciphers/classical.py`](https://github.com/xzaxzax15-lang/ciphers_gateway/blob/main/ciphers/classical.py) (Caesar, additive, multiplicative), [`ciphers/transposition.py`](https://github.com/xzaxzax15-lang/ciphers_gateway/blob/main/ciphers/transposition.py) (Columnar, P-Box)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Application interface"]
  node_app["Streamlit application<br/>[main.py]"]
end

subgraph group_classical["Classical ciphers"]
  node_classical_cipher["Caesar, additive, multiplicative<br/>[classical.py]"]
end

subgraph group_modern["Modern ciphers"]
  node_aes["AES-GCM<br/>[AESCipher.py]"]
  node_des["DES<br/>[DES.py]"]
  node_rc4["RC4<br/>[RC4Cipher.py]"]
  node_rsa["RSA<br/>[RSAComponent.py]"]
end

subgraph group_encoding["Encoding and transposition"]
  node_binary["Binary encoding<br/>[binary.py]"]
  node_transposition["Columnar, P-Box<br/>[transposition.py]"]
end

subgraph group_shared["Shared helpers"]
  node_utils["Text and math helpers<br/>[utils.py]"]
end

node_user(("Learner"))

node_user -->|"uses"| node_app
node_app -->|"dispatches"| node_binary
node_app -->|"dispatches"| node_classical_cipher
node_app -->|"dispatches"| node_transposition
node_app -->|"dispatches"| node_aes
node_app -->|"dispatches"| node_des
node_app -->|"dispatches"| node_rc4
node_app -->|"dispatches"| node_rsa
node_classical_cipher -->|"uses"| node_utils
node_transposition -->|"uses"| node_utils
node_app -->|"references"| node_utils

click node_app "https://github.com/xzaxzax15-lang/ciphers_gateway/blob/main/main.py"
click node_binary "https://github.com/xzaxzax15-lang/ciphers_gateway/blob/main/ciphers/binary.py"
click node_classical_cipher "https://github.com/xzaxzax15-lang/ciphers_gateway/blob/main/ciphers/classical.py"
click node_transposition "https://github.com/xzaxzax15-lang/ciphers_gateway/blob/main/ciphers/transposition.py"
click node_aes "https://github.com/xzaxzax15-lang/ciphers_gateway/blob/main/ciphers/AESCipher.py"
click node_des "https://github.com/xzaxzax15-lang/ciphers_gateway/blob/main/ciphers/DES.py"
click node_rc4 "https://github.com/xzaxzax15-lang/ciphers_gateway/blob/main/ciphers/RC4Cipher.py"
click node_rsa "https://github.com/xzaxzax15-lang/ciphers_gateway/blob/main/ciphers/RSAComponent.py"
click node_utils "https://github.com/xzaxzax15-lang/ciphers_gateway/blob/main/utils.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_app toneBlue
class node_classical_cipher toneAmber
class node_aes,node_des,node_rc4,node_rsa toneMint
class node_binary,node_transposition toneRose
class node_utils,node_user toneIndigo
```

## Components

### Application interface

- [Streamlit application](https://github.com/xzaxzax15-lang/ciphers_gateway/blob/main/main.py): `main.py`

### Classical ciphers

- [Caesar, additive, multiplicative](https://github.com/xzaxzax15-lang/ciphers_gateway/blob/main/ciphers/classical.py): `ciphers/classical.py`

### Modern ciphers

- [AES-GCM](https://github.com/xzaxzax15-lang/ciphers_gateway/blob/main/ciphers/AESCipher.py): `ciphers/AESCipher.py`
- [DES](https://github.com/xzaxzax15-lang/ciphers_gateway/blob/main/ciphers/DES.py): `ciphers/DES.py`
- [RC4](https://github.com/xzaxzax15-lang/ciphers_gateway/blob/main/ciphers/RC4Cipher.py): `ciphers/RC4Cipher.py`
- [RSA](https://github.com/xzaxzax15-lang/ciphers_gateway/blob/main/ciphers/RSAComponent.py): `ciphers/RSAComponent.py`

### Encoding and transposition

- [Binary encoding](https://github.com/xzaxzax15-lang/ciphers_gateway/blob/main/ciphers/binary.py): `ciphers/binary.py`
- [Columnar, P-Box](https://github.com/xzaxzax15-lang/ciphers_gateway/blob/main/ciphers/transposition.py): `ciphers/transposition.py`

### Shared helpers

- [Text and math helpers](https://github.com/xzaxzax15-lang/ciphers_gateway/blob/main/utils.py): `utils.py`

### Other components

- **Learner**

## Connections

- Learner → Streamlit application: uses (evidence: `README.md`)
- Streamlit application → Binary encoding: dispatches (evidence: `main.py`)
- Streamlit application → Caesar, additive, multiplicative: dispatches (evidence: `main.py`)
- Streamlit application → Columnar, P-Box: dispatches (evidence: `main.py`)
- Streamlit application → AES-GCM: dispatches (evidence: `main.py`)
- Streamlit application → DES: dispatches (evidence: `main.py`)
- Streamlit application → RC4: dispatches (evidence: `main.py`)
- Streamlit application → RSA: dispatches (evidence: `main.py`)
- Caesar, additive, multiplicative → Text and math helpers: uses (evidence: `ciphers/classical.py`)
- Columnar, P-Box → Text and math helpers: uses (evidence: `ciphers/transposition.py`)
- Streamlit application → Text and math helpers: references (evidence: `main.py`)
