A pure-Rust, hard-to-misuse cryptography library providing a mostly drop-in replacement for libsodium.
dryoc is a pure-Rust cryptography library designed to be a secure, hard-to-misuse alternative to libsodium. It provides both public-key and secret-key cryptography, password hashing, key derivation, and protected memory features, all while minimizing unsafe code. The project aims to prevent common cryptographic mistakes by offering ergonomic APIs that guide developers toward safe practices.
Rust developers building secure applications that require cryptographic operations, especially those familiar with libsodium or seeking a pure-Rust alternative. It's also suitable for projects prioritizing memory safety and misuse-resistant APIs.
Developers choose dryoc for its pure-Rust implementation, which eliminates dependencies on C libraries and leverages Rust's safety guarantees. Its dual API approach caters to both libsodium users and those preferring idiomatic Rust, while protected memory and SIMD optimizations offer performance and security benefits.
Don't Roll Your Own Crypto: pure-Rust, hard to misuse cryptography library
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implemented mostly without unsafe code, leveraging Rust's memory safety to reduce vulnerabilities, as highlighted in the README's emphasis on being '100% pure Rust'.
APIs are crafted to prevent common cryptographic errors, with both Classic and Rustaceous APIs guiding developers toward safe practices, making it 'hard to misuse'.
Integrates mprotect() and mlock() (with Windows equivalents) to safeguard sensitive data from memory leaks, enhancing security for production use.
Offers portable and platform-specific SIMD backends for algorithms like Blake2b and Curve25519, improving speed for performance-critical operations.
Does not implement all libsodium features, such as Scrypt, stream ciphers, and helpers, requiring reliance on other crates for those functionalities.
Enabling SIMD optimizations requires nightly Rust and manual RUSTFLAGS configuration, adding setup overhead and limiting ease of use.
Key performance features like portable SIMD are tied to unstable Rust features, which may break compatibility and hinder adoption in stable environments.