orion is a cryptography library written in pure-Rust which aims to provide easy and usable crypto. 'Usable' meaning exposing high-level API's that are easy to use and hard to misuse.
orion alternatives and similar packages
Based on the "Cryptography" category
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of orion or a related project?
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.
- 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.
Features and Requirements
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_stdrequires 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 systems random generator,
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"]
nightlyrequires Rust nightly.
Can be viewed here or built with:
cargo doc --no-deps
Tests and Fuzzing
The wiki has details on how orion is tested. To run all tests:
Constant-time execution tests can be found at orion-dudect.
The library can be benchmarked with Criterion as below. All benchmarking tests are located in
Please refer to the CHANGELOG.md list.
Please refer to the guidelines in CONTRIBUTING.md for information on how to contribute to orion.
orion is licensed under the MIT license. See the
LICENSE file for more information.
*Note that all licence references and agreements mentioned in the orion README section above are relevant to that project's source code only.