# keyuraghao/chipwhisperer architecture

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

- Interactive diagram: https://gitdiagram.com/keyuraghao/chipwhisperer
- Repository: https://github.com/keyuraghao/chipwhisperer

## Overview

ChipWhisperer is a hardware-security research toolchain: researchers configure capture hardware and a target, collect power traces, then process those traces with the Analyzer API. The README describes capture and target boards, firmware, and trace analysis; the sampled CW305 target shows one concrete acquisition path, while TraceManager shows trace-segment management. Firmware examples span multiple MCU families, and the AVR crypto library supplies a broad set of cryptographic primitives. Source excerpts are partial, so links between unsampled subsystems are limited to the README’s documented roles.

Main entry points: [`software/chipwhisperer/capture/targets/CW305_AES_PIPELINED.py`](https://github.com/keyuraghao/chipwhisperer/blob/develop/software/chipwhisperer/capture/targets/CW305_AES_PIPELINED.py) (CW305 AES driver), [`firmware/mcu`](https://github.com/keyuraghao/chipwhisperer/tree/develop/firmware/mcu) (Target firmware examples), [`software/chipwhisperer/analyzer`](https://github.com/keyuraghao/chipwhisperer/tree/develop/software/chipwhisperer/analyzer) (Analyzer API), [`software/chipwhisperer/common/api/TraceManager.py`](https://github.com/keyuraghao/chipwhisperer/blob/develop/software/chipwhisperer/common/api/TraceManager.py) (Trace manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Capture"]
  node_capture_api["Capture API"]
  node_cw305_driver["CW305 AES driver"]
  node_capture_board["Capture board"]
  node_scope["Scope"]
end

subgraph group_targets["Targets"]
  node_target_board["Target board"]
end

subgraph group_firmware["Firmware"]
  node_target_firmware["Target firmware examples"]
  node_simple_serial["SimpleSerial MCU apps"]
  node_aes_demo["Quark AES demo<br/>[main.c]"]
  node_crypto_lib["AVR crypto library"]
  node_bootloader["Quark bootloader"]
end

subgraph group_traces["Trace Analysis"]
  node_trace["Captured trace"]
  node_trace_manager["Trace manager<br/>[TraceManager.py]"]
  node_trace_files["Trace files"]
  node_analyzer["Analyzer API"]
  node_crypto_result["Analysis results"]
end

node_researcher(("Researcher"))

node_researcher -->|"configures"| node_capture_api
node_capture_api -->|"selects target"| node_cw305_driver
node_cw305_driver -->|"writes registers"| node_capture_board
node_cw305_driver -->|"captures waveform"| node_scope
node_cw305_driver -->|"runs encryption"| node_target_board
node_target_board -->|"executes"| node_target_firmware
node_target_firmware -->|"includes examples"| node_simple_serial
node_target_firmware -->|"includes example"| node_aes_demo
node_target_firmware -->|"includes primitives"| node_crypto_lib
node_target_firmware -->|"includes firmware"| node_bootloader
node_cw305_driver -->|"returns trace"| node_trace
node_trace_manager -->|"saves and loads"| node_trace_files
node_trace_manager -->|"manages segments"| node_trace
node_analyzer -->|"processes traces"| node_trace
node_analyzer -->|"produces analysis"| node_crypto_result
node_researcher -->|"analyzes"| node_analyzer

click node_capture_api "https://github.com/keyuraghao/chipwhisperer/tree/develop/software/chipwhisperer/capture"
click node_cw305_driver "https://github.com/keyuraghao/chipwhisperer/blob/develop/software/chipwhisperer/capture/targets/CW305_AES_PIPELINED.py"
click node_target_firmware "https://github.com/keyuraghao/chipwhisperer/tree/develop/firmware/mcu"
click node_simple_serial "https://github.com/keyuraghao/chipwhisperer/tree/develop/firmware/mcu/87c51/87c51"
click node_aes_demo "https://github.com/keyuraghao/chipwhisperer/blob/develop/firmware/mcu/intel_quark/simpleserial_example/main.c"
click node_crypto_lib "https://github.com/keyuraghao/chipwhisperer/tree/develop/firmware/mcu/crypto/avrcryptolib"
click node_bootloader "https://github.com/keyuraghao/chipwhisperer/tree/develop/firmware/mcu/intel_quark/boot_rom"
click node_trace_manager "https://github.com/keyuraghao/chipwhisperer/blob/develop/software/chipwhisperer/common/api/TraceManager.py"
click node_analyzer "https://github.com/keyuraghao/chipwhisperer/tree/develop/software/chipwhisperer/analyzer"

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_capture_api,node_cw305_driver,node_capture_board,node_scope toneBlue
class node_target_board toneAmber
class node_target_firmware,node_simple_serial,node_aes_demo,node_crypto_lib,node_bootloader toneMint
class node_trace,node_trace_manager,node_trace_files,node_analyzer,node_crypto_result toneRose
class node_researcher toneIndigo
```

## Components

### Capture

- [Capture API](https://github.com/keyuraghao/chipwhisperer/tree/develop/software/chipwhisperer/capture): `software/chipwhisperer/capture`
- [CW305 AES driver](https://github.com/keyuraghao/chipwhisperer/blob/develop/software/chipwhisperer/capture/targets/CW305_AES_PIPELINED.py): `software/chipwhisperer/capture/targets/CW305_AES_PIPELINED.py`
- **Capture board**
- **Scope**

### Targets

- **Target board**

### Firmware

- [Target firmware examples](https://github.com/keyuraghao/chipwhisperer/tree/develop/firmware/mcu): `firmware/mcu`
- [SimpleSerial MCU apps](https://github.com/keyuraghao/chipwhisperer/tree/develop/firmware/mcu/87c51/87c51): `firmware/mcu/87c51/87c51`
- [Quark AES demo](https://github.com/keyuraghao/chipwhisperer/blob/develop/firmware/mcu/intel_quark/simpleserial_example/main.c): `firmware/mcu/intel_quark/simpleserial_example/main.c`
- [AVR crypto library](https://github.com/keyuraghao/chipwhisperer/tree/develop/firmware/mcu/crypto/avrcryptolib): `firmware/mcu/crypto/avrcryptolib`
- [Quark bootloader](https://github.com/keyuraghao/chipwhisperer/tree/develop/firmware/mcu/intel_quark/boot_rom): `firmware/mcu/intel_quark/boot_rom`

### Trace Analysis

- **Captured trace**
- [Trace manager](https://github.com/keyuraghao/chipwhisperer/blob/develop/software/chipwhisperer/common/api/TraceManager.py): `software/chipwhisperer/common/api/TraceManager.py`
- **Trace files**
- [Analyzer API](https://github.com/keyuraghao/chipwhisperer/tree/develop/software/chipwhisperer/analyzer): `software/chipwhisperer/analyzer`
- **Analysis results**

### Other components

- **Researcher**

## Connections

- Researcher → Capture API: configures
- Capture API → CW305 AES driver: selects target
- CW305 AES driver → Capture board: writes registers
- CW305 AES driver → Scope: captures waveform
- CW305 AES driver → Target board: runs encryption
- Target board → Target firmware examples: executes
- Target firmware examples → SimpleSerial MCU apps: includes examples
- Target firmware examples → Quark AES demo: includes example
- Target firmware examples → AVR crypto library: includes primitives
- Target firmware examples → Quark bootloader: includes firmware
- CW305 AES driver → Captured trace: returns trace
- Trace manager → Trace files: saves and loads
- Trace manager → Captured trace: manages segments
- Analyzer API → Captured trace: processes traces
- Analyzer API → Analysis results: produces analysis
- Researcher → Analyzer API: analyzes
