Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

Technical Stack Details

Applies to:
PQC ScannerRustCargoCross-Platform

Core Technology​

Version: Stable (latest recommended)

Why Rust?

Memory Safety

No garbage collection, compile-time memory safety guarantees

Performance

Zero-cost abstractions, comparable to C/C++

Concurrency

Fearless concurrency with ownership system

Cross-Platform

First-class support for Linux, macOS, Windows

  • Modern Tooling: Cargo package manager, rustfmt, clippy
  • Strong Type System: Prevents many classes of bugs at compile time

Dependencies​

rustls (v0.23+)

Pure Rust TLS 1.2/1.3 implementation, used together with rustls-pemfile for PEM loading.

Features:

  • No OpenSSL dependency
  • Memory-safe TLS
  • Modern cipher suites
  • TLS 1.3 support

x509-parser (v0.16+)

X.509 certificate parsing

Capabilities:

  • Parse DER/PEM certificates
  • Extract public keys
  • Validate certificate chains
  • OID parsing

der & pem (v0.7+ / v3.0+)

Low-level encoding/decoding of DER and PEM data.

tokio (v1.35+)

Asynchronous runtime (enabled with its full feature set).

Features Used:

  • fs: Async filesystem operations
  • net: TCP/TLS networking
  • sync: Channels, mutexes
  • time: Timers, timeouts
  • macros: #[tokio::main]
  • rt-multi-thread: Multi-threaded runtime

clap (v4.5+)

Command-line argument parsing (using the derive, env, and cargo features).

Features:

  • Derive macros for easy CLI definition
  • Subcommands
  • Environment variable support
  • Shell completions
  • Help generation

serde (v1.0+)

Serialization framework, paired with serde_json and serde_yaml for the JSON and YAML output formats.

Formats Supported:

  • JSON (default output)
  • YAML (human-readable)
  • Custom SARIF format

tracing (v0.1+)

Structured logging, with tracing-subscriber (env-filter feature) handling log output and filtering.

Features:

  • Structured, contextual logging
  • Multiple log levels
  • Filtering by module
  • JSON output support

anyhow & thiserror (v1.0+)

Usage:

  • anyhow: Application-level errors
  • thiserror: Library-level custom errors

walkdir (v2.4+)

Recursive directory traversal

Features:

  • Efficient recursive scanning
  • Symbolic link handling
  • Filtering
  • Metadata access

rayon (v1.8+)

Data parallelism

Use Cases:

  • Parallel file processing
  • Concurrent certificate analysis
  • Multi-threaded scanning

pcap (v2.0+)

Packet capture (libpcap wrapper)

Platform Dependencies:

  • Linux: libpcap-dev
  • macOS: Built-in libpcap
  • Windows: WinPcap or Npcap

pnet (v0.35+)

Packet parsing

Features:

  • TCP/IP packet parsing
  • Layer 2-4 protocol support
  • Stream reassembly helpers

indicatif (v0.17+)

Progress bars

ratatui (v0.26+)

Terminal UI framework, used with crossterm for terminal control.

Used For:

  • Network mode real-time display
  • Interactive statistics
  • Status monitoring

Build System​

The project is built with Cargo. The package is published under the name dke-scanner-agent at version 1.0.0, targets the 2021 edition, and is dual-licensed under MIT or Apache-2.0. It produces a binary named dke-scanner-agent and a reusable library named pqc_scanner.

The runtime dependencies are grouped by purpose:

GroupCrates
Coretokio, anyhow, thiserror
Cryptorustls, x509-parser, der, pem
CLIclap
Serializationserde, serde_json, serde_yaml
Loggingtracing, tracing-subscriber
File systemwalkdir
Parallelismrayon
Networkpcap, pnet
UIindicatif, ratatui, crossterm

Development dependencies include criterion for benchmarking and tempfile for tests. The release profile is tuned for size and speed: maximum optimization level, link-time optimization, a single codegen unit, and stripped debug symbols.

Platform-Specific Dependencies​

System Packages:

# Ubuntu/Debian
sudo apt-get install libpcap-dev pkg-config build-essential

# RHEL/CentOS
sudo yum install libpcap-devel

# Arch
sudo pacman -S libpcap

System Packages:

# libpcap is included with macOS
# Optional: Homebrew for development tools
brew install pkg-config

Prerequisites:

# Install Npcap
choco install npcap

Compilation​

cargo build --release

Output: target/release/dke-scanner-agent

Performance Characteristics​

Binary Size

Build TypeSizeDescription
Debug~50 MBUnoptimized with debug symbols
Release~8 MBOptimized, stripped
Release + UPX~3 MBCompressed with UPX

Memory Usage

ModeTypicalPeak
Agent30 MB50 MB
Filesystem50 MB100 MB
Domain40 MB80 MB
Network60 MB150 MB

CPU Usage

  • Single-threaded parsing: 1 core
  • Parallel filesystem scan: All cores
  • Network capture: 1-2 cores

Testing Dependencies​

Tests rely on a small set of development-only crates:

CratePurpose
criterionBenchmarking
tempfileTemporary files for tests
mockallMocking framework
proptestProperty-based testing

CI/CD Integration​

name: CI
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- run: cargo test --all-features
- run: cargo clippy -- -D warnings

Version Requirements​

DependencyMinimum VersionRecommended
Rust1.70Latest stable
Cargo1.70Latest
libpcap1.9.01.10.0+