# randomlinoge/openpgp-quantum-guard architecture

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

- Interactive diagram: https://gitdiagram.com/randomlinoge/openpgp-quantum-guard
- Repository: https://github.com/randomlinoge/openpgp-quantum-guard

## Overview

OpenPGP Quantum Guard is an experimental PowerShell operator console that orchestrates GnuPG for file and text protection; it does not implement cryptography itself. The documented operator workflow is to check the local GnuPG setup, select or generate a lab key, choose an encryption profile, encrypt and decrypt a test file, then compare hashes. The README documents these capabilities, but no source excerpts were provided, so the graph uses only README-supported relationships; several responsibilities share the single application script.

Main entry points: [`src/OpenPGP-Quantum-Guard.ps1`](https://github.com/randomlinoge/openpgp-quantum-guard/blob/main/src/OpenPGP-Quantum-Guard.ps1) (PowerShell console), [`config/openpgp_quantum_guard.config.example.json`](https://github.com/randomlinoge/openpgp-quantum-guard/blob/main/config/openpgp_quantum_guard.config.example.json) (Example configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_console["Operator console"]
  node_console_app["PowerShell console"]
  node_setup_doctor["Setup doctor"]
  node_configuration["Example configuration"]
end

subgraph group_keys["Identity and profiles"]
  node_identity["Key selection"]
  node_key_generation["Key generation"]
  node_profiles["Encryption profiles"]
  node_pqc_policy["PQC enforcement"]
end

subgraph group_protection["Protection workflow"]
  node_file_text["File and text protection"]
  node_decrypt["Decryption"]
  node_integrity["Hash comparison"]
end

node_operator(("Operator"))
node_gnupg["GnuPG"]

node_operator -->|"runs"| node_console_app
node_operator -->|"opens"| node_setup_doctor
node_console_app -->|"uses settings"| node_configuration
node_operator -->|"selects key"| node_identity
node_operator -->|"generates key"| node_key_generation
node_operator -->|"chooses profile"| node_profiles
node_operator -->|"requests encryption"| node_file_text
node_operator -->|"requests decryption"| node_decrypt
node_operator -->|"compares hashes"| node_integrity
node_setup_doctor -->|"checks setup"| node_gnupg
node_file_text -->|"delegates encryption"| node_gnupg
node_decrypt -->|"delegates decryption"| node_gnupg
node_pqc_policy -->|"adds policy"| node_gnupg

click node_console_app "https://github.com/randomlinoge/openpgp-quantum-guard/blob/main/src/OpenPGP-Quantum-Guard.ps1"
click node_setup_doctor "https://github.com/randomlinoge/openpgp-quantum-guard/blob/main/src/OpenPGP-Quantum-Guard.ps1"
click node_configuration "https://github.com/randomlinoge/openpgp-quantum-guard/blob/main/config/openpgp_quantum_guard.config.example.json"
click node_identity "https://github.com/randomlinoge/openpgp-quantum-guard/blob/main/src/OpenPGP-Quantum-Guard.ps1"
click node_key_generation "https://github.com/randomlinoge/openpgp-quantum-guard/blob/main/src/OpenPGP-Quantum-Guard.ps1"
click node_profiles "https://github.com/randomlinoge/openpgp-quantum-guard/blob/main/src/OpenPGP-Quantum-Guard.ps1"
click node_pqc_policy "https://github.com/randomlinoge/openpgp-quantum-guard/blob/main/src/OpenPGP-Quantum-Guard.ps1"
click node_file_text "https://github.com/randomlinoge/openpgp-quantum-guard/blob/main/src/OpenPGP-Quantum-Guard.ps1"
click node_decrypt "https://github.com/randomlinoge/openpgp-quantum-guard/blob/main/src/OpenPGP-Quantum-Guard.ps1"
click node_integrity "https://github.com/randomlinoge/openpgp-quantum-guard/blob/main/src/OpenPGP-Quantum-Guard.ps1"

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_console_app,node_setup_doctor,node_configuration toneBlue
class node_identity,node_key_generation,node_profiles,node_pqc_policy toneAmber
class node_file_text,node_decrypt,node_integrity toneMint
class node_operator,node_gnupg toneIndigo
```

## Components

### Operator console

- [PowerShell console](https://github.com/randomlinoge/openpgp-quantum-guard/blob/main/src/OpenPGP-Quantum-Guard.ps1): `src/OpenPGP-Quantum-Guard.ps1`
- [Setup doctor](https://github.com/randomlinoge/openpgp-quantum-guard/blob/main/src/OpenPGP-Quantum-Guard.ps1): `src/OpenPGP-Quantum-Guard.ps1`
- [Example configuration](https://github.com/randomlinoge/openpgp-quantum-guard/blob/main/config/openpgp_quantum_guard.config.example.json): `config/openpgp_quantum_guard.config.example.json`

### Identity and profiles

- [Key selection](https://github.com/randomlinoge/openpgp-quantum-guard/blob/main/src/OpenPGP-Quantum-Guard.ps1): `src/OpenPGP-Quantum-Guard.ps1`
- [Key generation](https://github.com/randomlinoge/openpgp-quantum-guard/blob/main/src/OpenPGP-Quantum-Guard.ps1): `src/OpenPGP-Quantum-Guard.ps1`
- [Encryption profiles](https://github.com/randomlinoge/openpgp-quantum-guard/blob/main/src/OpenPGP-Quantum-Guard.ps1): `src/OpenPGP-Quantum-Guard.ps1`
- [PQC enforcement](https://github.com/randomlinoge/openpgp-quantum-guard/blob/main/src/OpenPGP-Quantum-Guard.ps1): `src/OpenPGP-Quantum-Guard.ps1`

### Protection workflow

- [File and text protection](https://github.com/randomlinoge/openpgp-quantum-guard/blob/main/src/OpenPGP-Quantum-Guard.ps1): `src/OpenPGP-Quantum-Guard.ps1`
- [Decryption](https://github.com/randomlinoge/openpgp-quantum-guard/blob/main/src/OpenPGP-Quantum-Guard.ps1): `src/OpenPGP-Quantum-Guard.ps1`
- [Hash comparison](https://github.com/randomlinoge/openpgp-quantum-guard/blob/main/src/OpenPGP-Quantum-Guard.ps1): `src/OpenPGP-Quantum-Guard.ps1`

### Other components

- **Operator**
- **GnuPG**

## Connections

- Operator → PowerShell console: runs (evidence: `README.md`)
- Operator → Setup doctor: opens (evidence: `README.md`)
- PowerShell console → Example configuration: uses settings (evidence: `README.md`)
- Operator → Key selection: selects key (evidence: `README.md`)
- Operator → Key generation: generates key (evidence: `README.md`)
- Operator → Encryption profiles: chooses profile (evidence: `README.md`)
- Operator → File and text protection: requests encryption (evidence: `README.md`)
- Operator → Decryption: requests decryption (evidence: `README.md`)
- Operator → Hash comparison: compares hashes (evidence: `README.md`)
- Setup doctor → GnuPG: checks setup (evidence: `README.md`)
- File and text protection → GnuPG: delegates encryption (evidence: `README.md`)
- Decryption → GnuPG: delegates decryption (evidence: `README.md`)
- PQC enforcement → GnuPG: adds policy (evidence: `README.md`)
