Pollard's p - 1, in rust, with python bindings

Related tags

Command-line pm1
Overview

Pollard's p - 1 algorithm for factorization

Written in rust, using pyo3 to provide python bindings and primesieve for fast prime enumeration. libprimesieve.so and primesieve.hpp are required for compilation and running, and assumed to be present on the machine.

The pm1 function provides a factorization with a slightly unusual interface, see below, and pm1base is the same thing, but where you can specify the base a of the exponentiation pow(a, M, n). Additionally pm1_factorbase allows you to specify a a custom factor base for the algorithm, rather than the default choice of primes below 2^n.

The interface provided by pm1 and pm1base will compute $x = a^{M_1 \cdot M_2} \mod n$ and test whether $\gcd(x, n)$ reveals a factor of $n$ . Here, $M_0 = \prod_{p \le B_1} p^{\mathrm{exp}}$ and $M_1 = \prod_{B_1 \le p \le B_2} p$ . This choice was made for the cases where small prime factors are more likely to have multiple occurences. More control can be achieved with the python bindings and repeated use of the pm1_factorbase approach. The classical extension of a second bound between under which only a single prime factor can be tolerated is currently not implemented.

A rust-driven CLI tool is provided that can perform the pm1base functionality. If you want to compile the CLI only, without python bindings being involved, use the --no-default-features flag for cargo.

You might also like...
Rust implementation of Python command line progress bar tool tqdm.
Rust implementation of Python command line progress bar tool tqdm.

tqdm Rust implementation of Python command line progress bar tool tqdm. From original documentation: tqdm derives from the Arabic word taqaddum (تقدّم

Python/Rust implementations and notes from Proofs Arguments and Zero Knowledge study group

What is this? This is where I'll be collecting resources related to the Study Group on Dr. Justin Thaler's Proofs Arguments And Zero Knowledge Book. T

Fuzzy Index for Python, written in Rust. Works like error-tolerant dict, keyed by a human input.

FuzzDex FuzzDex is a fast Python library, written in Rust. It implements an in-memory fuzzy index that works like an error-tolerant dictionary keyed b

A fast python geohash library created by wrapping rust.

Pygeohash-Fast A Fast geohasher for python. Created by wrapping the rust geohash crate with pyo3. Huge shout out to the georust community :) Currently

📦 A Python package manager written in Rust inspired by Cargo.
📦 A Python package manager written in Rust inspired by Cargo.

huak About A Python package manager written in Rust. The Cargo for Python. ⚠️ Disclaimer: huak is currently in its proof-of-concept (PoC) phase. Huak

📦 A Python package manager written in Rust inspired by Cargo.
📦 A Python package manager written in Rust inspired by Cargo.

huak About A Python package manager written in Rust. The Cargo for Python. ⚠️ Disclaimer: huak is currently in its Alpha phase. Huak aims to support a

An extremely fast Python linter, written in Rust.
An extremely fast Python linter, written in Rust.

Ruff An extremely fast Python linter, written in Rust. Linting the CPython codebase from scratch. ⚡️ 10-100x faster than existing linters 🐍 Installab

Python wrapper for Rust's httparse HTTP parser

httparse Python wrapper for Rust's httparse. See this project on GitHub. Example from httparse import RequestParser parser = RequestParser() buff =

A fast, simple and lightweight Bloom filter library for Python, fully implemented in Rust.

rBloom A fast, simple and lightweight Bloom filter library for Python, fully implemented in Rust. It's designed to be as pythonic as possible, mimicki

Owner
Robin Jadoul
Robin Jadoul
Pollard's p - 1, in rust, with python bindings

Pollard's p - 1 algorithm for factorization Written in rust, using pyo3 to provide python bindings and primesieve for fast prime enumeration. libprime

Robin Jadoul 4 Sep 26, 2023
Songbird bindings for python

Songbird-Py Songbird bindings for python. The goal is to provide an easy to use alternitive to Lavalink. Its written with rust-bindings to Songbird. S

null 0 Jul 23, 2022
Python bindings for decancer.

decancer_py Python bindings for decancer. Installation You can get started with decancer_py by installing from PyPI: pip install -U decancer-py Usage

Jonxslays 6 Dec 27, 2022
PyO3 bindings and Python interface to skani, a method for fast fast genomic identity calculation using sparse chaining.

?? ⛓️ ?? Pyskani PyO3 bindings and Python interface to skani, a method for fast fast genomic identity calculation using sparse chaining. ??️ Overview

Martin Larralde 13 Mar 21, 2023
pyrevm Blazing-fast Python bindings to revm

pyrevm Blazing-fast Python bindings to revm Quickstart make install make test Example Usage Here we show how you can fork from Ethereum mainnet and s

Georgios Konstantopoulos 97 Apr 14, 2023
RocksDB-based queue with python bindings

RocksQ An inproc RocksDB-based queue with Python bindings. It is implemented in Rust. Features: max capacity limit in number of elements; size calcula

In-Sight 4 Oct 17, 2023
My solutions for the Advent of Code 2021 in Scala, Python, Haskell and Rust.

Advent of Code 2021 These are my Advent of Code 2021 solutions written in Scala 3, Haskell, Python and Rust. Day Title L1 L2 L3 L4 01 Sonar Sweep Scal

Axel Suárez 2 Oct 14, 2022
Fast DNA manipulation for Python, written in Rust.

quickdna Quickdna is a simple, fast library for working with DNA sequences. It is up to 100x faster than Biopython for some translation tasks, in part

Secure DNA 22 Dec 31, 2022
A toy example showing how to run Rust code in Python for speed and progress.

PoC: Integrating Rust in Python A toy example showing how to run Rust code in Python for speed and progress. Requirements Python 3.6+ Rust 1.44+ Cargo

Emil Thorenfeldt 2 Feb 7, 2022
This is a simple command line application to convert bibtex to json written in Rust and Python

bibtex-to-json This is a simple command line application to convert bibtex to json written in Rust and Python. Why? To enable you to convert very big

null 3 Mar 23, 2022