# partoneoftwo/luksus architecture

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

- Interactive diagram: https://gitdiagram.com/partoneoftwo/luksus
- Repository: https://github.com/partoneoftwo/luksus

## Overview

LUKSUS is a terminal menu frontend for encrypting storage media and individual files with platform encryption tools. The documented media workflow is destructive wiping, random-data writing, keyfile creation, encryption, and (for LUKS) header backup in /keys. The README identifies main() as the program entry and says it reuses functions and variables. Source excerpts were unavailable, so links are limited to documented behavior; detailed menu and engine dispatch are not inferred.

Main entry points: [`LUKSUS`](https://github.com/partoneoftwo/luksus/blob/master/LUKSUS) (LUKSUS main), [`LUKSUS.functions`](https://github.com/partoneoftwo/luksus/blob/master/LUKSUS.functions) (Reusable functions), [`LUKSUS.variables`](https://github.com/partoneoftwo/luksus/blob/master/LUKSUS.variables) (Shared variables), [`LUKSUS.gnupgp`](https://github.com/partoneoftwo/luksus/blob/master/LUKSUS.gnupgp) (GNU Privacy Guard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Menu and shared code"]
  node_main["LUKSUS main"]
  node_functions["Reusable functions<br/>[LUKSUS.functions]"]
  node_variables["Shared variables<br/>[LUKSUS.variables]"]
end

subgraph group_media["Encrypted media workflow"]
  node_wipe["Wipe existing data"]
  node_randomize["Write random data"]
  node_keyfile["Create keyfile"]
  node_encryptmedia["Encrypt media"]
  node_keydir[("/keys storage")]
  node_header["LUKS header backup"]
end

subgraph group_files["File encryption"]
  node_gnupgp["GNU Privacy Guard<br/>[LUKSUS.gnupgp]"]
  node_openssl["OpenSSL<br/>[LUKSUS.openssl]"]
end

node_user(("Operator"))
node_dialog["dialog"]
node_cryptsetup["cryptsetup / LUKS"]
node_tcplay["tcplay / TrueCrypt"]
node_geli["geli"]
node_shred["shred"]

node_user -->|"runs"| node_main
node_main -->|"presents menus"| node_dialog
node_main -->|"reuses"| node_functions
node_main -->|"uses"| node_variables
node_main -->|"performs"| node_wipe
node_wipe -->|"uses"| node_shred
node_main -->|"performs"| node_randomize
node_main -->|"creates"| node_keyfile
node_main -->|"performs"| node_encryptmedia
node_encryptmedia -->|"uses"| node_cryptsetup
node_encryptmedia -->|"uses"| node_tcplay
node_encryptmedia -->|"uses"| node_geli
node_keyfile -->|"stores in"| node_keydir
node_main -->|"backs up"| node_header
node_header -->|"stores in"| node_keydir
node_main -->|"supports file encryption"| node_gnupgp
node_main -->|"supports file encryption"| node_openssl

click node_main "https://github.com/partoneoftwo/luksus/blob/master/LUKSUS"
click node_functions "https://github.com/partoneoftwo/luksus/blob/master/LUKSUS.functions"
click node_variables "https://github.com/partoneoftwo/luksus/blob/master/LUKSUS.variables"
click node_wipe "https://github.com/partoneoftwo/luksus/blob/master/LUKSUS"
click node_randomize "https://github.com/partoneoftwo/luksus/blob/master/LUKSUS"
click node_keyfile "https://github.com/partoneoftwo/luksus/blob/master/LUKSUS"
click node_encryptmedia "https://github.com/partoneoftwo/luksus/blob/master/LUKSUS"
click node_header "https://github.com/partoneoftwo/luksus/blob/master/LUKSUS"
click node_gnupgp "https://github.com/partoneoftwo/luksus/blob/master/LUKSUS.gnupgp"
click node_openssl "https://github.com/partoneoftwo/luksus/blob/master/LUKSUS.openssl"

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_main,node_functions,node_variables toneBlue
class node_wipe,node_randomize,node_keyfile,node_encryptmedia,node_keydir,node_header toneAmber
class node_gnupgp,node_openssl toneMint
class node_user,node_dialog,node_cryptsetup,node_tcplay,node_geli,node_shred toneIndigo
```

## Components

### Menu and shared code

- [LUKSUS main](https://github.com/partoneoftwo/luksus/blob/master/LUKSUS): `LUKSUS`
- [Reusable functions](https://github.com/partoneoftwo/luksus/blob/master/LUKSUS.functions): `LUKSUS.functions`
- [Shared variables](https://github.com/partoneoftwo/luksus/blob/master/LUKSUS.variables): `LUKSUS.variables`

### Encrypted media workflow

- [Wipe existing data](https://github.com/partoneoftwo/luksus/blob/master/LUKSUS): `LUKSUS`
- [Write random data](https://github.com/partoneoftwo/luksus/blob/master/LUKSUS): `LUKSUS`
- [Create keyfile](https://github.com/partoneoftwo/luksus/blob/master/LUKSUS): `LUKSUS`
- [Encrypt media](https://github.com/partoneoftwo/luksus/blob/master/LUKSUS): `LUKSUS`
- **/keys storage**
- [LUKS header backup](https://github.com/partoneoftwo/luksus/blob/master/LUKSUS): `LUKSUS`

### File encryption

- [GNU Privacy Guard](https://github.com/partoneoftwo/luksus/blob/master/LUKSUS.gnupgp): `LUKSUS.gnupgp`
- [OpenSSL](https://github.com/partoneoftwo/luksus/blob/master/LUKSUS.openssl): `LUKSUS.openssl`

### Other components

- **Operator**
- **dialog**
- **cryptsetup / LUKS**
- **tcplay / TrueCrypt**
- **geli**
- **shred**

## Connections

- Operator → LUKSUS main: runs
- LUKSUS main → dialog: presents menus
- LUKSUS main → Reusable functions: reuses
- LUKSUS main → Shared variables: uses
- LUKSUS main → Wipe existing data: performs
- Wipe existing data → shred: uses
- LUKSUS main → Write random data: performs
- LUKSUS main → Create keyfile: creates
- LUKSUS main → Encrypt media: performs
- Encrypt media → cryptsetup / LUKS: uses
- Encrypt media → tcplay / TrueCrypt: uses
- Encrypt media → geli: uses
- Create keyfile → /keys storage: stores in
- LUKSUS main → LUKS header backup: backs up
- LUKS header backup → /keys storage: stores in
- LUKSUS main → GNU Privacy Guard: supports file encryption
- LUKSUS main → OpenSSL: supports file encryption
