Skip to content

BASSCIOP/Masking-Routing-Information

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Onion Router โ€” Desktop Application

๐Ÿง… Onion Router

A general-purpose encrypted communication tool inspired by the foundational
Hiding Routing Information paper (Goldschlag, Reed & Syverson, 1996)

Encryption Platform License Tests

C C++ Python OpenSSL GTK


Overview

Onion Router is a secure desktop application that demonstrates onion routing โ€” the anonymous-communication architecture that later evolved into Tor. It wraps messages in multiple layers of 1,024-bit RSA + AES-256-CBC encryption, routes them hop-by-hop through a simulated network, and peels one cryptographic layer at each node โ€” ensuring that no single node ever learns both the sender and the recipient.

The application is built across three languages, each handling a distinct layer of the security stack:

Layer Language Artifact Responsibility
๐Ÿ” Cryptographic Core C (OpenSSL) libonion_crypto.so RSA-1024, AES-256-CBC, SHA-256, CSPRNG; fixed-size onion construction & peeling
๐Ÿ”€ Routing Engine C++17 libonion_engine.so 5-node network, virtual circuit management, replay detection, trace logging
๐Ÿ–ฅ๏ธ User Interface Python 3 + GTK 3 main.py Animated network visualization, message console, real-time encryption log

โš ๏ธ Disclaimer: This is an educational and demonstrative implementation faithful to the 1996 paper. It runs entirely on a single machine and is not a hardened anonymity system โ€” do not use it to protect real-world traffic.


Table of Contents


Features

  • Layered onion encryption โ€” each hop adds/removes a cryptographic layer using RSA-1024 + AES-256-CBC, exactly as the paper describes
  • Fixed-size 4,096-byte onions โ€” random padding ensures that onion size never reveals the number of remaining hops
  • Bidirectional virtual circuits โ€” forward and backward symmetric key pairs enable anonymous two-way communication
  • Replay detection โ€” SHA-256 fingerprinting rejects duplicate onions, preventing replay attacks
  • Expiration enforcement โ€” onions carry timestamps and are automatically rejected after their TTL expires
  • Real-time visualization โ€” Cairo-rendered animated network view shows the onion traveling hop-by-hop with pulsing nodes
  • Color-coded encryption log โ€” every cryptographic operation (BUILD, PEEL, FORWARD, CRYPT_FWD/BWD, DELIVER, REPLAY) is logged in real time
  • Node key inspection โ€” examine the RSA-1024 public key of any node in the network
  • Dark security-console aesthetic โ€” Adwaita-dark theme with terminal-green accents

Architecture Deep Dive

The Onion Data Structure

