rusqsieve 0.1.0

Portable fixed-capacity integer factorization with scheduler-independent quadratic-sieve kernels
Documentation
  • Coverage
  • 6.16%
    31 out of 503 items documented1 out of 167 items with examples
  • Size
  • Source code size: 534.55 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 6.53 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • metastable-void

rusqsieve

rusqsieve is a portable Rust factorization crate built around a fixed-capacity unsigned integer, deterministic work packets, and quadratic-sieve relation/matrix primitives. The default Natural<16> has a 1024-bit capacity; that is a storage limit, not a promise that hard 1024-bit semiprimes are practical (use NFS for such inputs).

The crate is not constant-time and must not be used where operand-dependent timing is secret.

use rusqsieve::{Natural, factor};

let factors = factor(Natural::<16>::from_decimal("360").unwrap()).unwrap();
assert!(factors.verify_product(&Natural::from_u64(360)));

Custom schedulers, including Web Workers, can use engine::prepare, EngineSession::take_jobs, engine::execute, and EngineSession::submit. The portable job kernel never creates threads; the native blocking API schedules the same deterministic polynomial-family work across persistent workers.

Browser demo

make docs builds a self-contained WebAssembly demo into docs/ for GitHub Pages (enable Pages on the docs/ folder). It factors a number you type using the same crate compiled to wasm32-unknown-unknown, sieving in parallel across a pool of Web Workers sized to navigator.hardwareConcurrency, and renders the result in power notation. make serve previews it locally at http://localhost:8000/.

Licensed under Apache-2.0 OR MPL-2.0; see LICENSE-APACHE and LICENSE-MPL.