Skip to content

About

Big-integer, prime-field, carry-less and binary-field arithmetic in pure Rust: no_std, no allocation, no panics, constant-time wrapper. The fastest primitives in the west!

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

SIROS primitives

The fastest primitives in the west!

CI Apache-2.0/MIT licensed Rust 1.93+

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

Development

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 record

License

Licensed 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.

About

Big-integer, prime-field, carry-less and binary-field arithmetic in pure Rust: no_std, no allocation, no panics, constant-time wrapper. The fastest primitives in the west!

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages