# yahyabennani/opensslite architecture

> Architecture diagram of the GitHub repository yahyabennani/opensslite, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yahyabennani/opensslite
- Repository: https://github.com/yahyabennani/opensslite

## Overview

##### Project type and purpose
- OpenSSLite is an interactive, Bash-based command-line utility that wraps and orchestrates the OpenSSL binary to provide high-level cryptographic operations.
- It targets users who need to automate common PKI tasks (CA hierarchy, cert generation/verification), symmetric/asymmetric encryption, encoding/decoding, hashing, signing, and secure “vault” storage of keys and certs.

##### File structure
- Top-level script: `opensslite.sh` (entry point / CLI front-end).
- Feature modules (each directory corresponds to one major capability):
- `pki/` – PKI hierarchy creation and X.509 certificate management
- `genekey/` – key‐pair generation scripts
- `signature/` – digital signature generation & verification
- `chiffrement/` & `dechiffrement/` – symmetric encryption & decryption
- `aschiffrement/` & `desaschiffrement/` – asymmetric (public-key) encryption/decryption
- `hash/` – hashing (MD5, SHA*, etc.)
- `autres/` – encoding/decoding (Base64, Hex, URL, etc.)
- `cadena/` – random number/string generation
- `coffre/` (with `coffre/test/`) – secure file‐system “vault” for keys, certs, signatures, ciphertext
- `requirement/` & `project/` – build/install instructions and project metadata
- There are no web or DB servers—this is purely a CLI + file-system tool.

##### README for additional insights
- Confirms core functional pillars: PKI, vault, encoding, symmetric/asymmetric crypto, hashing, signing.
- Clarifies the reliance on the OpenSSL binary (`openssl`) as an external service.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% UI Layer
    subgraph "UI Layer"
        User(("User")):::actor
        CLI["opensslite.sh (CLI Front-End)"]:::module
    end

    %% Application Layer
    subgraph "Application Layer"
        Parser["Command Parser & Dispatcher"]:::module

        subgraph "Feature Modules"
            PKI["pki/"]:::module
            GenKey["genekey/"]:::module
            Chiffrement["chiffrement/"]:::module
            Dechiffrement["dechiffrement/"]:::module
            AsChiff["aschiffrement/"]:::module
            DeAsChiff["desaschiffrement/"]:::module
            Signature["signature/"]:::module
            Hash["hash/"]:::module
            Autres["autres/"]:::module
            Cadena["cadena/"]:::module
        end

        VaultMgr["coffre/"]:::module
        VaultTest["coffre/test/"]:::module
        Requirement["requirement/"]:::module
        ProjectMeta["project/"]:::module
    end

    %% Infrastructure Layer
    subgraph "Infrastructure Layer"
        OpenSSL["OpenSSL binary"]:::external
        FileSys["File System (Vault Storage)"]:::storage
    end

    %% Connections
    User -->|"issues commands"| CLI
    CLI -->|"parses arguments"| Parser

    Parser --> PKI
    Parser --> GenKey
    Parser --> Chiffrement
    Parser --> Dechiffrement
    Parser --> AsChiff
    Parser --> DeAsChiff
    Parser --> Signature
    Parser --> Hash
    Parser --> Autres
    Parser --> Cadena
    Parser --> VaultMgr
    Parser --> Requirement
    Parser --> ProjectMeta

    %% Control flow to OpenSSL
    PKI -->|"invokes openssl"| OpenSSL
    GenKey -->|"invokes openssl"| OpenSSL
    Chiffrement -->|"invokes openssl"| OpenSSL
    Dechiffrement -->|"invokes openssl"| OpenSSL
    AsChiff -->|"invokes openssl"| OpenSSL
    DeAsChiff -->|"invokes openssl"| OpenSSL
    Signature -->|"invokes openssl"| OpenSSL
    Hash -->|"invokes openssl"| OpenSSL
    Autres -->|"invokes openssl"| OpenSSL
    Cadena -->|"invokes openssl"| OpenSSL

    %% Data storage interactions
    PKI -.-> VaultMgr
    GenKey -.-> VaultMgr
    Chiffrement -.-> VaultMgr
    Dechiffrement -.-> VaultMgr
    AsChiff -.-> VaultMgr
    DeAsChiff -.-> VaultMgr
    Signature -.-> VaultMgr
    Hash -.-> VaultMgr
    Autres -.-> VaultMgr
    Cadena -.-> VaultMgr

    VaultMgr -->|"stores/retrieves"| FileSys
    VaultTest -.-> VaultMgr

    %% Click Events
    click CLI "https://github.com/yahyabennani/opensslite/blob/main/opensslite.sh"
    click PKI "https://github.com/yahyabennani/opensslite/tree/main/pki/"
    click GenKey "https://github.com/yahyabennani/opensslite/tree/main/genekey/"
    click Chiffrement "https://github.com/yahyabennani/opensslite/tree/main/chiffrement/"
    click Dechiffrement "https://github.com/yahyabennani/opensslite/tree/main/dechiffrement/"
    click AsChiff "https://github.com/yahyabennani/opensslite/tree/main/aschiffrement/"
    click DeAsChiff "https://github.com/yahyabennani/opensslite/tree/main/desaschiffrement/"
    click Signature "https://github.com/yahyabennani/opensslite/tree/main/signature/"
    click Hash "https://github.com/yahyabennani/opensslite/tree/main/hash/"
    click Autres "https://github.com/yahyabennani/opensslite/tree/main/autres/"
    click Cadena "https://github.com/yahyabennani/opensslite/tree/main/cadena/"
    click VaultMgr "https://github.com/yahyabennani/opensslite/tree/main/coffre/"
    click VaultTest "https://github.com/yahyabennani/opensslite/tree/main/coffre/test/"
    click Requirement "https://github.com/yahyabennani/opensslite/tree/main/requirement/"
    click ProjectMeta "https://github.com/yahyabennani/opensslite/tree/main/project/"

    %% Styles
    classDef actor fill:#e3fcec,stroke:#2b8a3e,stroke-width:2px;
    classDef module fill:#cfe2f3,stroke:#2b65ec,stroke-width:2px;
    classDef external fill:#fddcbe,stroke:#e38d07,stroke-width:2px,stroke-dasharray: 5 5;
    classDef storage fill:#d3d3d3,stroke:#888888,stroke-width:2px,stroke-dasharray: 5 5;
```
