The fastest primitives in the west!
Big-integer, prime-field, carry-less and binary-field arithmetic in pure Rust. no_std, no
allocation, no panics. Rust 1.93 or newer.
| Crate | Description |
|---|---|
constant-time |
ConstantTime<T>, the constant-time wrapper of every crate |
biguint |
Fixed-width unsigned integers of any bit width |
prime-field |
Prime fields declared by their modulus |
clmul |
Carry-less multiplication of words, limb slices and GF(2^128) elements |
binary-field |
Binary fields GF(2^n) of any degree, declared by their polynomial |
cargo test --workspace --all-features
RUSTFLAGS="-C target-feature=+pclmulqdq,+sse4.1" cargo test -p clmul -p binary-field --all-features
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo run -p ct-check # constant time under Valgrind's memcheck
cargo run -p biguint-bench-report -- bench # measure; likewise prime-field- and binary-field-bench-report
cargo run -p biguint-bench-report -- report # write BENCHMARKS.md from the recordLicensed under either of Apache License, Version 2.0 or MIT license at your option. Unless you state otherwise, a contribution you submit is dual licensed as above.