# poo1t/side-chennel-attack-framework architecture

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

- Interactive diagram: https://gitdiagram.com/poo1t/side-chennel-attack-framework
- Repository: https://github.com/poo1t/side-chennel-attack-framework

## Overview

This repository is a side-channel research framework: it runs controlled cache and timing benchmarks, generates synthetic power traces, and analyzes leakage and mitigation outcomes. The power sweep’s generator and CPA calls are visible in source; the cache and timing harnesses visibly use their shared measurement utilities and comparison implementations. Analysis scripts and the experiment runner are included as product capabilities, but their wiring is not asserted where the supplied excerpts and reference index do not show it. The top-level README excerpt is empty, so the map relies on the framework’s source and tree.

Main entry points: [`side-channel-framework/src/timing/timing_common.h`](https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/src/timing/timing_common.h) (Timing measurement utilities), [`side-channel-framework/src/timing/measurement.cpp`](https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/src/timing/measurement.cpp) (Timing measurement harness), [`side-channel-framework/src/cache/cache_common.h`](https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/src/cache/cache_common.h) (Cache measurement utilities), [`side-channel-framework/analysis/cpa_analysis.py`](https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/analysis/cpa_analysis.py) (CPA experiment sweep)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cache["Cache experiments"]
  node_cache_harness["Flush-reload experiment"]
  node_cache_throughput["Mitigation throughput"]
  node_cache_utils["Cache measurement utilities<br/>[cache_common.h]"]
  node_cache_platform["CPU and PRNG helpers<br/>[cache_common.cpp]"]
end

subgraph group_timing["Timing experiments"]
  node_timing_harness["Timing measurement harness<br/>[measurement.cpp]"]
  node_vulnerable_compare["Early-exit comparison<br/>[vulnerable.cpp]"]
  node_mitigated_compare["Constant-time comparison<br/>[mitigated.cpp]"]
  node_timing_utils["Timing measurement utilities<br/>[timing_common.h]"]
  node_timing_platform["Timing platform helpers<br/>[timing_common.cpp]"]
end

subgraph group_power["Power analysis"]
  node_trace_generator["Synthetic trace generator<br/>[trace_generator.py]"]
  node_cpa_engine["CPA engine<br/>[power_analysis.py]"]
  node_cpa_sweep["CPA experiment sweep<br/>[cpa_analysis.py]"]
end

subgraph group_analysis["Leakage analysis"]
  node_cache_analysis["Cache leakage analysis<br/>[cache_analysis.py]"]
  node_timing_analysis["Timing leakage analysis<br/>[timing_analysis.py]"]
  node_comparative_analysis["Comparative analysis"]
  node_experiment_runner["Experiment runner<br/>[run_experiments.py]"]
end

node_cache_harness -->|"uses"| node_cache_utils
node_cache_throughput -->|"uses"| node_cache_utils
node_cache_platform -->|"implements"| node_cache_utils
node_timing_harness -->|"uses"| node_timing_utils
node_timing_harness -->|"measures"| node_vulnerable_compare
node_timing_harness -->|"measures"| node_mitigated_compare
node_vulnerable_compare -->|"uses"| node_timing_utils
node_mitigated_compare -->|"uses"| node_timing_utils
node_timing_platform -->|"implements"| node_timing_utils
node_cpa_sweep -->|"generates traces"| node_trace_generator
node_cpa_sweep -->|"runs CPA"| node_cpa_engine
node_cpa_engine -->|"imports tables"| node_trace_generator

