#big-int #gmp #num-bigint #cryptography

rust-bigint

Common traits and methods for multiple BigInt implementations

2 stable releases

1.2.0 Sep 16, 2021
1.1.0 Sep 21, 2020

#486 in Algorithms

Download history 1427/week @ 2024-01-09 1120/week @ 2024-01-16 1761/week @ 2024-01-23 1644/week @ 2024-01-30 1740/week @ 2024-02-06 1885/week @ 2024-02-13 1339/week @ 2024-02-20 1546/week @ 2024-02-27 694/week @ 2024-03-05 1674/week @ 2024-03-12 2155/week @ 2024-03-19 1321/week @ 2024-03-26 1894/week @ 2024-04-02 697/week @ 2024-04-09 662/week @ 2024-04-16 976/week @ 2024-04-23

4,399 downloads per month
Used in 9 crates (5 directly)

MIT license

32KB
779 lines

rust-bigint

Provides traits for common functionality across several Rust BigInt implementations

Example interaction:

// import BigInt from this library. use a feature flag to select the BigInt you need
// also, pull one or more traits from this library into scope
use rust_bigint::BigInt;
use rust_bigint::traits::Converter;
 
let number = BigInt::from(42);
// now use one of the methods exposed by the converter trait
let hex_str = number.to_hex();

See the traits for more examples.


lib.rs:

Provides traits for common functionality across several Rust BigInt implementations

Example interaction:

// import BigInt from this library. use a feature flag to select the BigInt you need
// also, pull one or more traits from this library into scope
use rust_bigint::BigInt;
use rust_bigint::traits::Converter;

let number = BigInt::from(42);
// now use one of the methods exposed by the converter trait
let hex_str = number.to_hex();

See the traits for more examples.

Dependencies

~0.4–1.3MB
~29K SLoC