57 releases (37 breaking)

0.42.0-alpha.2 Apr 26, 2024
0.40.0 Apr 16, 2024
0.38.0 Feb 28, 2024
0.36.0 Dec 22, 2023
0.7.2 Nov 23, 2022

#65 in Cryptography

Download history 43/week @ 2024-01-22 121/week @ 2024-02-12 47/week @ 2024-02-19 221/week @ 2024-02-26 211/week @ 2024-03-04 210/week @ 2024-03-11 150/week @ 2024-03-18 26/week @ 2024-03-25 58/week @ 2024-04-01 174/week @ 2024-04-08 896/week @ 2024-04-15 354/week @ 2024-04-22 130/week @ 2024-04-29 217/week @ 2024-05-06

1,602 downloads per month
Used in 5 crates (4 directly)

GPL-2.0 license

13K SLoC


GitHub CI crates.io Coverage Status

A collection of cryptography primitives written in Rust.

Content of this library

This library contains primarily the following cryptographic primitives:

Release protocol

While twenty-first's version is 0.x.y, releasing a new version:

  1. Is the release backwards-compatible? Then the new version is 0.x.y+1. Otherwise the new version is 0.x+1.0.
  2. Checkout the last commit on Mjolnir, and run make bench-publish. Save the benchmark's result and verify that there is no performance degredation.
  3. Create a commit that increases version = "0.x.y" in twenty-first/Cargo.toml. The commit message should give a one-line summary of each release change. Include the benchmark result at the bottom.
  4. Have a v0.x.y git tag on this commit created. (git tag v0.x.y [sha], git push upstream --tags)
  5. Have this commit cargo published on crates.io and in GitHub tags.

If you do not have the privilege to create git tags or run cargo publish, submit a PR and the merger will take care of these.


This crate depends on the rs-leveldb crate which wraps the C++ implementation of leveldb. As such, snappy and leveldb must be installed. Eg, on Ubuntu:

sudo apt-get install libleveldb-dev libsnappy-dev

For more detailed buildings instructions, see the description in HACKING.md.


~181K SLoC