Research tool for anonymous communication networks

Anonymous protocol experiments, made observable.

AnonTestLab is a local network emulator for evaluating anonymous communication designs with real relay processes, real sockets, real per-hop cryptography and configurable adversaries.

A reusable middle ground between abstract simulation and modifying a production anonymity network. Controlled enough for experiments, concrete enough to observe a running protocol.

two independent 3-hop paths with additional possible relay combinations
One session split over two relay paths. The adversary may see one leg, both, or neither. Bright routes show the selected paths. Dashed links show other relay combinations available to the experiment.
01 / Why this exists

Anonymous-network ideas are difficult to compare fairly.

A new anonymity mechanism can look promising for many different reasons: the protocol itself, the simulator assumptions, the traffic model, the topology, the attacker visibility, or simply the way the prototype was built. Across studies, those variables are often bundled together.

Many anonymity mechanisms are difficult to compare on equal terms.

A common experimental environment makes it possible to execute, vary and challenge those ideas under the same rules.

01

Simulation abstracts away execution.

Simulation is powerful for controlled studies, but process scheduling, socket behavior, cryptographic work and implementation timing may be modeled, while an executing protocol can expose effects that those models omit.

02

Production systems are costly to repurpose.

Testing one new routing policy, mixing defense or observer model inside a mature anonymity network can require substantial engineering before the research question itself can be isolated.

03

One-off prototypes make comparison difficult.

If each study builds a new harness, changes in topology, workload, timing and adversary assumptions can become entangled with the mechanism being evaluated.

The missing middle layer

A reusable environment between abstract simulation and a production anonymity network.

Researchers should be able to change one experimental assumption at a time: routing, path splitting, cover traffic, relay mixing, cryptography, link conditions or attacker visibility. The rest of the environment should stay controlled.

And when execution matters, the measurements should be able to come from real relay processes, sockets, circuit construction and per-hop cryptography, giving timing studies an execution-based measurement layer.

ComparableTest different mechanisms in the same environment.
ConfigurableChange research variables instead of rewriting infrastructure.
ObservableMeasure behavior directly from an executing local network.
ReproduciblePreserve configuration, seeds, metrics and reports.
Adversary-awareMake observer capability an explicit experimental variable.
FalsifiableCompare, sweep and repeat across controlled runs.
That is why AnonTestLab exists.

AnonTestLab provides a common execution layer for asking controlled questions about anonymous communication designs before the cost of a production implementation is justified. Tor and analytical simulation remain useful for different purposes.

Change the assumption.
Re-run the network.
Measure what changed.
Configuration-driven experiments with preserved seeds, metrics and reports.
02 / Experimental surface

A protocol workbench for controlled variation.

Routing, traffic, mixing, shaping, cryptography, link conditions and adversary visibility are independent dimensions of the experiment.

↗

Routing & multipath

Compare single-path and multipath behavior with multiple path-selection and traffic-splitting policies.

  • Random and bandwidth-weighted relay selection
  • Round-robin, random, IID, batch and nominal-RTT latency split policies
  • Disjoint legs or a shared common exit
≋

Traffic & relay mixing

Vary traffic distributions and apply relay-side delay defenses without creating a separate testbed.

  • Poisson, constant, Pareto and burst traffic
  • Cover traffic and configurable cover dropping
  • Constant, exponential and pool mixing
◇

Real per-hop crypto

Circuits perform telescoping handshakes and use selectable AEAD algorithms instead of adding an artificial crypto delay.

  • X25519, X448 and P-256 ECDHE
  • AES-GCM, AES-GCM-SIV*, OCB3** and ChaCha20-Poly1305
  • Plaintext mode to isolate transport cost

* AES-GCM-SIV requires cryptography ≥ 42 with OpenSSL 3.2+. Standard cryptography wheels satisfy this on common platforms.
** AES-OCB3 requires OCB support in the OpenSSL build.

⌁

WAN-like conditions

Make localhost links behave less like localhost while retaining a controlled, repeatable laboratory.

  • Latency and jitter
  • Packet loss and bandwidth limits
  • Per-node and per-edge heterogeneity (forward direction)
◎

Pluggable adversaries

Make attacker capability an explicit experimental parameter, including what the observer can see.

  • Global / partial traffic observation
  • Correlation suite and path compromise
  • Active watermarking and structural hop-depth leakage
Σ

Research workflows

