# thanhnghiatechie/aes-gcm architecture

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

- Interactive diagram: https://gitdiagram.com/thanhnghiatechie/aes-gcm
- Repository: https://github.com/thanhnghiatechie/aes-gcm

## Overview

This repository is a CBTC AES-GCM benchmarking project, with benchmark applications, a crypto API, and result-analysis tooling. The sampled source shows a standalone PSA AES-GCM smoke test and the public crypto API, but most benchmark, message, statistics, platform, timer, and analysis implementations were not sampled. The README is empty, so the graph preserves capabilities indicated by the tree without guessing their runtime wiring.

Main entry points: [`cbtc-aesgcm-bench/apps/smoke_psa.c`](https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/apps/smoke_psa.c) (PSA smoke test), [`cbtc-aesgcm-bench/apps/bench_micro.c`](https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/apps/bench_micro.c) (Microbenchmark), [`cbtc-aesgcm-bench/apps/bench_sweep.c`](https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/apps/bench_sweep.c) (Parameter sweep), [`cbtc-aesgcm-bench/apps/bench_breakdown.c`](https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/apps/bench_breakdown.c) (Timing breakdown)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_bench["Benchmark runs"]
  node_micro["Microbenchmark<br/>[bench_micro.c]"]
  node_sweep["Parameter sweep<br/>[bench_sweep.c]"]
  node_breakdown["Timing breakdown<br/>[bench_breakdown.c]"]
  node_leak["Leak benchmark<br/>[bench_leak.c]"]
  node_sender["Zero-copy sender<br/>[zc_sender.c]"]
  node_receiver["VOBC receiver<br/>[vobc_receiver.c]"]
  node_smoke["PSA smoke test<br/>[smoke_psa.c]"]
end

subgraph group_crypto["Crypto core"]
  node_crypto_api["Crypto API<br/>[ma_crypto.h]"]
  node_openssl["OpenSSL backend<br/>[crypto_openssl.c]"]
  node_psa_backend["Mbed TLS PSA backend"]
  node_ascon["Ascon placeholder<br/>[crypto_ascon.c]"]
  node_message["Message handling<br/>[ma_msg.c]"]
  node_stats["Statistics<br/>[ma_stats.c]"]
  node_platform["Linux platform<br/>[platform_linux.c]"]
  node_timer["POSIX timer<br/>[timer_posix.c]"]
end

subgraph group_analysis["Result analysis"]
  node_analyze["Analyze results<br/>[analyze.py]"]
  node_compare["Paper comparison"]
  node_plots["Plot results<br/>[plots.py]"]
  node_results["Result artifacts"]
  node_tables["Table artifacts"]
end

node_operator(("Benchmark operator"))
node_psa["PSA Crypto"]

node_operator -->|"runs"| node_micro
node_operator -->|"runs"| node_sweep
node_operator -->|"runs"| node_breakdown
node_operator -->|"runs"| node_leak
node_operator -->|"runs"| node_sender
node_operator -->|"runs"| node_receiver
node_operator -->|"runs"| node_smoke
node_smoke -->|"calls"| node_psa

