Tor Project Introduces Rust Implementation to Replace C Version

Tor Project Unveils Rust-Based Implementation to Replace C Version

The developers of the anonymous Tor network have announced the Arti project, which focuses on creating a Rust-based implementation of the Tor protocol. Unlike the original C implementation, which was initially designed as a SOCKS proxy and later adapted for other needs, Arti is being developed from the start as a modular, embeddable library that can be used by various applications. The project has been in development for over a year, funded by the Zcash Open Major Grants (ZOMG) program. The code is released under the Apache 2.0 and MIT licenses.

Why Switch to Rust?

The main reason for rewriting Tor in Rust is to achieve a higher level of code security by using a language that ensures safe memory management. According to the Tor developers, at least half of all tracked vulnerabilities in the project could be eliminated in the Rust implementation, provided that “unsafe” code blocks are not used. Rust also enables faster development compared to C, thanks to its expressive syntax and strict guarantees, which reduce the need for double-checking and writing extra code. Additionally, the new project benefits from all the experience gained during previous Tor development, helping to avoid known architectural issues and making the project more modular and efficient.

Current Status and Roadmap

At its current stage, Arti can already connect to the Tor network, interact with directory servers, and create anonymized connections over Tor using a SOCKS-based proxy. However, it is not yet recommended for use in production systems, as not all privacy features are implemented and API backward compatibility is not guaranteed. The first client version meeting security criteria, with support for guard nodes and stream isolation, is planned for release in October.

The first beta release, featuring an experimental embeddable library and performance optimizations, is expected in March 2022. The first stable release—with a stable API, CLI, configuration format, and a completed audit—is scheduled for mid-September 2022. This release will be suitable for initial use by regular users. An update to version 1.1, adding support for pluggable transports and bridges to bypass censorship, is expected at the end of October 2022. Support for onion services is planned for version 1.2, while achieving feature parity with the C client is expected in version 2.0, with no set timeline yet.

Future Plans

Looking ahead, the developers anticipate a gradual decrease in activity related to the C codebase and an increase in focus on the Rust implementation. Once the Rust version reaches a level where it can fully replace the C version, the team will stop adding new features to the C implementation and eventually end its support altogether. However, this transition will not happen soon, and development of the Tor client and relay in C will continue until the Rust version is ready for full replacement.

Leave a Reply