15 releases (6 breaking)

new 0.17.0 Apr 2, 2024
0.6.1 Mar 4, 2024
0.6.0 Feb 5, 2024
0.4.0 Dec 4, 2023
0.1.2 Mar 31, 2023

#274 in Cryptography

Download history 224/week @ 2023-12-18 164/week @ 2023-12-25 92/week @ 2024-01-01 414/week @ 2024-01-08 394/week @ 2024-01-15 157/week @ 2024-01-22 119/week @ 2024-01-29 308/week @ 2024-02-05 196/week @ 2024-02-12 146/week @ 2024-02-19 442/week @ 2024-02-26 2020/week @ 2024-03-04 637/week @ 2024-03-11 997/week @ 2024-03-18 1518/week @ 2024-03-25 1168/week @ 2024-04-01

4,379 downloads per month
Used in 23 crates (10 directly)

MIT/Apache

430KB
6.5K SLoC

tor-hscrypto

tor-hscrypto: Basic cryptography used by onion services

Overview

This crate is part of Arti, a project to implement Tor in Rust.

Onion services and the clients that connect to them need a few cryptographic operations not used by the rest of Tor. These include:

  • A set of key-blinding operations to derive short-term public keys from long-term public keys.
  • An ad-hoc SHA3-based message authentication code.
  • Operations to encode and decode public keys as .onion addresses.
  • A set of operations to divide time into different "periods". These periods are used as inputs to the DHT-style hash ring, and to the key-blinding operations.

This crate implements those operations, along with a set of wrapper types to keep us from getting confused about the numerous keys and nonces used for the onion services.

License: MIT OR Apache-2.0


lib.rs:

Dependencies

~15MB
~286K SLoC