# ianparkerpro/pqc-audit architecture

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

- Interactive diagram: https://gitdiagram.com/ianparkerpro/pqc-audit
- Repository: https://github.com/ianparkerpro/pqc-audit

## Overview

PQC TLS Auditor is a passive TLS-handshake inspection proof of concept. In replay or live mode, the console program reads captured packets, passes them to flow tracking, and emits JSON findings; live mode can also resolve the client process. The detection core decodes TCP packets, reassembles directional streams, parses ClientHello and ServerHello messages, and classifies the negotiated key exchange using a configurable group table. The README also describes future endpoint-agent, network-sensor, and collector capabilities, but those are not implemented here. Edges reflect the shown program wiring and indexed source references; unsampled components are represented only where the README supports them.

Main entry points: [`src/PqcAuditor.Poc/Program.cs`](https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Poc/Program.cs) (POC console), [`src/PqcAuditor.Core/Flows/FlowTracker.cs`](https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Flows/FlowTracker.cs) (Flow tracker), [`src/PqcAuditor.Core/Output/ObservationJsonWriter.cs`](https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Output/ObservationJsonWriter.cs) (JSON writer), [`src/PqcAuditor.Core/Tls/TlsHandshakeParser.cs`](https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Tls/TlsHandshakeParser.cs) (TLS parser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Packet capture"]
  node_poc["POC console<br/>[Program.cs]"]
  node_pcap["PCAP replay"]
  node_etw["ETW capture"]
end

subgraph group_analysis["Handshake analysis"]
  node_packet_decoder["Packet decoder<br/>[PacketDecoder.cs]"]
  node_flow_tracker["Flow tracker<br/>[FlowTracker.cs]"]
  node_flow_key["Flow identity<br/>[FlowKey.cs]"]
  node_reassembler["TCP reassembler"]
  node_tls_parser["TLS parser"]
  node_span_reader["Span reader<br/>[SpanReader.cs]"]
  node_handshake_info["Handshake models<br/>[HandshakeInfo.cs]"]
  node_observation["Handshake observation"]
end

subgraph group_verdict["PQC classification"]
  node_classifier["Verdict classifier<br/>[Classifier.cs]"]
  node_group_table["Named-group table<br/>[GroupTable.cs]"]
end

subgraph group_report["Findings output"]
  node_resolver["Process resolver<br/>[ProcessResolver.cs]"]
  node_json_writer["JSON writer"]
end

node_operator(("Operator"))
node_capture_file["Capture file"]
node_network(("Captured traffic"))
node_etw_provider["Windows ETW provider"]
node_stdout(("JSON output"))
node_agent["Future endpoint agent"]
node_sensor["Future network sensor"]
node_collector[("Future collector")]

node_operator -->|"starts mode"| node_poc
node_capture_file -->|"provides packets"| node_pcap
node_network -.->|"carries traffic"| node_etw_provider
node_etw_provider -->|"delivers events"| node_etw
node_poc -->|"selects replay"| node_pcap
node_poc -->|"selects live capture"| node_etw
node_pcap -->|"yields packets"| node_poc
node_etw -->|"yields packets"| node_poc
node_poc -->|"processes packets"| node_flow_tracker
node_flow_tracker -->|"decodes packets"| node_packet_decoder
node_flow_tracker -->|"keys flows"| node_flow_key
node_flow_tracker -->|"reassembles streams"| node_reassembler
node_flow_tracker -->|"parses handshakes"| node_tls_parser
node_tls_parser -->|"reads fields"| node_span_reader
node_tls_parser -.->|"produces parsed data"| node_handshake_info
node_flow_tracker -->|"classifies handshake"| node_classifier
node_classifier -->|"looks up groups"| node_group_table
node_flow_tracker -->|"emits finding"| node_observation
node_poc -->|"resolves process"| node_resolver
node_poc -->|"writes findings"| node_json_writer
node_json_writer -->|"serializes finding"| node_observation
node_json_writer -->|"names groups"| node_group_table
node_json_writer -.->|"writes JSON"| node_stdout
node_agent -.->|"sends findings"| node_collector
node_sensor -.->|"sends findings"| node_collector

click node_poc "https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Poc/Program.cs"
click node_pcap "https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Capture/PcapFileCaptureSource.cs"
click node_etw "https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Poc/EtwCaptureSource.cs"
click node_packet_decoder "https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Packets/PacketDecoder.cs"
click node_flow_tracker "https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Flows/FlowTracker.cs"
click node_flow_key "https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Flows/FlowKey.cs"
click node_reassembler "https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Flows/TcpStreamReassembler.cs"
click node_tls_parser "https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Tls/TlsHandshakeParser.cs"
click node_span_reader "https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Tls/SpanReader.cs"
click node_handshake_info "https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Tls/HandshakeInfo.cs"
click node_classifier "https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Classification/Classifier.cs"
click node_group_table "https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Classification/GroupTable.cs"
click node_observation "https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Flows/HandshakeObservation.cs"
click node_resolver "https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Poc/ProcessResolver.cs"
click node_json_writer "https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Output/ObservationJsonWriter.cs"

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_poc,node_pcap,node_etw toneBlue
class node_packet_decoder,node_flow_tracker,node_flow_key,node_reassembler,node_tls_parser,node_span_reader,node_handshake_info,node_observation,node_collector toneAmber
class node_classifier,node_group_table toneMint
class node_resolver,node_json_writer toneRose
class node_operator,node_capture_file,node_network,node_etw_provider,node_stdout,node_agent,node_sensor toneIndigo
```

## Components

### Packet capture

- [POC console](https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Poc/Program.cs): `src/PqcAuditor.Poc/Program.cs`
- [PCAP replay](https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Capture/PcapFileCaptureSource.cs): `src/PqcAuditor.Core/Capture/PcapFileCaptureSource.cs`
- [ETW capture](https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Poc/EtwCaptureSource.cs): `src/PqcAuditor.Poc/EtwCaptureSource.cs`

### Handshake analysis

- [Packet decoder](https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Packets/PacketDecoder.cs): `src/PqcAuditor.Core/Packets/PacketDecoder.cs`
- [Flow tracker](https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Flows/FlowTracker.cs): `src/PqcAuditor.Core/Flows/FlowTracker.cs`
- [Flow identity](https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Flows/FlowKey.cs): `src/PqcAuditor.Core/Flows/FlowKey.cs`
- [TCP reassembler](https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Flows/TcpStreamReassembler.cs): `src/PqcAuditor.Core/Flows/TcpStreamReassembler.cs`
- [TLS parser](https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Tls/TlsHandshakeParser.cs): `src/PqcAuditor.Core/Tls/TlsHandshakeParser.cs`
- [Span reader](https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Tls/SpanReader.cs): `src/PqcAuditor.Core/Tls/SpanReader.cs`
- [Handshake models](https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Tls/HandshakeInfo.cs): `src/PqcAuditor.Core/Tls/HandshakeInfo.cs`
- [Handshake observation](https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Flows/HandshakeObservation.cs): `src/PqcAuditor.Core/Flows/HandshakeObservation.cs`

### PQC classification

- [Verdict classifier](https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Classification/Classifier.cs): `src/PqcAuditor.Core/Classification/Classifier.cs`
- [Named-group table](https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Classification/GroupTable.cs): `src/PqcAuditor.Core/Classification/GroupTable.cs`

### Findings output

- [Process resolver](https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Poc/ProcessResolver.cs): `src/PqcAuditor.Poc/ProcessResolver.cs`
- [JSON writer](https://github.com/ianparkerpro/pqc-audit/blob/main/src/PqcAuditor.Core/Output/ObservationJsonWriter.cs): `src/PqcAuditor.Core/Output/ObservationJsonWriter.cs`

### Other components

- **Operator**
- **Capture file**
- **Captured traffic**
- **Windows ETW provider**
- **JSON output**
- **Future endpoint agent**
- **Future network sensor**
- **Future collector**

## Connections

- Operator → POC console: starts mode (evidence: `src/PqcAuditor.Poc/Program.cs`)
- Capture file → PCAP replay: provides packets (evidence: `src/PqcAuditor.Core/Capture/PcapFileCaptureSource.cs`)
- Captured traffic → Windows ETW provider: carries traffic
- Windows ETW provider → ETW capture: delivers events (evidence: `src/PqcAuditor.Poc/EtwCaptureSource.cs`)
- POC console → PCAP replay: selects replay (evidence: `src/PqcAuditor.Poc/Program.cs`)
- POC console → ETW capture: selects live capture (evidence: `src/PqcAuditor.Poc/Program.cs`)
- PCAP replay → POC console: yields packets (evidence: `src/PqcAuditor.Poc/Program.cs`)
- ETW capture → POC console: yields packets (evidence: `src/PqcAuditor.Poc/Program.cs`)
- POC console → Flow tracker: processes packets (evidence: `src/PqcAuditor.Poc/Program.cs`)
- Flow tracker → Packet decoder: decodes packets (evidence: `src/PqcAuditor.Core/Flows/FlowTracker.cs`)
- Flow tracker → Flow identity: keys flows (evidence: `src/PqcAuditor.Core/Flows/FlowTracker.cs`)
- Flow tracker → TCP reassembler: reassembles streams (evidence: `src/PqcAuditor.Core/Flows/FlowTracker.cs`)
- Flow tracker → TLS parser: parses handshakes (evidence: `src/PqcAuditor.Core/Flows/FlowTracker.cs`)
- TLS parser → Span reader: reads fields (evidence: `src/PqcAuditor.Core/Tls/TlsHandshakeParser.cs`)
- TLS parser → Handshake models: produces parsed data
- Flow tracker → Verdict classifier: classifies handshake (evidence: `src/PqcAuditor.Core/Flows/FlowTracker.cs`)
- Verdict classifier → Named-group table: looks up groups (evidence: `src/PqcAuditor.Core/Classification/Classifier.cs`)
- Flow tracker → Handshake observation: emits finding (evidence: `src/PqcAuditor.Core/Flows/FlowTracker.cs`)
- POC console → Process resolver: resolves process (evidence: `src/PqcAuditor.Poc/Program.cs`)
- POC console → JSON writer: writes findings (evidence: `src/PqcAuditor.Poc/Program.cs`)
- JSON writer → Handshake observation: serializes finding (evidence: `src/PqcAuditor.Core/Output/ObservationJsonWriter.cs`)
- JSON writer → Named-group table: names groups (evidence: `src/PqcAuditor.Core/Output/ObservationJsonWriter.cs`)
- JSON writer → JSON output: writes JSON
- Future endpoint agent → Future collector: sends findings (evidence: `README.md`)
- Future network sensor → Future collector: sends findings (evidence: `README.md`)
