#big-integer #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

#681 in Algorithms

Download history 369/week @ 2024-06-12 1753/week @ 2024-06-19 363/week @ 2024-06-26 616/week @ 2024-07-03 448/week @ 2024-07-10 1102/week @ 2024-07-17 568/week @ 2024-07-24 1546/week @ 2024-07-31 2233/week @ 2024-08-07 861/week @ 2024-08-14 983/week @ 2024-08-21 1528/week @ 2024-08-28 1775/week @ 2024-09-04 858/week @ 2024-09-11 415/week @ 2024-09-18 803/week @ 2024-09-25

4,294 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
~28K SLoC