Move beyond a single run with tooling designed for comparison, repeated seeds and experimental validity.

  • Compare and one-parameter sweeps
  • Paired multi-seed analysis with bootstrap confidence intervals
  • Analytical prediction and host-noise fidelity checks
03 / Workflow

Describe the experiment. Execute the network. Inspect the evidence.

01ConfigureDefine network, routes, traffic, crypto and observers in YAML.
02SpawnLaunch relay subprocesses on local loopback addresses.
03BuildConstruct telescoping circuits with per-hop ECDHE and keys.
04RunSend onion-wrapped traffic across real sockets and configured links.
05MeasureExport metrics, configuration, seed and experiment report.
   experiment.yaml
experiment:
  name: multipath-study
  seed: 20260903
  duration_s: 8

routing:
  paths:
    - strategy: bandwidth_weighted
      path_length: 3
    - strategy: random
      path_length: 4
  split_strategy: iid
  split_weights: [0.7, 0.3]
  merge: common_exit

traffic:
  distribution: pareto
  real_rate: 6
  cover_rate: 2

mixing:
  strategy: pool
  pool_interval_ms: 250

crypto:
  algorithm: chacha20poly1305
  keyexchange: x25519
One engine, several interfaces

CLI for repeatability. Dashboard for exploration.

atl runExecute one experiment and collect its metrics.
atl compareRun two configurations and diff every metric.
atl sweepVary one field over a set of values and export the series.
atl pairedRun matched seeds and classify the paired effect against an equivalence margin.
atl predictInspect the model's closed-form expectations without executing a run.
atl fidelityCheck whether host scheduling noise is contaminating a timing experiment.
atl dashboardUse a local browser UI backed by the same experiment runner.
04 / Research questions

Built to turn anonymity claims into experiments.

Each question can be tested under explicit, configurable assumptions.

Multipath

Does path splitting still help when the observer can see more than one leg?

Correlation

Does a delay defense survive when the attacker becomes lag-aware?

Cover traffic

How much correlation reduction is gained for the additional bandwidth cost?

Mixing

When does pool or exponential mixing produce an effect that remains after host noise is accounted for?

Visibility

How much of the network must an adversary observe before linkage becomes reliable?

Validity

Is the result caused by the protocol configuration, or by the machine running the experiment?

05 / Scope

Useful because the simplifications are visible.

AnonTestLab is a research instrument with a deliberately bounded model. Its limitations belong in the methodology.

Custom wire protocol with Tor-inspired circuits.The project uses its own wire protocol and omits Tor's directory and consensus system.
Fixed-size shaping is optional.Fixed-size padding is enabled only when traffic shaping is turned on.
Fixed-size cells still expose hop position.The current v0.4 construction can leak structural hop-depth information, which the framework can measure explicitly.
Relay identities are ephemeral.There is no persistent relay identity or reputation system.
Bandwidth-weighted routing is simplified.Selection is weighted without Tor guard/exit flag constraints or positional rules.
Latency scheduling uses nominal RTTs.The latency split policy schedules using configured round-trip times. The legs are not given different real latencies by that policy.
Per-edge link conditions are forward-direction only.Per-edge latency, jitter, loss and bandwidth settings affect the forward direction of the configured edge.
Some AEAD options depend on the crypto backend.AES-GCM-SIV requires cryptography ≥ 42 with OpenSSL 3.2+. AES-OCB3 also requires an OpenSSL build with OCB support.
Wave-mode clocks start per session.With sessions.max_concurrent, each session starts its experiment clock when that session begins. Timing comparisons should account for this.
Measured timing varies.Seeds reproduce controlled choices, while real process and socket timing remains naturally variable between runs.
06 / License and principle

Free software by design.

AnonTestLab is released under the GNU General Public License v3.0 or later. That choice is intentional.

Users are free to study it, modify it, redistribute it and build on it, while the GPL preserves those freedoms for others who receive modified versions. For a research tool, that matters: experimental methods should be inspectable, implementations should be challengeable, and redistributed modified versions should preserve the same freedoms.

The license supports practical reuse while keeping the project's free-software principles explicit.

Read the GPL-3.0-or-later license ↗
Open source · GPL-3.0-or-later

Build the experiment.
Run the network.
Test the assumption.

Clone AnonTestLab, start with the Tor-like preset, then change the routing, traffic, defenses or adversary and measure the effect.

Explore the repository ↗