#big-integer #gmp #cryptography #num-bigint

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

#762 in Algorithms

Download history 965/week @ 2024-07-19 420/week @ 2024-07-26 2164/week @ 2024-08-02 1591/week @ 2024-08-09 888/week @ 2024-08-16 1200/week @ 2024-08-23 1964/week @ 2024-08-30 1335/week @ 2024-09-06 608/week @ 2024-09-13 582/week @ 2024-09-20 820/week @ 2024-09-27 488/week @ 2024-10-04 1091/week @ 2024-10-11 737/week @ 2024-10-18 457/week @ 2024-10-25 1076/week @ 2024-11-01

3,443 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