7 releases

0.0.3-pre.1 Jul 13, 2023
0.0.2 Jun 13, 2023
0.0.2-dev.3 May 2, 2023
0.0.2-dev.2 Apr 18, 2023
0.0.1 Dec 12, 2017

#1130 in Cryptography

32 downloads per month
Used in libcrux

Apache-2.0

7.5MB
188K SLoC

C 136K SLoC // 0.1% comments GNU Style Assembly 34K SLoC Assembly 10K SLoC // 0.0% comments Rust 4.5K SLoC // 0.0% comments C++ 3K SLoC // 0.1% comments Shell 31 SLoC // 0.2% comments

HACL Rust bindings

Build & Test crates.io Docs

This is the hacl crate that provides Rust bindings for the HACL C package. The FFI bindings are in the hacl-sys crates.

Please see the top level readme for more information about the underlying code.

Platform Supported
MacOS
MacOS Arm64
iOS
Linux x64
Linux x86
Windows x64
Windows x86
Arm64 Linux
Arm32 Linux

Features

By default the hacl crate includes the random feature that allows generating random values (keys, nonces, etc.). But this is not verified code and uses the rand crate. It can be disabled with --no-default-features. Please bring your own randomness if you want to be safe.

Platforms

See above for a list of supported platforms.

Building

cargo build

Benchmarks

To run benchmarks use cargo bench.

Tests

All primitives are tested against the Wycheproof test vectors. They can be run with cargo test. This will also run automatically generated binding tests from bindgen.

Dependencies