diffsquare
From the Author
This project is authored by Abhrankan Chakrabarti and demonstrates an efficient implementation of Fermat’s Difference of Squares method for factoring large integers. The implementation is written in Rust and utilizes the malachite crate for arbitrary-precision arithmetic.
Key features include:
- Support for both decimal and hexadecimal inputs.
- Command-line interface with support for optional precision and iteration control.
- Verbose scientific notation output for better readability of large numbers.
GitHub Repository: Abhrankan-Chakrabarti/diffsquare
Installation
To install diffsquare directly using Cargo:
Make sure $HOME/.cargo/bin is in your system's PATH to run diffsquare from anywhere:
Build Instructions
If you'd rather clone and build manually:
Usage Examples
Run the binary using default values or provide custom arguments:
# Provide modulus interactively
# Using a specific modulus (in decimal)
# Using a specific modulus (in hexadecimal)
# Starting from a specific iteration
# With custom precision for verbose scientific notation output
# Combine all options
You can mix and match the flags:
| Short Flag | Long Flag | Description |
|---|---|---|
-n |
--mod |
Number to factor (hex prefix 0x or scientific notation supported) |
-i |
--iter |
Starting iteration value |
-p |
--prec |
Precision for verbose scientific output |
-h |
--help |
Show help |
-v |
--version |
Show version |
Latest Commit:
feat: remove default modulus and migrate to clap for CLI parsing
Tags:
#RustLang #NumberTheory #OpenSource #BigInteger #Cryptography #Fermat #AbhrankanChakrabarti #Malachite