click node_cache_harness "https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/src/cache/cache_experiment.cpp"
click node_cache_throughput "https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/src/cache/cache_measurement.cpp"
click node_cache_utils "https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/src/cache/cache_common.h"
click node_cache_platform "https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/src/cache/cache_common.cpp"
click node_timing_harness "https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/src/timing/measurement.cpp"
click node_vulnerable_compare "https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/src/timing/vulnerable.cpp"
click node_mitigated_compare "https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/src/timing/mitigated.cpp"
click node_timing_utils "https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/src/timing/timing_common.h"
click node_timing_platform "https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/src/timing/timing_common.cpp"
click node_trace_generator "https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/src/power/trace_generator.py"
click node_cpa_engine "https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/src/power/power_analysis.py"
click node_cpa_sweep "https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/analysis/cpa_analysis.py"
click node_cache_analysis "https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/analysis/cache_analysis.py"
click node_timing_analysis "https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/analysis/timing_analysis.py"
click node_comparative_analysis "https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/analysis/comparative_analysis.py"
click node_experiment_runner "https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/experiments/run_experiments.py"

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_cache_harness,node_cache_throughput,node_cache_utils,node_cache_platform toneBlue
class node_timing_harness,node_vulnerable_compare,node_mitigated_compare,node_timing_utils,node_timing_platform toneAmber
class node_trace_generator,node_cpa_engine,node_cpa_sweep toneMint
class node_cache_analysis,node_timing_analysis,node_comparative_analysis,node_experiment_runner toneRose
```

## Components

### Cache experiments

- [Flush-reload experiment](https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/src/cache/cache_experiment.cpp): `side-channel-framework/src/cache/cache_experiment.cpp`
- [Mitigation throughput](https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/src/cache/cache_measurement.cpp): `side-channel-framework/src/cache/cache_measurement.cpp`
- [Cache measurement utilities](https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/src/cache/cache_common.h): `side-channel-framework/src/cache/cache_common.h`
- [CPU and PRNG helpers](https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/src/cache/cache_common.cpp): `side-channel-framework/src/cache/cache_common.cpp`

### Timing experiments

- [Timing measurement harness](https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/src/timing/measurement.cpp): `side-channel-framework/src/timing/measurement.cpp`
- [Early-exit comparison](https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/src/timing/vulnerable.cpp): `side-channel-framework/src/timing/vulnerable.cpp`
- [Constant-time comparison](https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/src/timing/mitigated.cpp): `side-channel-framework/src/timing/mitigated.cpp`
- [Timing measurement utilities](https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/src/timing/timing_common.h): `side-channel-framework/src/timing/timing_common.h`
- [Timing platform helpers](https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/src/timing/timing_common.cpp): `side-channel-framework/src/timing/timing_common.cpp`

### Power analysis

- [Synthetic trace generator](https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/src/power/trace_generator.py): `side-channel-framework/src/power/trace_generator.py`
- [CPA engine](https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/src/power/power_analysis.py): `side-channel-framework/src/power/power_analysis.py`
- [CPA experiment sweep](https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/analysis/cpa_analysis.py): `side-channel-framework/analysis/cpa_analysis.py`

### Leakage analysis

- [Cache leakage analysis](https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/analysis/cache_analysis.py): `side-channel-framework/analysis/cache_analysis.py`
- [Timing leakage analysis](https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/analysis/timing_analysis.py): `side-channel-framework/analysis/timing_analysis.py`
- [Comparative analysis](https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/analysis/comparative_analysis.py): `side-channel-framework/analysis/comparative_analysis.py`
- [Experiment runner](https://github.com/poo1t/side-chennel-attack-framework/blob/main/side-channel-framework/experiments/run_experiments.py): `side-channel-framework/experiments/run_experiments.py`

## Connections

- Flush-reload experiment → Cache measurement utilities: uses (evidence: `side-channel-framework/src/cache/cache_experiment.cpp`)
- Mitigation throughput → Cache measurement utilities: uses (evidence: `side-channel-framework/src/cache/cache_measurement.cpp`)
- CPU and PRNG helpers → Cache measurement utilities: implements (evidence: `side-channel-framework/src/cache/cache_common.cpp`)
- Timing measurement harness → Timing measurement utilities: uses (evidence: `side-channel-framework/src/timing/measurement.cpp`)
- Timing measurement harness → Early-exit comparison: measures (evidence: `side-channel-framework/src/timing/measurement.cpp`)
- Timing measurement harness → Constant-time comparison: measures (evidence: `side-channel-framework/src/timing/measurement.cpp`)
- Early-exit comparison → Timing measurement utilities: uses (evidence: `side-channel-framework/src/timing/vulnerable.cpp`)
- Constant-time comparison → Timing measurement utilities: uses (evidence: `side-channel-framework/src/timing/mitigated.cpp`)
- Timing platform helpers → Timing measurement utilities: implements (evidence: `side-channel-framework/src/timing/timing_common.cpp`)
- CPA experiment sweep → Synthetic trace generator: generates traces (evidence: `side-channel-framework/analysis/cpa_analysis.py`)
- CPA experiment sweep → CPA engine: runs CPA (evidence: `side-channel-framework/analysis/cpa_analysis.py`)
- CPA engine → Synthetic trace generator: imports tables (evidence: `side-channel-framework/src/power/power_analysis.py`)
