8 releases

0.0.2-pre.2 Dec 1, 2023
0.0.2-pre.1 Sep 25, 2023
0.0.2-alpha.3 Jul 23, 2024
0.0.1 Jun 13, 2023
0.0.0 Jan 10, 2023

#271 in Cryptography

Download history 282/week @ 2024-07-18 297/week @ 2024-07-25 142/week @ 2024-08-01 355/week @ 2024-08-08 331/week @ 2024-08-15 167/week @ 2024-08-22 196/week @ 2024-08-29 211/week @ 2024-09-05 128/week @ 2024-09-12 266/week @ 2024-09-19 302/week @ 2024-09-26 364/week @ 2024-10-03 228/week @ 2024-10-10 317/week @ 2024-10-17 661/week @ 2024-10-24 377/week @ 2024-10-31

1,639 downloads per month
Used in 3 crates (via openmls_libcrux_crypto)

Apache-2.0

6MB
182K SLoC

C 113K SLoC // 0.1% comments GNU Style Assembly 42K SLoC Rust 15K SLoC // 0.0% comments Assembly 10K SLoC // 0.0% comments F* 1.5K SLoC // 0.0% comments Shell 44 SLoC // 0.2% comments

libcrux - the formally verified crypto library

libcrux is a formally verified cryptographic library that brings together verified artifacts from different sources. It uses hacspec as a common language for the specifications underlying the correctness and security proofs.

Please refer to the Architecture document for a detailed overview of the libcrux architecture and properties and the formal verification directory for details on the underlying formal proofs.

Algorithms

Note The available algorithms is still work in progress and will grow in future.

Algorithm Platforms
AES x64 (AES-NI)
AES-GCM x64 (AES-NI)
Chacha20 x64, arm64
Poly1305 x64, arm64
Chacha20Poly1305 x64, arm64
Curve25519 x64, arm64
EdDSA 25519 x64, arm64
EcDSA P256 x64, arm64
Sha2 x64, arm64
Sha3 x64, arm64
Blake2 x64, arm64
HMAC x64, arm64
HKDF x64, arm64
Bls12-381 x64, arm64
HPKE x64, arm64

Other platforms might work as well but are not tested or optimized for at this point.

Hardware support

The build enables all available hardware features for the target architecture. Further, the library always performs runtime checks to ensure that the required CPU features are available.

libcrux uses the following configurations for its hardware abstractions

  • simd128 assumes 128 bit SIMD instructions on the platform. This implies SSE3 and SSE4.1 on x64 CPUs and NEON on arm CPUs.
  • simd256 assumes 256 bit SIMD instructions on the platform This implies AVX and AVX2 on x64 CPUs.

Randomness

libcrux provides a DRBG implementation that can be used standalone (drbg::Drbg) or through the Rng traits.

Dependencies