| Crates.io | ligerito-binary-fields |
| lib.rs | ligerito-binary-fields |
| version | 0.3.2 |
| created_at | 2025-11-15 21:35:50.389797+00 |
| updated_at | 2025-12-04 09:25:29.128253+00 |
| description | Binary extension field arithmetic for Ligerito |
| homepage | |
| repository | https://github.com/rotkonetworks/zeratul |
| max_upload_size | |
| id | 1934826 |
| size | 105,409 |
binary extension field arithmetic (GF(2^n)) for polynomial commitment schemes.
std (default): standard library supporthardware-accel: tiered simd acceleration with runtime detectionserde: serialization supportwith hardware-accel feature enabled, automatically selects best available:
| tier | instruction | elements/iter | speedup |
|---|---|---|---|
| AVX-512 | VPCLMULQDQ (512-bit) | 8 | 1.9x |
| AVX2 | VPCLMULQDQ (256-bit) | 4 | 1.5x |
| SSE | PCLMULQDQ (128-bit) | 2 | baseline |
| scalar | lookup table + karatsuba | 1 | fallback |
runtime detection via is_x86_feature_detected! - no recompilation needed.
| technique | description |
|---|---|
i8x16_swizzle |
parallel 16-way table lookups for carryless multiply |
v128_xor |
SIMD XOR for GF(2) additions |
| 4-bit LUT | 256-byte lookup table with Karatsuba decomposition |
compile with: RUSTFLAGS='-C target-feature=+simd128' cargo build --target wasm32-unknown-unknown
note: disable SMT for accurate benchmarks (hyperthreading causes cache contention).
use ligerito_binary_fields::{BinaryElem32, BinaryElem128, BinaryFieldElement};
let a = BinaryElem32::from(42);
let b = BinaryElem32::from(17);
let c = a.mul(&b);
part of the ligerito polynomial commitment scheme implementation.
mit / apache-2.0