Skip to content
Switch branches/tags

Latest commit

* typedefs: Add func_is_empty()! and add it to all newtypes that implement func_len()!

* pwhash: Add is_empty() to PasswordHash

* typedefs: 'a' - > 'an'

Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Tests Daily tests dudect Security Audit codecov Documentation Safety Dance MSRV Matrix


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.

Currently supports:

  • AEAD: (X)ChaCha20Poly1305.
  • Stream ciphers: (X)ChaCha20.
  • KDF: HKDF, PBKDF2, Argon2i.
  • MAC: HMAC, Poly1305.
  • Hashing: BLAKE2b, SHA2.


This library has not undergone any third-party security audit. Usage is at own risk.

See the regarding recommendations on correct use, reporting security issues and more. Additional information about security regarding Orion is available in the wiki.

Minimum Supported Rust Version

Rust 1.51 or later is supported however, the majority of testing happens with latest stable Rust.

MSRV may be changed at any point and will not be considered a SemVer breaking change.

Crate Features

By default Orion targets stable Rust with std. To use Orion in a no_std context, you need to specify the dependency as such:

orion = { version = "*", default-features = false }
# Replace * with the most recent version

When Orion is used in a no_std context, the high-level API is not available, since it relies on access to the systems random number generator.

Argon2i is not available with no_std by default, but can be by enabling the alloc feature:

version = "*" # Replace * with the most recent version
default-features = false
features = ["alloc"]


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:

cargo test

Fuzzing is done using honggfuzz-rs in orion-fuzz. See orion-fuzz on how to start fuzzing orion.

Constant-time execution tests can be found at orion-dudect and orion-sidefuzz.


An overview of the performance that can be expected from Orion can be seen here.

The library can be benchmarked with Criterion as below. All benchmarking tests are located in benches/.

cargo bench


Please refer to the list.


Please refer to the guidelines in for information on how to contribute to Orion.


Orion is licensed under the MIT license. See the LICENSE file for more information.