Введение

Onion routing (луковая маршрутизация) — техника анонимной коммуникации, при которой сообщение последовательно шифруется несколькими слоями и передаётся через цепочку промежуточных узлов (onion routers). Каждый узел снимает один «слой луковицы», узнаёт только предыдущий hop и следующий hop, но не содержимое payload и не полный path. Метафора луковицы: peeling layers one at a time.

Концепция описана в research 1990s (Goldschlag, Reed, Syverson); практическая реализация — сеть Tor, используемая миллионами для censorship circumvention, journalism и privacy browsing.

Криптографическая структура

Client знает public keys всех routers в circuit. Для message M и path R1→R2→R3:

Создаётся nested encryption: E_R3(E_R2(E_R1(M))). R1 decrypts outer layer, forwards inner blob to R2; R2 decrypts, forwards to R3; R3 decrypts M и delivers to exit destination (in Tor exit model) или to hidden service rendezvous.

Symmetric keys negotiated per hop via DH handshake в circuit setup — forward secrecy within session.

Отличие от простого proxy chaining

Regular proxy chain: каждый proxy видит plaintext если TLS terminated per hop — trust cumulative. Onion: payload encrypted end-to-end through hops until exit (for Tor clearnet) — intermediate routers never see HTTP content.

VPN single hop: one provider full visibility. Onion multi-hop: distributed visibility.

Производительность и latency

Each hop adds latency; Tor typically slower than direct connection. Cell-based protocol (512-byte units) multiplexes streams. Congestion on slow relays affects UX. Hidden services add rendezvous overhead.

Атаки на onion routing

Traffic confirmation: adversary observes entry и exit timing/volume patterns — correlates streams. Padding и traffic shaping mitigate partially.

Sybil on path selection: if attacker controls many routers, probability malicious path rises — Tor uses bandwidth-weighted random selection, directory authorities.

Application data leaks: onion routing protects transport layer identity, not user mistakes at layer 7.

Variants beyond Tor

I2P — garlic routing (multiple messages bundled). Mix networks (Loopix, Nym) — batching и delays for stronger anonymity latency trade-off. Lightning Network не onion routing в same sense но uses onion for payment path privacy.

Историческая эволюция

Первые onion routing системы (Tor predecessors) исследовались в военных и академических лабораториях для traffic analysis resistance. Переход к volunteer-run public infrastructure изменил threat model с closed classified network на open adversarial internet — design assumptions explicitly documented в Tor design papers.

Сравнение с mixnets

Classic mixnets (David Chaum) introduce batching и reordering messages с delays — stronger anonymity against timing attacks, worse latency. Onion routing optimizes interactive web browsing. Modern research (Nym, Loopix) hybrid approaches — understand trade-off latency vs anonymity set size.

Implementation details Tor cells

Tor splits traffic into fixed-size cells для uniform traffic pattern. CREATE, EXTEND, RELAY cells setup и maintain circuits. Understanding cell types helps debug failed circuits и misconfigured firewalls blocking OR ports.

Enterprise и corporate use

Some organizations run internal onion services for whistleblower portals — staff access via Tor without logging corporate proxy. Security training must cover correct URL verification (.onion typosquatting) и secure document upload procedures.

Future directions

QUIC transport integration, congestion control improvements, post-quantum handshake research — Tor Project roadmap items. Users benefit passively from upgrades; operators must keep relay software current.

Связанные термины

Tor — primary deployment. PGP — complementary content encryption. VPN — often compared in threat models.

Педагогическая модель для понимания слоёв

Представьте сообщение как конверт в конверте: каждый router открывает только свой слой и видит следующий адрес доставки внутри цепочки, но не финального получателя данных и не исходного отправителя одновременно. Эта модель помогает объяснять, почему компрометация одного узла insufficient для полного deanonymization без дополнительных side channels.

В контексте hidden services onion routing extends: client и server build rendezvous circuit через introduction points, ни одна сторона не learns other’s network identity при correct implementation. v3 addresses используют stronger crypto than deprecated v2 — always verify .onion version when bookmarking services.

Research papers продолжают моделировать adversaries с visibility на subset Tor network — пользователям рекомендуется follow Tor Project security advisories и не assume theoretical anonymity proofs translate to default configuration без hardening browser и behavior.

Latency-sensitive applications (VoIP, gaming) poorly suited для onion routing — design choice Tor optimizes web browsing, не universal transport replacement для all internet protocols equally.

Academic courses on network security increasingly include onion routing labs — hands-on circuit building demystifies technology для next generation engineers и policy makers.

Comparison cheat sheet: VPN hides destination from ISP; Tor hides both from each other partially; mixnet adds delay batching — choose layer matching adversary model и latency tolerance вашего use case.

Matanga Info рекомендует изучать onion routing в связке с практиками Tor Browser и PGP для полноценной модели угроз на прикладном уровне.

Заключение

Onion routing — foundational building block modern low-latency anonymity networks. Layered encryption и per-hop knowledge limitation create defense in depth against single compromised relay. Не replaces end-to-end application security или user discipline, но explains why Tor architecture resists simple «one subpoena to ISP» deanonymization models. Understanding onion layers clarifies both capabilities и hard limits distributed anonymity systems.