For a Rust cryptography library, the first results are ironcorelabs/recrypt-rs (This Rust library provides modern cryptographic primitives for a specific proxy re-encryption scheme, which fits the search for a modern crypto library, but it is narrower in scope and does not explicitly mention constant-time operations or security audits), dnaq/sodiumoxide (Sodiumoxide is a Rust binding to libsodium that provides modern, safe cryptographic primitives, fitting your need for a Rust cryptography library with misuse-resistant APIs, though it is deprecated and not a pure Rust implementation) and briansmith/ring (This repository, tagged with Rust and Cryptography, is a cryptography library written in Rust that fits the intent for a safe, modern Rust cryptography library, although the sparse description does not confirm specific features like constant-time operations or audit status). rustcrypto/hashes and rustcrypto/aeads round out the shortlist. Compare the match explanations and check the project documentation against your requirements.
High-performance and memory-safe cryptographic primitives for building secure encryption and authentication protocols in Rust.
A set of cryptographic primitives for building a multi-hop Proxy Re-encryption scheme, known as Transform Encryption.
This Rust library provides modern cryptographic primitives for a specific proxy re-encryption scheme, which fits the search for a modern crypto library, but it is narrower in scope and does not explicitly mention constant-time operations or security audits.
DEPRECATED Sodium Oxide: Fast cryptographic library for Rust (bindings to libsodium)
Sodiumoxide is a Rust binding to libsodium that provides modern, safe cryptographic primitives, fitting your need for a Rust cryptography library with misuse-resistant APIs, though it is deprecated and not a pure Rust implementation.
Ring is a low-level cryptographic primitive library and security toolset designed for building portable, secure applications. It provides a collection of implementations for RSA, elliptic curve cryptography, and authenticated symmetric encryption. The project focuses on constant-time cryptography to prevent secret data from leaking through timing side-channel attacks. It utilizes a formal verification tool that generates arithmetic logic from templates, ensuring mathematical correctness and eliminating manual implementation errors. The library includes capabilities for producing cryptographi
This repository, tagged with Rust and Cryptography, is a cryptography library written in Rust that fits the intent for a safe, modern Rust cryptography library, although the sparse description does not confirm specific features like constant-time operations or audit status.
Collection of cryptographic hash functions written in pure Rust
rustcrypto/hashes is a pure‑Rust collection of cryptographic hash functions from the RustCrypto project, which fits the request for modern primitives, but its description doesn’t mention misuse‑resistant APIs, constant‑time operations, or an audit, so it covers only part of the sought‑after features.
Authenticated Encryption with Associated Data Algorithms: high-level encryption ciphers
This library from the Rust Crypto project provides safe, pure-Rust implementations of authenticated encryption algorithms (AEADs) like AES-GCM and ChaCha20Poly1305, fitting the demand for modern, misuse-resistant cryptographic primitives in Rust.
Collection of pure Rust elliptic curve implementations: NIST P-224, P-256, P-384, P-521, secp256k1, SM2
This pure Rust elliptic curve collection from the RustCrypto project fits the search for a safe, modern cryptography library—it provides constant-time implementations of common curves with memory safety, though it covers only elliptic curves rather than a full primitive set.
Cryptographic signature algorithms: DSA, ECDSA, Ed25519
This repository is a Rust library that implements modern cryptographic signature algorithms (Ed25519, ECDSA) with an emphasis on safe, memory-safe APIs, making it a solid fit for your need for a safe/modern cryptography library — though it is focused on signatures rather than covering all primitives.
This library provides a collection of low-level mathematical primitives for Curve25519 and Ristretto group operations. It serves as a foundation for building secure cryptographic protocols, offering tools for elliptic curve arithmetic, key exchange, and digital signature generation. The implementation prioritizes side-channel resistance by utilizing constant-time arithmetic logic across all operations, ensuring that secret-dependent timing variations are prevented. It leverages the Rust type system to enforce state validity, making illegal group elements unrepresentable at compile time. To ma
This pure-Rust library provides safe, constant-time elliptic curve operations on Curve25519 and Ristretto, fitting the search for modern cryptographic primitives with memory safety, though it is focused on a specific set of operations rather than a broad library.
Libsodium is a portable, C-based cryptographic library that provides a collection of modern primitives for encryption, decryption, digital signatures, password hashing, and secure key exchange. It is designed to facilitate secure communication and data integrity across diverse hardware architectures and operating systems. The library distinguishes itself by utilizing constant-time primitive execution to prevent side-channel attacks and employing memory-hard algorithms to increase the difficulty of brute-force password attacks. It abstracts complex mathematical operations into simplified inter
Libsodium is a well-regarded C library with modern primitives and constant-time operations, not a Rust library; it lacks a pure Rust implementation and Rust-native memory safety guarantees, so it's a neighbouring tool rather than the Rust cryptography library you're looking for.
rustls is a memory-safe implementation of the Transport Layer Security protocol written in Rust. It provides a cryptographic stack for secure network communication, supporting both TLS 1.3 and 1.2 standards for client and server implementations. The project is designed as a modular cryptographic library that allows swapping underlying cryptographic backends and primitive providers to meet specific security or performance requirements. It incorporates a post-quantum cryptography stack, utilizing hybrid key exchanges and signatures to protect data against future quantum computing threats. The
rustls is a memory-safe TLS protocol implementation in Rust, not a library of general-purpose cryptographic primitives — it uses and wraps modern primitives for secure communication, but if you need direct access to hashing, encryption, or signing primitives, you would want a library like ring or RustCrypto instead.
A Rust port of shadowsocks
Shadowsocks-rust is a proxy application, not a library of cryptographic primitives — it uses cryptography internally but does not expose safe, misuse-resistant APIs for building other tools, so it doesn't match the search for a modern Rust cryptography library.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| ironcorelabs/recrypt-rs | 166 | Rust | AGPL-3.0 | |
| dnaq/sodiumoxide | 645 | Rust | Apache-2.0 | |
| 4.1K |
| Assembly |
| NOASSERTION |
| rustcrypto/hashes | 2.2K | Rust | — |
| rustcrypto/aeads | 938 | Rust | — |
| rustcrypto/elliptic-curves | 859 | Rust | — |
| rustcrypto/signatures | 643 | Rust | — |
| dalek-cryptography/curve25519-dalek | 1.2K | Rust | NOASSERTION |
| jedisct1/libsodium | 13.5K | C | other |
| rustls/rustls | 7.5K | Rust | NOASSERTION |