#noise-protocol #tor #nym

cyphernet

Cyphernet is a set of libraries for privacy-preserving networking apps

7 releases (4 breaking)

0.5.2 May 6, 2024
0.5.1 May 6, 2024
0.4.1 Sep 5, 2023
0.3.0 May 19, 2023
0.1.0 Jan 16, 2023

#444 in Network programming

Download history 179/week @ 2024-06-17 134/week @ 2024-06-24 126/week @ 2024-07-01 56/week @ 2024-07-08 170/week @ 2024-07-15 100/week @ 2024-07-22 94/week @ 2024-07-29 154/week @ 2024-08-05 102/week @ 2024-08-12 112/week @ 2024-08-19 118/week @ 2024-08-26 117/week @ 2024-09-02 217/week @ 2024-09-09 116/week @ 2024-09-16 110/week @ 2024-09-23 74/week @ 2024-09-30

522 downloads per month
Used in 13 crates (4 directly)

Apache-2.0

275KB
2K SLoC

Cyphernet: privacy-preserving networking & internet applications

Build Tests Lints codecov

crates.io Docs Apache-2 licensed

This repository provides a set of libraries for privacy-preserving networking & internet applications written in rust.

The set of libraries supports mix networks (Tor, I2P, Nym), proxies, end-to-end encryption without central authorities/PKI (Noise-based encryption protocols like lightning wire protocol, NTLS etc).

Manifest

Name: cyphernet
Type: Library
Kind: Free software
License: Apache-2.0
Language: Rust
Compiler: 1.65
Author: Maxim Orlovsky
Maintained: Cyphernet DAO, Switzerland
Maintainers:
  Maxim Orlovsky:
    GitHub: @dr-orlovsky
    GPG: EAE730CEC0C663763F028A5860094BAF18A26EC9
    SSH: BoSGFzbyOKC7Jm28MJElFboGepihCpHop60nS8OoG/A
    EMail: dr@orlovsky.ch
  Alexis Sellier:
    GitHub: @cloudhead
    SSH: iTDjRHSIaoL8dpHbQ0mv+y0IQqPufGl2hQwk4TbXFlw

Overview

The library provides three main components, structured as modules:

  • Network addresses (sub-crate cypheraddr), which allow simple use of
    • Tor, Nym, I2P and other mix networks and SOCKS proxies
    • P2P addresses with node public keys
    • May be used in a way that prevents using DNS names (outside mixnet scope).
  • Noise protocol framework (sub-crate noise-framework) for end-to-end encrypted network communications.
  • SOCKS5 client (sub-crate socks5-client) for accessing Tor and other mixnets via proxy.

All the components has a minimal set of non-optional dependencies and short compile times. For instance, SOCKS5 proxy and cyphernet addresses both have zero non-optional dependencies.

The library tries to minimize number of dependencies. Most of its functionality is available via non-default features, like:

  • noise: support for noise protocols;
  • mixnets: supports for mixnet network addresses, including tor, nym, i2p (may require additional crypto libraries for parsing public keys);
  • serde: encoding for addresses types;
  • dns: enable use of DNS names alongside IP addresses and mixnet names.

Network addresses provided by the library include the following types:

  • InetHost - IP addr or DNS name
  • HostName - IP, DNS, Tor, I2P, Nym host name (no port or proxy information)
  • NetAddr - any type of host name + port information
  • PartialAddr - any type of host name + optional port, which defaults to generic const if not provided
  • PeerAddr - any of the above addresses + node public key for authentication
  • ProxiedHost - host name + proxy (there are IP/DNS w/o proxy and with proxy)
  • ProxiedAddr - any of the above addresses + proxy (thus IP/DNS is always proxied)

Documentation

API reference documentation for the library can be accessed at https://docs.rs/cyphernet/.

About cyphernet

Cyphernet is a conceptual approach for a privacy-preserving networking, based on the following stack of layers:

Cyphernet stack

Licensing

The libraries are distributed on the terms of Apache 2.0 opensource license. See LICENCE file for the license details.

Dependencies

~0.5–2.2MB
~34K SLoC