12 releases

0.4.6 Dec 9, 2024
0.4.5 Nov 6, 2024
0.4.2 Dec 13, 2023
0.4.1 May 16, 2021
0.1.1 Jan 4, 2018

#1548 in Cryptography

Download history 59/week @ 2024-09-22 1/week @ 2024-09-29 4/week @ 2024-10-13 116/week @ 2024-11-03 13/week @ 2024-11-10 3/week @ 2024-11-17 1/week @ 2024-11-24 184/week @ 2024-12-08 10/week @ 2024-12-15

194 downloads per month
Used in hyper-sse

ISC license

73KB
2.5K SLoC

dependency status

libhydrogen for rust

The Hydrogen library is a small, easy-to-use, hard-to-misuse cryptographic library.

Features:

  • Consistent high-level API, inspired by libsodium. Instead of low-level primitives, it exposes simple functions to solve common problems that cryptography can solve.
  • 100% built using just two cryptographic building blocks: the Curve25519 elliptic curve, and the Gimli permutation.
  • Small and easy to audit. Implemented as one tiny file for every set of operation, and adding a single .c file to your project is all it takes to use libhydrogen in your project.
  • The whole code is released under a single, very liberal license (ISC).
  • Zero dynamic memory allocations and low stack requirements (median: 32 bytes, max: 128 bytes). This makes it usable in constrained environments such as microcontrollers.
  • Portable. Supports Linux, *BSD, MacOS, Windows, and the Arduino IDE out of the box.
  • Can generate cryptographically-secure random numbers, even on Arduino boards.
  • Attempts to mitigate the implications of accidental misuse, even on systems with an unreliable PRG and/or no clock.

This crate implement high-level Rust bindings.

Documentation

Dependencies

~0.4–3MB
~63K SLoC