# fl0l0u/decbackup-py architecture

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

- Interactive diagram: https://gitdiagram.com/fl0l0u/decbackup-py
- Repository: https://github.com/fl0l0u/decbackup-py

## Overview

decbackup-py is a small command-line utility that decrypts Stormshield backup files. The workflow is CLI arguments → open the input backup → parse its header and derive a key → decrypt and unpad the payload → write the output archive. The decryption implementation is shown in decbackup.py; no separate storage or service layer is present.

Main entry points: [`decbackup.py`](https://github.com/fl0l0u/decbackup-py/blob/master/decbackup.py) (Backup decryptor)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_cli["CLI entry<br/>[decbackup.py]"]
node_input["Backup file"]
node_decrypt["Backup decryptor<br/>[decbackup.py]"]
node_parser["Header parser<br/>[decbackup.py]"]
node_key["Key derivation<br/>[decbackup.py]"]
node_crypto["Crypto primitives"]
node_output["Decrypted archive"]

node_user -->|"provides arguments"| node_cli
node_cli -->|"opens"| node_input
node_cli -->|"calls"| node_decrypt
node_decrypt -->|"parses header"| node_parser
node_decrypt -->|"derives key"| node_key
node_key -->|"uses PBKDF2"| node_crypto
node_decrypt -->|"decrypts and unpads"| node_crypto
node_decrypt -->|"reads payload"| node_input
node_decrypt -->|"writes plaintext"| node_output

click node_cli "https://github.com/fl0l0u/decbackup-py/blob/master/decbackup.py"
click node_decrypt "https://github.com/fl0l0u/decbackup-py/blob/master/decbackup.py"
click node_parser "https://github.com/fl0l0u/decbackup-py/blob/master/decbackup.py"
click node_key "https://github.com/fl0l0u/decbackup-py/blob/master/decbackup.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_user toneBlue
class node_cli,node_decrypt,node_parser,node_key toneTeal
class node_input,node_crypto,node_output toneIndigo
```

## Components

### Other components

- **User**
- [CLI entry](https://github.com/fl0l0u/decbackup-py/blob/master/decbackup.py): `decbackup.py`
- **Backup file**
- [Backup decryptor](https://github.com/fl0l0u/decbackup-py/blob/master/decbackup.py): `decbackup.py`
- [Header parser](https://github.com/fl0l0u/decbackup-py/blob/master/decbackup.py): `decbackup.py`
- [Key derivation](https://github.com/fl0l0u/decbackup-py/blob/master/decbackup.py): `decbackup.py`
- **Crypto primitives**
- **Decrypted archive**

## Connections

- User → CLI entry: provides arguments (evidence: `README.md`)
- CLI entry → Backup file: opens (evidence: `decbackup.py`)
- CLI entry → Backup decryptor: calls (evidence: `decbackup.py`)
- Backup decryptor → Header parser: parses header (evidence: `decbackup.py`)
- Backup decryptor → Key derivation: derives key (evidence: `decbackup.py`)
- Key derivation → Crypto primitives: uses PBKDF2 (evidence: `decbackup.py`)
- Backup decryptor → Crypto primitives: decrypts and unpads (evidence: `decbackup.py`)
- Backup decryptor → Backup file: reads payload (evidence: `decbackup.py`)
- Backup decryptor → Decrypted archive: writes plaintext (evidence: `decbackup.py`)
