polyrsa

RSA factoring with the P/NP/P sandwich. Pure Python, zero dependencies.

The Sandwich

P-Right — trivial: even, perfect power, small N
P-Left tier 1 — trial division: O(n^a) divisions
P-Left tier 2 — Pollard's rho: O(2^{n/4}) birthday paradox
P-Left tier 3 — Pollard's p-1: smooth factor detection
P-Left tier 4 — Fermat: close factor exploitation
NP strip — Fourier probe: AUMA-inspired bit scoring

Budget Model

Total evaluations = n^a where n = bit length of N, a = exponent parameter. Each technique gets a budget slice. The wall moves with a — same as cdcl(a) on Sudoku.

Endpoints

POST /api/factor — factor a single N with budget n^a
GET /api/climb — climb from 4 to max_bits, report where the wall hits
GET /api/health — health check

v1.0.0 — Charles Dana & Claude / Monce SAS, April 2026