# samyak05/tls-handshake-linux-namespaces architecture

> Architecture diagram of the GitHub repository samyak05/tls-handshake-linux-namespaces, 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/samyak05/tls-handshake-linux-namespaces
- Repository: https://github.com/samyak05/tls-handshake-linux-namespaces

## Overview

This repository is an educational Linux networking lab, not an application: the user generates certificates, creates routed namespaces, runs TLS or mutual-TLS endpoints while capturing traffic, then inspects the packet capture. The README documents the topology and command-level workflow; source excerpts were unavailable, so relationships below reflect documented actions rather than inspected script internals. Certificate and capture files are shown as lab artifacts.

Main entry points: [`generate_certs.sh`](https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/generate_certs.sh) (Generate certificates), [`README.md`](https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/README.md) (TLS server), [`setup.sh`](https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/setup.sh) (Configure namespaces), [`tls_capture.pcap`](https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/tls_capture.pcap) (TLS capture)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_provision["Lab Provisioning"]
  node_certgen["Generate certificates<br/>[generate_certs.sh]"]
  node_ca["CA certificates<br/>[ca.crt]"]
  node_servercerts["Server credentials<br/>[server.crt]"]
  node_clientcerts["Client credentials<br/>[client.crt]"]
  node_setup["Configure namespaces<br/>[setup.sh]"]
  node_topology["Routed namespace topology<br/>[setup.sh]"]
  node_cleanup["Remove namespaces<br/>[cleanup.sh]"]
end

subgraph group_communication["Secure Communication"]
  node_openssl["OpenSSL endpoints"]
  node_server["TLS server<br/>[README.md]"]
  node_client["TLS client<br/>[README.md]"]
  node_tls["TLS 1.2 session<br/>[README.md]"]
  node_mtls["Mutual TLS session<br/>[README.md]"]
end

subgraph group_analysis["Packet Analysis"]
  node_tcpdump["Packet capture"]
  node_tlscapture["TLS capture<br/>[tls_capture.pcap]"]
  node_mtlscapture["mTLS capture<br/>[mtls_capture.pcap]"]
  node_wireshark["Wireshark analysis"]
  node_report["Lab report<br/>[report.pdf]"]
end

node_user(("Lab user"))

node_user -->|"runs"| node_certgen
node_certgen -->|"generates"| node_ca
node_certgen -->|"generates"| node_servercerts
node_certgen -->|"generates"| node_clientcerts
node_user -->|"runs"| node_setup
node_setup -->|"creates"| node_topology
node_user -->|"runs"| node_cleanup
node_user -->|"starts"| node_openssl
node_openssl -->|"runs"| node_server
node_openssl -->|"runs"| node_client
node_client -->|"connects"| node_server
node_server -->|"negotiates"| node_tls
node_server -->|"negotiates"| node_mtls
node_tcpdump -->|"captures traffic"| node_topology
node_user -->|"starts"| node_tcpdump
node_tcpdump -->|"writes"| node_tlscapture
node_tcpdump -->|"writes"| node_mtlscapture
node_user -->|"opens capture"| node_wireshark
node_wireshark -->|"analyzes"| node_tlscapture
node_wireshark -->|"analyzes"| node_mtlscapture
node_user -.->|"consults"| node_report

click node_certgen "https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/generate_certs.sh"
click node_ca "https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/ca/ca.crt"
click node_servercerts "https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/blue_namespace/server.crt"
click node_clientcerts "https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/red_namespace/client.crt"
click node_setup "https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/setup.sh"
click node_topology "https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/setup.sh"
click node_cleanup "https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/cleanup.sh"
click node_server "https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/README.md"
click node_client "https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/README.md"
click node_tls "https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/README.md"
click node_mtls "https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/README.md"
click node_tlscapture "https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/tls_capture.pcap"
click node_mtlscapture "https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/mtls_capture.pcap"
click node_report "https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/report/report.pdf"

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_certgen,node_ca,node_servercerts,node_clientcerts,node_setup,node_topology,node_cleanup,node_user toneBlue
class node_openssl,node_server,node_client,node_tls,node_mtls toneAmber
class node_tcpdump,node_tlscapture,node_mtlscapture,node_wireshark,node_report toneMint
```

## Components

### Lab Provisioning

- [Generate certificates](https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/generate_certs.sh): `generate_certs.sh`
- [CA certificates](https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/ca/ca.crt): `ca/ca.crt`
- [Server credentials](https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/blue_namespace/server.crt): `blue_namespace/server.crt`
- [Client credentials](https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/red_namespace/client.crt): `red_namespace/client.crt`
- [Configure namespaces](https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/setup.sh): `setup.sh`
- [Routed namespace topology](https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/setup.sh): `setup.sh`
- [Remove namespaces](https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/cleanup.sh): `cleanup.sh`

### Secure Communication

- **OpenSSL endpoints**
- [TLS server](https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/README.md): `README.md`
- [TLS client](https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/README.md): `README.md`
- [TLS 1.2 session](https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/README.md): `README.md`
- [Mutual TLS session](https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/README.md): `README.md`

### Packet Analysis

- **Packet capture**
- [TLS capture](https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/tls_capture.pcap): `tls_capture.pcap`
- [mTLS capture](https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/mtls_capture.pcap): `mtls_capture.pcap`
- **Wireshark analysis**
- [Lab report](https://github.com/samyak05/tls-handshake-linux-namespaces/blob/main/report/report.pdf): `report/report.pdf`

### Other components

- **Lab user**

## Connections

- Lab user → Generate certificates: runs
- Generate certificates → CA certificates: generates
- Generate certificates → Server credentials: generates
- Generate certificates → Client credentials: generates
- Lab user → Configure namespaces: runs
- Configure namespaces → Routed namespace topology: creates
- Lab user → Remove namespaces: runs
- Lab user → OpenSSL endpoints: starts
- OpenSSL endpoints → TLS server: runs
- OpenSSL endpoints → TLS client: runs
- TLS client → TLS server: connects
- TLS server → TLS 1.2 session: negotiates
- TLS server → Mutual TLS session: negotiates
- Packet capture → Routed namespace topology: captures traffic
- Lab user → Packet capture: starts
- Packet capture → TLS capture: writes
- Packet capture → mTLS capture: writes
- Lab user → Wireshark analysis: opens capture
- Wireshark analysis → TLS capture: analyzes
- Wireshark analysis → mTLS capture: analyzes
- Lab user → Lab report: consults
