Crate avila_primitives

Crate avila_primitives 

Source
Expand description

§Avila Primitives

Big integer primitives for cryptography and high-precision arithmetic.

This crate provides:

  • U256, U512, U1024, U2048, U4096 - Unsigned big integers
  • I256, I512, I1024, I2048, I4096 - Signed big integers
  • Arithmetic operations - Add, sub, mul, div, mod with overflow detection
  • Bitwise operations - AND, OR, XOR, NOT, shifts, rotations
  • Constant-time operations - For cryptographic safety
  • SIMD acceleration - Optional AVX2/AVX512 support

Built on top of avila-nucleus for low-level bit manipulation.

Re-exports§

pub use u256::U256;
pub use u512::U512;
pub use u1024::U1024;
pub use u2048::U2048;
pub use u4096::U4096;
pub use i256::I256;
pub use i512::I512;
pub use i1024::I1024;
pub use i2048::I2048;
pub use i4096::I4096;
pub use traits::BigInt;
pub use traits::BigUint;

Modules§

i256
256-bit signed integer type (two’s complement)
i512
512-bit signed integer type (two’s complement)
i1024
1024-bit signed integer type (two’s complement)
i2048
2048-bit signed integer type (two’s complement)
i4096
4096-bit signed integer type (two’s complement)
prelude
Common imports for convenience
traits
Common traits for big integer types
u256
256-bit unsigned integer type
u512
512-bit unsigned integer type
u1024
1024-bit unsigned integer type
u2048
2048-bit unsigned integer type
u4096
4096-bit unsigned integer type