56 releases (12 breaking)
✓ Uses Rust 2018 edition
|0.13.4||Apr 1, 2019|
|0.13.3||Mar 31, 2019|
|0.13.1||Feb 16, 2019|
|0.12.0||Dec 29, 2018|
#47 in Cryptography
486 downloads per month
Used in 1 crate
orion is a cryptography library written in pure Rust. It aims to provide easy and usable crypto while trying to minimize the use of unsafe code. You can read more about orion in the wiki.
- AEAD: (X)ChaCha20Poly1305.
- Stream ciphers: (X)ChaCha20.
- KDF: HKDF-HMAC-SHA512, PBKDF2-HMAC-SHA512.
- MAC: HMAC-SHA512, Poly1305.
- XOF: cSHAKE256.
- Hashing: BLAKE2b, SHA512.
This library is not suitable for production code and usage is at own risk.
More information about security regarding orion is available in the wiki.
By default orion targets stable Rust and in this case, extra dependency specifications are not required.
no_std: To use orion in a
no_stdcontext, you need to specify the dependency as such:
[dependencies.orion] version = "*" # Replace * with the most recent version default-features = false features = ["no_std"]
no_std requires Rust nightly and benefits from the same inline assembly features as when using the
When orion is used in a
no_std context, access to nearly all functionality, except for that in
hazardous, is not available. This is because the high-level functionality depends on the
which is not available in
nightly: The nightly feature enables the use of inline assembly for constant-time comparisons. Using
nightlyis recommended for security. Specify the dependency as such, to use the
[dependencies.orion] version = "*" # Replace * with the most recent version default-features = false features = ["nightly"]
nightly requires Rust nightly.
Can be viewed here or built with:
cargo doc --no-deps
The wiki has details on how orion is tested. To run all tests:
Fuzzing is done using either cargo-fuzz, with targets in the
fuzz/ folder, or honggfuzz-rs in orion-fuzz. The fuzzing targets in orion-fuzz are newer and maintained more. See orion-fuzz on how to start fuzzing with honggfuzz-rs.
Fuzzing targets for cargo-fuzz can be run with:
cargo +nightly fuzz run -O fuzz_target
The library can be benchmarked as below. All benchmarking tests are located in
cargo +nightly bench
Can be found here.
orion is licensed under the MIT license. See the
LICENSE file for more information.