Onion Routing Anatomy

Inside the book

31 chapters and 4 appendices, 176 graded exercises with solutions, 39 original figures. Reference versions: tor 0.4.9.13 and Arti 2.6.0.

The book is written for university students, security professionals and researchers with a background in networking (TCP/IP, TLS) and programming. Technical statements are tied to primary sources — the Tor specifications, the source code of tor and Arti, Tor proposals and research papers — and cited in the text.

Part I — History and foundations

Anonymity and metadata; mix networks and remailers; from onion routing at the US Naval Research Laboratory to the Tor Project; Tor's threat model and what it does not protect against.

Part II — The protocol at a low level

Cryptography for Tor; network architecture; channels and the link protocol; cells; circuit creation (CREATE_FAST, ntor, ntor-v3); layered relay encryption and the new CGO scheme; streams; SENDME and congestion control; the directory system; path selection and guards; onion services v3; DoS defences; censorship, bridges and pluggable transports. Each chapter ends with a laboratory.

Part III — Tor in practice

Configuring tor with torrc; the control port and Stem; building a private Tor network; traffic analysis with Wireshark; running onion services, relays and bridges; Tor Browser, Tails and Whonix; Tor Metrics and OONI; legal and ethical aspects in Italy and the EU.

Part IV — Attacks and defences

Traffic correlation, website fingerprinting, Sybil attacks, real cases and operational mistakes. The approach is analytical and defensive: the book explains why attacks work and how Tor counters them; it gives no instructions against third parties.

Part V — Research and future

Academic research on Tor, Arti (the implementation of Tor in Rust), open problems and current proposals of the Tor Project.

Formats

The English translation is available in A4 PDF and EPUB 3 formats. Its original language is Italian; the translation has not undergone independent linguistic review.

DOI: 10.5281/zenodo.24207675