Every onion is a fixed 4,096-byte blob, so its size never leaks how many hops remain (the paper's constant-size requirement). Each layer is structured as:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     ONION LAYER (4096 bytes)                        โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  128-byte RSA-1024      โ”‚         3968-byte AES-256-CBC region      โ”‚
โ”‚  encrypted block        โ”‚                                           โ”‚
โ”‚         โ”‚               โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚         โ”‚               โ”‚   โ”‚ Header  โ”‚ Inner    โ”‚ Random       โ”‚   โ”‚
โ”‚         โ–ผ               โ”‚   โ”‚ (route  โ”‚ Onion    โ”‚ Padding      โ”‚   โ”‚
โ”‚  Wraps a 48-byte        โ”‚   โ”‚  info)  โ”‚ (next    โ”‚ (constant    โ”‚   โ”‚
โ”‚  session secret:        โ”‚   โ”‚         โ”‚  layer)  โ”‚  size)       โ”‚   โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚  โ”‚ 32-byte AES key  โ”‚   โ”‚                                           โ”‚
โ”‚  โ”‚ 16-byte IV       โ”‚   โ”‚                                           โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚                                           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

The header carries everything a node needs and nothing it does not:

Field Description
exp_time Expiration timestamp โ€” onions are rejected after this time
next_hop ID of the next routing node (or NULL if this is the final destination)
Ff, Kf Forward stream cryptographic function and symmetric key
Fb, Kb Backward stream cryptographic function and symmetric key

How a Hop Works

When a routing node receives an onion, it performs these operations in sequence:

Encrypted Onion         Routing Node X           Smaller Onion
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”                                        โ”Œโ”€โ”€โ”€โ”€โ”€โ”
    โ”‚โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ”‚  โ”€โ”€โ–บ  1. RSA-decrypt outer block       โ”‚โ–ˆโ–ˆโ–ˆโ–ˆ โ”‚
    โ”‚โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ”‚       2. AES-decrypt body with         โ”‚โ–ˆโ–ˆโ–ˆโ–ˆ โ”‚
    โ”‚โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ”‚          recovered session key          โ”‚โ–ˆโ–ˆโ–ˆโ–ˆ โ”‚
    โ”‚โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ”‚       3. Check expiration time          โ”‚     โ”‚  + random padding
    โ”‚โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ”‚       4. Reject replays (SHA-256 DB)    โ”‚     โ”‚  โ†’ back to 4096B
    โ”‚โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ”‚       5. Store circuit state             โ””โ”€โ”€โ”€โ”€โ”€โ”˜
    โ””โ”€โ”€โ”€โ”€โ”€โ”˜       6. Forward re-padded onion  โ”€โ”€โ”€โ”€โ”€โ”€โ–บ  to next hop

A node learns only its immediate predecessor and successor โ€” never the full route, the total number of hops, or its position in the chain.

Virtual Circuits

Once the onion has traversed the route and each node has stored its circuit state, the hops form a virtual circuit:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    forward keys     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    forward keys     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Initiator โ”‚ โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ–บ โ”‚ Node  โ”‚ โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ–บ โ”‚ Responder โ”‚
โ”‚   Proxy   โ”‚ โ—„โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• โ”‚  (ร—N) โ”‚ โ—„โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• โ”‚   Proxy   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    backward keys    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    backward keys    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
  • Forward direction: data is pre-crypted by the initiator's proxy (applying inverses of all forward keys, innermost first) so that each hop peels exactly one layer
  • Backward direction: the responder's proxy crypts the reply once, and each intermediate node adds another layer; the initiator strips them all

Network Topology

The demo builds a fixed five-node topology (as labelled in the paper's Figure 1):

            X โ”€โ”€โ”€โ”€โ”€โ”€โ”€ U
           โ•ฑ โ•ฒ       โ•ฑ โ•ฒ
          W    โ•ฒ    โ•ฑ    โ•ฒ
           โ•ฒ    โ•ฒ โ•ฑ      โ•ฒ
            โ•ฒ    Y โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Z
             โ•ฒ โ•ฑ
              โ–ผ
   (W, Z = Proxy/Routing Nodes)
   (X, Y, U = Routing Nodes)
Node Role Description
W Proxy/Routing Initiator's entry point โ€” constructs onions, manages the forward/backward stream
X Routing Intermediate relay node
Y Routing Intermediate relay node
Z Proxy/Routing Responder's exit point โ€” delivers plaintext to the destination
U Routing Intermediate relay node

System Requirements

Component Requirement
OS Linux (Ubuntu 20.04+ recommended)
C Compiler GCC with C11 support
C++ Compiler G++ with C++17 support
Build System CMake โ‰ฅ 3.15 (fallback compiler invocation in run.sh)
Crypto Library OpenSSL development headers (libssl-dev)
GUI Toolkit GTK 3 with PyGObject (python3-gi, python3-gi-cairo)
Python Python 3.8+

One-Line Install (Debian/Ubuntu)

sudo apt-get update && sudo apt-get install -y \
    build-essential cmake libssl-dev \
    python3-gi python3-gi-cairo gir1.2-gtk-3.0 \
    libgirepository1.0-dev pkg-config

๐Ÿ’ก Python interpreter note: The GUI needs a Python that can import gi (PyGObject). On many systems, the distro interpreter /usr/bin/python3 has this, while pyenv/conda Pythons may not. run.sh automatically probes for a GTK-capable interpreter; you can force one with:

ONION_PYTHON=/usr/bin/python3 ./run.sh

Installation & Build

Quick Start

git clone https://gitlab.com/BASSCIOP/onion-router.git
cd onion-router
./run.sh

This builds both native shared libraries and launches the GTK GUI.

Build Options

# Build + launch GUI (default)
./run.sh

# Build + run C/C++ test suites only
./run.sh --test

# Skip build, launch GUI with existing libraries
./run.sh --no-build

Using Make

make              # Configure (CMake) + build shared libraries and tests
make test         # Build, then run C and C++ test suites
make run          # Build, then launch the GUI
make clean        # Remove all build artifacts

Using CMake Directly

cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)
ctest --test-dir build --output-on-failure

Build artifacts are placed in:

  • build/lib/ โ€” libonion_crypto.so, libonion_engine.so
  • build/bin/ โ€” test_crypto, test_engine

Usage Guide

1. Pick a Route

Select a Source (proxy) and Destination from the dropdown menus. Optionally specify intermediate Hops (e.g., X,Y) and set a Circuit TTL in seconds.

2. Build Circuit

Click Build Circuit to watch the initiator's proxy wrap one RSA+AES layer per hop. The network view animates the onion traveling through nodes, and the encryption log fills with color-coded events.

3. Send Through Onion

Type a message and click Send Through Onion. The message is delivered over the forward stream to the exit node, and an acknowledgement returns via the backward stream.

4. Replay CREATE

Click Replay CREATE to re-inject the original onion and observe a node detecting and rejecting the replay from its seen-onion hash table โ€” demonstrating the paper's anti-replay mechanism.

5. Destroy Circuit

Click Destroy to tear down the virtual circuit, propagating DESTROY commands through all participating nodes.

6. Inspect Node Keys

Click the Node Keys button in the header bar to view the RSA-1024 public key (PEM format) of any node in the network.

Log Legend

Tag Color Meaning
BUILD ๐ŸŸข Green Proxy wraps a layer (RSA + AES)
PEEL ๐Ÿ”ต Cyan Node removes its encryption layer
FORWARD ๐ŸŸก Yellow Onion re-padded and relayed to next hop
CIRCUIT ๐ŸŸฃ Purple Circuit state stored in node's table
CRYPT_FWD/BWD ๐Ÿ”ท Teal Stream (de)cipher applied per hop
DELIVER ๐ŸŸข Bright Green Payload delivered / recovered
REPLAY ๐Ÿ”ด Red Replayed onion detected and rejected
EXPIRE ๐ŸŸ  Orange Expired onion dropped
ERROR ๐Ÿ”ด Red Operation failed

Project Structure

onion_router_app/
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ src/
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ crypto/                     # โ”€โ”€ C Cryptographic Core โ”€โ”€
โ”‚   โ”‚   โ”œโ”€โ”€ onion_crypto.h             #    RSA-1024, AES-256-CBC, SHA-256, CSPRNG
โ”‚   โ”‚   โ”œโ”€โ”€ onion_crypto.c             #    (272 lines) key gen, encrypt, decrypt, hash
โ”‚   โ”‚   โ”œโ”€โ”€ onion_builder.h            #    Onion build/peel interface + constants
โ”‚   โ”‚   โ””โ”€โ”€ onion_builder.c            #    (298 lines) layered onion construction
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ engine/                     # โ”€โ”€ C++17 Routing Engine โ”€โ”€
โ”‚   โ”‚   โ”œโ”€โ”€ routing_node.hpp/.cpp      #    Node: peel onion, verify expiry, replay-check
โ”‚   โ”‚   โ”œโ”€โ”€ circuit_manager.hpp/.cpp   #    Circuit table: ID โ†’ {connections, keys}
โ”‚   โ”‚   โ””โ”€โ”€ onion_router.hpp/.cpp      #    5-node network + extern "C" ABI for ctypes
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ ๐Ÿ“ gui/                        # โ”€โ”€ Python / GTK 3 Front-End โ”€โ”€
โ”‚       โ”œโ”€โ”€ main.py                    #    Application entry point (Gtk.Application)
โ”‚       โ”œโ”€โ”€ app_window.py              #    Main window, dark theme, event orchestration
โ”‚       โ”œโ”€โ”€ network_view.py            #    Cairo-rendered animated network graph
โ”‚       โ”œโ”€โ”€ message_panel.py           #    Message compose/send + color-coded log
โ”‚       โ””โ”€โ”€ crypto_utils.py            #    ctypes bindings to both .so libraries
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ tests/
โ”‚   โ”œโ”€โ”€ test_crypto.c                  #    C unit tests for crypto primitives
โ”‚   โ”œโ”€โ”€ test_engine.cpp                #    C++ unit tests for routing engine
โ”‚   โ””โ”€โ”€ test_gui_smoke.py             #    Headless (xvfb) GUI integration test
โ”‚
โ”œโ”€โ”€ ๐Ÿ“ docs/
โ”‚   โ””โ”€โ”€ screenshot.png                 #    Application screenshot
โ”‚
โ”œโ”€โ”€ CMakeLists.txt                     #    CMake build configuration
โ”œโ”€โ”€ Makefile                           #    Convenience wrapper around CMake
โ”œโ”€โ”€ run.sh                             #    Build + launch script with auto-detection
โ”œโ”€โ”€ requirements.txt                   #    Python dependencies (PyGObject, pycairo)
โ”œโ”€โ”€ LICENSE                            #    MIT License
โ””โ”€โ”€ README.md                          #    This file

Codebase: ~3,800 lines across 18 source files (806 C, 1,158 C++, 1,596 Python, 254 test code).


Component Integration

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    Python / GTK 3 GUI                       โ”‚
โ”‚   main.py โ†’ app_window.py โ†’ network_view.py                โ”‚
โ”‚                              message_panel.py               โ”‚
โ”‚                                    โ”‚                        โ”‚
โ”‚                              ctypes (FFI)                   โ”‚
โ”‚                                    โ”‚                        โ”‚
โ”‚                                    โ–ผ                        โ”‚
โ”‚              crypto_utils.OnionEngine                       โ”‚
โ”‚         (Python wrapper for the C ABI)                      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                         โ”‚
                         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              libonion_engine.so  (C++17)                    โ”‚
โ”‚                                                            โ”‚
โ”‚   OnionRouter โ”€โ”€ RoutingNode โ”€โ”€ CircuitManager             โ”‚
โ”‚        โ”‚                                                   โ”‚
โ”‚        โ”‚  extern "C" ABI: orouter_create(), orouter_send() โ”‚
โ”‚        โ”‚  orouter_reply(), orouter_destroy(), etc.         โ”‚
โ”‚        โ”‚                                                   โ”‚
โ”‚        โ”‚  Every operation emits a JSON trace for the GUI   โ”‚
โ”‚        โ”‚                                                   โ”‚
โ”‚        โ–ผ                                                   โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”               โ”‚
โ”‚   โ”‚       libonion_crypto.so  (C)          โ”‚               โ”‚
โ”‚   โ”‚                                        โ”‚               โ”‚
โ”‚   โ”‚  RSA-1024  โ”‚  AES-256-CBC  โ”‚  SHA-256  โ”‚               โ”‚
โ”‚   โ”‚  CSPRNG    โ”‚  Onion Build  โ”‚  Padding  โ”‚               โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜               โ”‚
โ”‚              (OpenSSL 3.x EVP API)                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

The engine exposes a small extern "C" ABI (orouter_*) that the Python OnionEngine class wraps. Every operation produces a JSON trace โ€” a list of steps ({step, type, node, circuit_id, layer, bytes, detail}) โ€” which the GUI replays to animate the network and populate the encryption log.


Testing

The project includes three test suites:

Test Type What It Validates
test_crypto C unit test RSA-1024 keygen/encrypt/decrypt, AES-256-CBC round-trip, SHA-256 digests, onion build/peel integrity, constant-size padding
test_engine C++ unit test Node creation, circuit table management, full onion routing through 5-node network, replay detection, expiration enforcement
test_gui_smoke Python integration Headless GTK window instantiation, engine loading, circuit build, message send, replay rejection, destroy โ€” all via xvfb-run

Run all tests:

# Via run.sh
./run.sh --test

# Via Make
make test

# Via CTest
ctest --test-dir build --output-on-failure

Security Notes & Limitations

Aspect Status
Key management Keys are generated fresh in-process each run; no persistent key distribution or PKI
RSA-1024 Used to match the era of the 1996 paper; not adequate for real-world confidentiality today (minimum RSA-2048 recommended)
Network simulation Everything runs in a single process on one host โ€” there is no real network transport
Traffic analysis No traffic padding, no dummy messages, no latency smoothing โ€” a global passive adversary would trivially correlate traffic
Forward secrecy Not implemented โ€” compromise of a node's long-term RSA key exposes past sessions
Side channels No timing attack mitigations or constant-time comparisons beyond what OpenSSL provides

This is a teaching tool, not a production anonymity network. For real-world anonymous communication, use Tor.


Academic Reference

D. M. Goldschlag, M. G. Reed, P. F. Syverson.
"Hiding Routing Information"
Workshop on Information Hiding, Cambridge, UK, May 1996.
In: R. Anderson (Ed.), Information Hiding, LNCS 1174, pp. 137โ€“150, Springer-Verlag.
๐Ÿ“„ Full Paper (PDF)

This paper introduced the concept of Onion Routing โ€” the layered encryption approach that directly led to the development of Tor in 2002 and remains the foundation of anonymous communication on the Internet today.


License

MIT License

Copyright (c) 2026 ROBERT C BASSยฎ

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

See LICENSE for the full text.


Built with ๐Ÿง… by ROBERT C BASSยฎ โ€” Inspired by the pioneers of anonymous communication

About

Hiding Routing Information - SICO TOOLBOX

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors