Skip to content
Proyek

Tentang

Cryptography-oriented big integer library with constant-time, stack-allocated (no_std-friendly) implementations of modern formulas

Keamanan dan privasi

Cara angka ini diukur

Pertumbuhan bintang terukur

dalam 24 jam
0
dalam 7 hari
+1
dalam 15 hari
+1
dalam 1 bulan
Mengumpulkan riwayat

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli

RustCrypto: Cryptographic Big Integers

crate Docs Build Status codecov Apache2/MIT licensed Rust Version Project Chat

Pure Rust implementation of a big integer library which has been designed from the ground-up for use in cryptographic applications.

Provides constant-time, no_std-friendly implementations of modern formulas using const generics.

Documentation

Goals

  • Supports no_std-friendly const generic stack-allocated big integers.
  • Constant-time by default. Variable-time functions are explicitly marked as such.
  • Leverage what is possible today with const generics on stable rust.
  • Support const fn as much as possible with the goal of being able to compute values at compile-time.
  • Optional heap-allocated Boxed* types gated under an alloc feature.

Supported CPU architectures

This crate is designed to operate in constant-time on the following CPU architectures:

  • arm (32-bit)
  • aarch64 ✅
  • riscv32 ✅
  • riscv64
  • thumbv6 ✅
  • thumbv7 (with checks for thumbv7em ✅)
  • x86
  • x86_64 ✅
  • wasm32

✅: indicates architectures where we use cargo checkct / BINSEC in CI to ensure that, for functions with checkct assertions, changes do not introduce variable-time operations.

Other architectures are officially unsupported, however a use-at-your-own-risk portable fallback implementation based on bitwise arithmetic and black_box is provided without constant-time codegen guarantees. Please do not open issues about codegen problems on unsupported CPU architectures: they will be closed noting they're unsupported. If you would like such problems addressed, please open a pull request that addresses the issue instead.

Notably this library is NOT suitable for use on processors with a variable-time multiplication operation, e.g. short circuit on multiply-by-zero / multiply-by-one, such as certain 32-bit PowerPC CPUs and microcontrollers.

Security Notes

This crate has been audited by NCC Group with no significant findings. We would like to thank Entropy for funding the audit. Note that the implementation has diverged significantly since the last audit.

All functions contained in the crate are designed to execute in constant time unless explicitly specified otherwise (via a *_vartime name suffix).

Minimum Supported Rust Version (MSRV) Policy

MSRV increases are not considered breaking changes and can happen in patch releases.

The crate MSRV accounts for all supported targets and crate feature combinations, excluding explicitly unstable features.

License

Licensed under either of:

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Jelajahi proyek terkait

Memuat…