# developingalex/fde architecture

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

- Interactive diagram: https://gitdiagram.com/developingalex/fde
- Repository: https://github.com/developingalex/fde

## Overview

1. This repository is a very small Python codebase centered on one problem: improving Linux full-disk encryption unlock flows. The README suggests the project is meant to sit around the disk-encryption boundary rather than implement encryption itself.

2. The architecture is organized around authentication strategies. The key files are `auth_base.py`, `auth_password.py`, and `auth_gpg.py`, which strongly indicates a shared authentication interface plus two concrete implementations.

3. `auth_base.py` is the abstraction layer. Its job is likely to define the common contract that the rest of the system uses to obtain or validate an unlock secret, keeping the caller independent of how authentication is performed.

4. `auth_password.py` is the direct-secret path. This module represents the simplest flow: a user enters a passphrase, and that secret is passed through the common auth interface to unlock or derive the encryption credential.

5. `auth_gpg.py` is the key-based path. This module likely uses GPG as an external trust mechanism, meaning the unlock secret is protected by a private key or decrypted through a GPG-mediated process instead of being typed directly as the disk passphrase.

6. The main boundary in the system is between the authentication layer and the Linux encryption subsystem. The repo appears to supply the secret-handling logic, while the OS or boot-time encryption tooling performs the actual disk unlock.

7. `requirements.txt` is the dependency boundary. Since the repository is Python-based and deals with GPG/password auth, external packages probably provide the crypto, GPG, or system integration primitives needed by the auth modules.

8. Data flow is likely: user or local key material enters through one of the auth modules, the shared base API normalizes that interaction, and the resulting secret is handed off to the disk-encryption unlock path. That makes the auth modules the only meaningful interchangeable component in the repo.

9. There is no visible application server, database, or UI layer in the tree. Architecturally, this looks more like a small library or boot-time helper than a full product, with all behavior concentrated in a few focused modules.

10. For an architecture diagram, the clearest depiction is: Linux full-disk encryption at the center, with a Python auth layer above it, split into password-based and GPG-based strategies, and a shared base module coordinating the interface between them.

Main entry points: [`auth_password.py`](https://github.com/developingalex/fde/blob/master/auth_password.py) (Password auth), [`auth_gpg.py`](https://github.com/developingalex/fde/blob/master/auth_gpg.py) (GPG auth), [`requirements.txt`](https://github.com/developingalex/fde/blob/master/requirements.txt) (Python deps), [`auth_base.py`](https://github.com/developingalex/fde/blob/master/auth_base.py) (Auth base)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_auth["Auth layer"]
  node_auth_base["Auth base<br/>interface<br/>[auth_base.py]"]
  node_auth_password["Password auth<br/>strategy<br/>[auth_password.py]"]
  node_auth_gpg["GPG auth<br/>strategy<br/>[auth_gpg.py]"]
end

node_fde[("Linux FDE<br/>unlock target")]
node_deps["Python deps<br/>dependency boundary<br/>[requirements.txt]"]
node_user_secret(("Secret input<br/>user/key material"))

node_auth_base -->|"defines contract"| node_auth_password
node_auth_base -->|"defines contract"| node_auth_gpg
node_user_secret -->|"enters"| node_auth_password
node_user_secret -->|"unlocks"| node_auth_gpg
node_auth_password -->|"provides secret"| node_fde
node_auth_gpg -->|"provides secret"| node_fde
node_deps -.->|"supports"| node_auth_base
node_deps -.->|"supports"| node_auth_password
node_deps -.->|"supports"| node_auth_gpg

click node_auth_base "https://github.com/developingalex/fde/blob/master/auth_base.py"
click node_auth_password "https://github.com/developingalex/fde/blob/master/auth_password.py"
click node_auth_gpg "https://github.com/developingalex/fde/blob/master/auth_gpg.py"
click node_deps "https://github.com/developingalex/fde/blob/master/requirements.txt"

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_auth_base,node_auth_password,node_auth_gpg toneBlue
class node_fde,node_deps,node_user_secret toneNeutral
```

## Components

### Auth layer

Shared unlock-secret interface and strategy implementations

- [Auth base](https://github.com/developingalex/fde/blob/master/auth_base.py): interface · Common authentication contract used by unlock flows · `auth_base.py`
- [Password auth](https://github.com/developingalex/fde/blob/master/auth_password.py): strategy · Direct passphrase-based unlock path · `auth_password.py`
- [GPG auth](https://github.com/developingalex/fde/blob/master/auth_gpg.py): strategy · Key-mediated unlock path using GPG · `auth_gpg.py`

### Other components

- **Linux FDE**: unlock target · Disk-encryption boundary that consumes the unlock secret
- [Python deps](https://github.com/developingalex/fde/blob/master/requirements.txt): dependency boundary · External packages required by the authentication helpers · `requirements.txt`
- **Secret input**: user/key material · User-entered passphrase or GPG-protected key material

## Connections

- Auth base → Password auth: defines contract · Password flow implements the shared authentication interface
- Auth base → GPG auth: defines contract · GPG flow implements the shared authentication interface
- Secret input → Password auth: enters · A typed passphrase is handled by the password strategy
- Secret input → GPG auth: unlocks · Protected key material is handled by the GPG strategy
- Password auth → Linux FDE: provides secret · Passphrase output is handed to the disk-unlock boundary
- GPG auth → Linux FDE: provides secret · Decrypted secret is handed to the disk-unlock boundary
- Python deps → Auth base: supports · Python dependencies enable the auth abstraction
- Python deps → Password auth: supports · Runtime packages support the password flow
- Python deps → GPG auth: supports · Runtime packages support the GPG flow
