20 releases (11 breaking)

new 0.22.0 Sep 3, 2024
0.20.0 Jun 27, 2024
0.6.1 Mar 4, 2024
0.4.0 Dec 4, 2023
0.1.2 Mar 31, 2023

#1044 in Cryptography

Download history 836/week @ 2024-05-20 581/week @ 2024-05-27 455/week @ 2024-06-03 805/week @ 2024-06-10 1485/week @ 2024-06-17 1120/week @ 2024-06-24 1328/week @ 2024-07-01 240/week @ 2024-07-08 811/week @ 2024-07-15 742/week @ 2024-07-22 1436/week @ 2024-07-29 1346/week @ 2024-08-05 864/week @ 2024-08-12 1461/week @ 2024-08-19 1483/week @ 2024-08-26 1743/week @ 2024-09-02

5,860 downloads per month
Used in 37 crates (11 directly)

MIT/Apache

450KB
7K 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

~12MB
~209K SLoC