click node_micro "https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/apps/bench_micro.c"
click node_sweep "https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/apps/bench_sweep.c"
click node_breakdown "https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/apps/bench_breakdown.c"
click node_leak "https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/apps/bench_leak.c"
click node_sender "https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/apps/zc_sender.c"
click node_receiver "https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/apps/vobc_receiver.c"
click node_smoke "https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/apps/smoke_psa.c"
click node_crypto_api "https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/include/ma_crypto.h"
click node_openssl "https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/src/crypto/crypto_openssl.c"
click node_psa_backend "https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/src/crypto/crypto_mbedtls_psa.c"
click node_ascon "https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/src/crypto/crypto_ascon.c"
click node_message "https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/src/ma_msg.c"
click node_stats "https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/src/ma_stats.c"
click node_platform "https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/src/platform/platform_linux.c"
click node_timer "https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/src/timer/timer_posix.c"
click node_analyze "https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/scripts/analyze.py"
click node_compare "https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/scripts/compare_with_paper.py"
click node_plots "https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/scripts/plots.py"
click node_results "https://github.com/thanhnghiatechie/aes-gcm/tree/main/cbtc-aesgcm-bench/results"
click node_tables "https://github.com/thanhnghiatechie/aes-gcm/tree/main/cbtc-aesgcm-bench/tables"

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_micro,node_sweep,node_breakdown,node_leak,node_sender,node_receiver,node_smoke toneBlue
class node_crypto_api,node_openssl,node_psa_backend,node_ascon,node_message,node_stats,node_platform,node_timer toneAmber
class node_analyze,node_compare,node_plots,node_results,node_tables toneMint
class node_operator,node_psa toneIndigo
```

## Components

### Benchmark runs

- [Microbenchmark](https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/apps/bench_micro.c): `cbtc-aesgcm-bench/apps/bench_micro.c`
- [Parameter sweep](https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/apps/bench_sweep.c): `cbtc-aesgcm-bench/apps/bench_sweep.c`
- [Timing breakdown](https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/apps/bench_breakdown.c): `cbtc-aesgcm-bench/apps/bench_breakdown.c`
- [Leak benchmark](https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/apps/bench_leak.c): `cbtc-aesgcm-bench/apps/bench_leak.c`
- [Zero-copy sender](https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/apps/zc_sender.c): `cbtc-aesgcm-bench/apps/zc_sender.c`
- [VOBC receiver](https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/apps/vobc_receiver.c): `cbtc-aesgcm-bench/apps/vobc_receiver.c`
- [PSA smoke test](https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/apps/smoke_psa.c): `cbtc-aesgcm-bench/apps/smoke_psa.c`

### Crypto core

- [Crypto API](https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/include/ma_crypto.h): `cbtc-aesgcm-bench/include/ma_crypto.h`
- [OpenSSL backend](https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/src/crypto/crypto_openssl.c): `cbtc-aesgcm-bench/src/crypto/crypto_openssl.c`
- [Mbed TLS PSA backend](https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/src/crypto/crypto_mbedtls_psa.c): `cbtc-aesgcm-bench/src/crypto/crypto_mbedtls_psa.c`
- [Ascon placeholder](https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/src/crypto/crypto_ascon.c): `cbtc-aesgcm-bench/src/crypto/crypto_ascon.c`
- [Message handling](https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/src/ma_msg.c): `cbtc-aesgcm-bench/src/ma_msg.c`
- [Statistics](https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/src/ma_stats.c): `cbtc-aesgcm-bench/src/ma_stats.c`
- [Linux platform](https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/src/platform/platform_linux.c): `cbtc-aesgcm-bench/src/platform/platform_linux.c`
- [POSIX timer](https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/src/timer/timer_posix.c): `cbtc-aesgcm-bench/src/timer/timer_posix.c`

### Result analysis

- [Analyze results](https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/scripts/analyze.py): `cbtc-aesgcm-bench/scripts/analyze.py`
- [Paper comparison](https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/scripts/compare_with_paper.py): `cbtc-aesgcm-bench/scripts/compare_with_paper.py`
- [Plot results](https://github.com/thanhnghiatechie/aes-gcm/blob/main/cbtc-aesgcm-bench/scripts/plots.py): `cbtc-aesgcm-bench/scripts/plots.py`
- [Result artifacts](https://github.com/thanhnghiatechie/aes-gcm/tree/main/cbtc-aesgcm-bench/results): `cbtc-aesgcm-bench/results`
- [Table artifacts](https://github.com/thanhnghiatechie/aes-gcm/tree/main/cbtc-aesgcm-bench/tables): `cbtc-aesgcm-bench/tables`

### Other components

- **Benchmark operator**
- **PSA Crypto**

## Connections

- Benchmark operator → Microbenchmark: runs
- Benchmark operator → Parameter sweep: runs
- Benchmark operator → Timing breakdown: runs
- Benchmark operator → Leak benchmark: runs
- Benchmark operator → Zero-copy sender: runs
- Benchmark operator → VOBC receiver: runs
- Benchmark operator → PSA smoke test: runs
- PSA smoke test → PSA Crypto: calls
