GithubHelp home page GithubHelp logo

orion's Introduction

orion

Build Status Build status codecov dependency status Documentation Crates.io

About

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-HMAC-SHA512, PBKDF2-HMAC-SHA512.
  • MAC: HMAC-SHA512, Poly1305.
  • XOF: cSHAKE256.
  • Hashing: BLAKE2b, SHA512.

Security

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_std context, 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 nightly feature.

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 OsRng which is not available in no_std.

  • nightly: The nightly feature enables the use of inline assembly for constant-time comparisons. Using nightly is recommended for security. Specify the dependency as such, to use the nightly feature:
[dependencies.orion]
version = "*" # Replace * with the most recent version
default-features = false
features = ["nightly"]

nightly requires Rust nightly.

Documentation

Can be viewed here or built with:

cargo doc --no-deps

Tests/Fuzzing

The wiki has details on how orion is tested. To run all tests:

cargo test

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

Benchmarks

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

cargo +nightly bench

Changelog

Can be found here.

License

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

orion's People

Contributors

brycx avatar defuse avatar dependabot-support avatar ritalinn avatar hdevalence avatar luisbg avatar

Watchers

James Cloos avatar Leon avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.