Rust Cryptography

Open-source Rust projects categorized as Cryptography

Top 23 Rust Cryptography Projects

  • GitHub repo grin

    Minimal implementation of the Mimblewimble protocol.

    Project mention: It's going up, up, up!!! 🥳 | | 2021-04-12

    some other coins you can mine similarly would be something like grin ( is the website) or the prices on these and XMR will continue to rise, imho. good luck let me know if you need help.

  • GitHub repo rustls

    A modern TLS library in Rust

    Project mention: LibreSSL unaffected by recent OpenSSL vulnerabilities | | 2021-03-27

    While it doesn't have the decade(s) of eyes on it that openSSL and libreSSL have, it did receive fairly high praise when audited by cure53

  • GitHub repo exonum

    An extensible open-source framework for creating private/permissioned blockchain applications

  • GitHub repo mundane

    Mundane is a Rust cryptography library backed by BoringSSL that is difficult to misuse, ergonomic, and performant (in that order).

    Project mention: Void Linux: "Switching back to OpenSSL" | | 2021-02-28

    I'm quite intrigued by mundane which is cryptography library with a Rust interface that contains lots of code from OpenSSL (via BoringSSL, which is a fork of OpenSSL).

  • GitHub repo rust-crypto

    A (mostly) pure-Rust implementation of various cryptographic algorithms.

  • GitHub repo rust-openssl

    OpenSSL bindings for Rust

    Project mention: Rates - currency rates in your terminal | | 2021-02-26

    $ cargo install rates Updating index Downloaded rates v0.2.0 Downloaded 1 crate (11.8 KB) in 0.70s Installing rates v0.2.0 Downloaded chrono v0.4.19 Downloaded futures-io v0.3.13 Downloaded futures-sink v0.3.13 Downloaded directories v3.0.1 Downloaded futures-channel v0.3.13 Downloaded futures-task v0.3.13 Downloaded futures-util v0.3.13 Downloaded hashbrown v0.9.1 Downloaded http-body v0.4.0 Downloaded httpdate v0.3.2 Downloaded httparse v1.3.5 Downloaded http v0.2.3 Downloaded hyper v0.14.4 Downloaded indexmap v1.6.1 Downloaded form_urlencoded v1.0.1 Downloaded h2 v0.3.1 Downloaded log v0.4.14 Downloaded num-traits v0.2.14 Downloaded openssl v0.10.32 Downloaded pin-utils v0.1.0 Downloaded openssl-sys v0.9.60 Downloaded pin-project-internal v1.0.5 Downloaded reqwest v0.11.1 Downloaded serde v1.0.123 Downloaded serde_urlencoded v0.7.0 Downloaded tinyvec_macros v0.1.0 Downloaded tinyvec v1.1.1 Downloaded tokio-native-tls v0.3.0 Downloaded syn v1.0.60 Downloaded url v2.2.1 Downloaded bytes v1.0.1 Downloaded tower-service v0.3.1 Downloaded tokio-util v0.6.3 Downloaded ipnet v2.3.0 Downloaded socket2 v0.3.19 Downloaded base64 v0.13.0 Downloaded want v0.3.0 Downloaded cc v1.0.67 Downloaded unicode-normalization v0.1.17 Downloaded mio v0.7.9 Downloaded tracing-core v0.1.17 Downloaded quote v1.0.9 Downloaded pin-project v1.0.5 Downloaded pin-project-lite v0.2.4 Downloaded try-lock v0.2.3 Downloaded serde_json v1.0.64 Downloaded native-tls v0.2.7 Downloaded num-integer v0.1.44 Downloaded hyper-tls v0.5.0 Downloaded futures-core v0.3.13 Downloaded tracing v0.1.25 Downloaded tokio v1.2.0 Downloaded idna v0.2.2 Downloaded libc v0.2.86 Downloaded encoding_rs v0.8.28 Downloaded 55 crates (5.4 MB) in 1.77s (largest was `encoding_rs` at 1.4 MB) Compiling autocfg v1.0.1 Compiling libc v0.2.86 Compiling cfg-if v1.0.0 Compiling log v0.4.14 Compiling pkg-config v0.3.19 Compiling cc v1.0.67 Compiling memchr v2.3.4 Compiling pin-project-lite v0.2.4 Compiling proc-macro2 v1.0.24 Compiling lazy_static v1.4.0 Compiling bytes v1.0.1 Compiling itoa v0.4.7 Compiling bitflags v1.2.1 Compiling unicode-xid v0.2.1 Compiling syn v1.0.60 Compiling futures-core v0.3.13 Compiling foreign-types-shared v0.1.1 Compiling fnv v1.0.7 Compiling openssl v0.10.32 Compiling matches v0.1.8 Compiling tinyvec_macros v0.1.0 Compiling hashbrown v0.9.1 Compiling futures-task v0.3.13 Compiling native-tls v0.2.7 Compiling slab v0.4.2 Compiling pin-utils v0.1.0 Compiling serde v1.0.123 Compiling ryu v1.0.5 Compiling futures-sink v0.3.13 Compiling futures-io v0.3.13 Compiling httparse v1.3.5 Compiling percent-encoding v2.1.0 Compiling try-lock v0.2.3 Compiling openssl-probe v0.1.2 Compiling httpdate v0.3.2 Compiling serde_json v1.0.64 Compiling encoding_rs v0.8.28 Compiling tower-service v0.3.1 Compiling unicode-width v0.1.8 Compiling strsim v0.8.0 Compiling base64 v0.13.0 Compiling vec_map v0.8.2 Compiling ipnet v2.3.0 Compiling mime v0.3.16 Compiling ansi_term v0.11.0 Compiling tokio v1.2.0 Compiling indexmap v1.6.1 Compiling num-traits v0.2.14 Compiling num-integer v0.1.44 Compiling tracing-core v0.1.17 Compiling futures-channel v0.3.13 Compiling foreign-types v0.3.2 Compiling http v0.2.3 Compiling unicode-bidi v0.3.4 Compiling tinyvec v1.1.1 Compiling openssl-sys v0.9.60 Compiling form_urlencoded v1.0.1 Compiling textwrap v0.11.0 Compiling tracing v0.1.25 Compiling http-body v0.4.0 Compiling unicode-normalization v0.1.17 Compiling num_cpus v1.13.0 Compiling socket2 v0.3.19 Compiling atty v0.2.14 Compiling dirs-sys v0.3.5 Compiling time v0.1.43 Compiling mio v0.7.9 Compiling want v0.3.0 error: failed to run custom build command for `openssl-sys v0.9.60` Caused by: process didn't exit successfully: `/tmp/cargo-installbxN90K/release/build/openssl-sys-704dca09387a20ed/build-script-main` (exit code: 101) --- stdout cargo:rustc-cfg=const_fn cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR unset cargo:rerun-if-env-changed=OPENSSL_LIB_DIR OPENSSL_LIB_DIR unset cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR unset cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR OPENSSL_INCLUDE_DIR unset cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR unset cargo:rerun-if-env-changed=OPENSSL_DIR OPENSSL_DIR unset cargo:rerun-if-env-changed=OPENSSL_NO_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG cargo:rerun-if-env-changed=OPENSSL_STATIC cargo:rerun-if-env-changed=OPENSSL_DYNAMIC cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH cargo:rerun-if-env-changed=PKG_CONFIG_PATH cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR run pkg_config fail: "`\"pkg-config\" \"--libs\" \"--cflags\" \"openssl\"` did not exit successfully: exit code: 1\n--- stderr\nPackage openssl was not found in the pkg-config search path.\nPerhaps you should add the directory containing `openssl.pc\'\nto the PKG_CONFIG_PATH environment variable\nNo package \'openssl\' found\n" --- stderr thread 'main' panicked at ' Could not find directory of OpenSSL installation, and this `-sys` crate cannot proceed without this knowledge. If OpenSSL is installed and this crate had trouble finding it, you can set the `OPENSSL_DIR` environment variable for the compilation process. Make sure you also have the development packages of openssl installed. For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora. If you're in a situation where you think the directory *should* be found automatically, please open a bug at and include information about your system as well as this message. $HOST = x86_64-unknown-linux-gnu $TARGET = x86_64-unknown-linux-gnu openssl-sys = 0.9.60 ', /home/myusr/.cargo/registry/src/ note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace warning: build failed, waiting for other jobs to finish... error: failed to compile `rates v0.2.0`, intermediate artifacts can be found at `/tmp/cargo-installbxN90K` Caused by: build failed

  • GitHub repo hashes

    Collection of cryptographic hash functions written in pure Rust

    Project mention: Hey Rustaceans! Got an easy question? Ask here (8/2021)! | | 2021-02-22

    Then you should note that here where they're in the process of rewriting the crate (and have already removed the unsafe block you pointed out):

  • GitHub repo Ockam

    Tools for mutual authentication and end-to-end encrypted messaging between distributed applications.

    Project mention: Ockam - Rust library for end-to-end encrypted, mutually authenticated communication | | 2021-04-02

    Hi Oleid, yes we're working on a FFI for C and C++ projects

  • GitHub repo sodiumoxide

    Sodium Oxide: Fast cryptographic library for Rust (bindings to libsodium)

  • GitHub repo curve25519-dalek

    A pure-Rust implementation of group operations on Ristretto and Curve25519

    Project mention: Biscuit authentication/authorization tokens are released in v1.0 | | 2021-04-12

    curve25519-dalek for the cryptographic implementation of Ristretto

  • GitHub repo ed25519-dalek

    Fast and efficient ed25519 signing and verification in Rust.

  • GitHub repo webpki

    WebPKI X.509 Certificate Validation in Rust

  • GitHub repo rust-native-tls

  • GitHub repo orion

    Usable, easy and safe pure-Rust crypto (by orion-rs)

    Project mention: orion 0.16 - const generics, organization changes and a new maintainer | | 2021-03-28


  • GitHub repo RustCrypto

    Authenticated Encryption with Associated Data Algorithms: high-level encryption ciphers

    Project mention: How to implement a simple password-based encryption with ring? | | 2021-01-21
  • GitHub repo RustCrypto Elliptic Curves

    Collection of pure Rust elliptic curve implementations (e.g. P-256, P-384, secp256k1)

  • GitHub repo octavo

    Highly modular & configurable hash & crypto library

  • GitHub repo suruga

    [INACTIVE] TLS 1.2 implementation in Rust

  • GitHub repo rust-security-framework

    Bindings to the macOS Security.framework

  • GitHub repo algebra

    Libraries for finite field, elliptic curve, and polynomial arithmetic (by arkworks-rs)

    Project mention: Best way to enforce correctness of modular arithmetic? | | 2021-02-19

    You can take a look at our approach in the arkworks library:

  • GitHub repo recrypt

    A set of cryptographic primitives for building a multi-hop Proxy Re-encryption scheme, known as Transform Encryption. (by IronCoreLabs)

  • GitHub repo rust-djangohashers

    A Rust port of the password primitives used in Django Project. (by Racum)

  • GitHub repo mpw-rs

    Master Password in Pure Rust

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2021-04-12.


What are some of the best open-source Cryptography projects in Rust? This list will help you:

Project Stars
1 grin 4,806
2 rustls 2,523
3 exonum 1,041
4 mundane 1,036
5 rust-crypto 1,034
6 rust-openssl 753
7 hashes 666
8 Ockam 636
9 sodiumoxide 602
10 curve25519-dalek 482
11 ed25519-dalek 383
12 webpki 314
13 rust-native-tls 272
14 orion 238
15 RustCrypto 210
16 RustCrypto Elliptic Curves 167
17 octavo 132
18 suruga 120
19 rust-security-framework 104
20 algebra 87
21 recrypt 84
22 rust-djangohashers 43
23 mpw-rs 32