AI Takes Over Idle Compute: Factoring a 270-Digit Number in 10 Days

    This article examines how a security researcher factored a 270-digit composite number into two 135-digit primes in about 10 days, using up to 2,048 GPUs and roughly 30 GPU-years of compute. It covers why large-number factorization is hard, how the number field sieve splits into a parallel relation-collection phase and a memory-bound linear algebra phase, what it takes to port a mature CPU-based open-source factoring tool to GPUs with an AI coding tool, and how preemptible idle capacity in a cloud cluster can be turned into useful output through checkpointing, sharding, and priority isolation. It also outlines the practical limits of the result and the engineering lessons for teams working on heterogeneous acceleration and legacy modernization.

    1. Overview: A Calculation Completed With “Leftover” Compute

    A security researcher who has long studied foundational problems in cryptography has publicly released a large-number factorization result: a 270-digit composite number was successfully factored into two 135-digit prime factors, and multiplying them reproduces the original number exactly. Notably, the calculation did not require a dedicated supercluster. Instead, it used the idle gaps that naturally appear between routine jobs in a cloud provider’s cluster, with an AI coding tool handling the key engineering work of porting and scheduling.

    According to the public information, the AI coding tool’s core job was to port a mature open-source large-number factorization package from a CPU platform to a GPU platform, and then, once the port was complete, to orchestrate the entire GPU fleet and run the calculation to completion. The run used at most 2,048 GPUs, lasted about 10 days, and consumed roughly 30 GPU-years in total.

    The significance here is not that “AI replaced mathematicians.” It is that the work demonstrated a new engineering path: taking highly specialized scientific software with an extremely high barrier to entry, migrating it quickly to heterogeneous hardware with the help of an AI coding tool, and then using fragmented, low-priority idle capacity in a data center to perform the actual computation.

    2. Technical Background: Why Large-Number Factorization Is Hard

    The large-number factorization problem asks for the prime factors of a given composite number. For small integers, trial division is enough. Once the number grows to hundreds of digits, however, the computational cost explodes. One mainstream class of modern public-key cryptosystems bases its security precisely on the assumption that factoring large numbers is computationally infeasible. That is why every new factorization record reflects the combined effect of algorithms, engineering, and compute.

    The most effective general-purpose factoring algorithm accepted in the field today is the number field sieve. Its basic idea breaks down into two phases:

    1. Relation collection: find a large number of pairs satisfying specific divisibility relations and build a linear system;
    2. Linear algebra: solve that system over a finite field to obtain a congruence of squares, which yields a non-trivial factor.

    The first phase is highly parallel and scales well across a large fleet. The second phase involves heavy synchronization and communication, and is more sensitive to memory and interconnect bandwidth. This “loose first, tight later” structure makes the algorithm well suited to layered execution on a heterogeneous cluster.

    A schematic of the flow:

    1. Input composite N (270 digits)
    2. ↓
    3. Parameter selection (polynomials, sieving interval, factor base size)
    4. ↓
    5. Relation collection (massively parallel, GPU-driven)
    6. ↓
    7. Deduplication and merging (CPU-side preprocessing)
    8. ↓
    9. Sparse linear algebra solve (distributed memory compute)
    10. ↓
    11. Congruence of squares → compute gcd → output p, q
    12. Verify: p × q == N

    3. The Core Difficulty: Rewriting CPU Stages as GPU Stages

    The existing open-source implementation has been refined over nearly two decades and is extremely stable and efficient, but it was designed for CPUs from the start. A CPU is like a few versatile master craftsmen, good at complex branching and irregular logic. A GPU is like thousands of assembly-line workers who only deliver throughput when the work is broken into fine, regular steps.

    The real difficulty of the port showed up in four areas:

    • Irregular memory access and branching: the sieving process is full of conditional checks and sparse writes, so moving it directly to a GPU wastes bandwidth badly;
    • Tiered numerical precision: small primes can use lower precision, while larger primes need wider integer representations, which requires a mixed-precision strategy;
    • Re-cutting task granularity: tasks originally organized by “interval” had to be reshaped into fine-grained units suited to thread-block processing;
    • Correctness verification: a single indexing or boundary error makes the later linear algebra phase unsolvable, so every step needs verifiable intermediate artifacts.

    The value of the AI coding tool here was not “writing a few snippets of accelerated code.” It was breaking a cross-language, cross-hardware engineering effort into continuous, iterable, verifiable steps, while preserving rollback and validation at each step. That is the most realistic role for AI coding tools today in modernizing large legacy codebases.

    4. The Compute Angle: Turning Idle Time Into Useful Output

    The resource model is what enterprises should pay the most attention to. Clusters naturally have gaps between routine jobs: batch jobs queue up, interactive workloads have peaks and troughs, and low-priority jobs get preempted, all of which leave windows that can be exploited.

    Turning this kind of capacity into useful output depends on three things:

    • Preemptible execution: tasks must be interruptible at any time and resumable from a checkpoint;
    • Idempotence and sharding: each compute unit is independent and replayable, so a failure only re-runs a single shard;
    • Priority isolation: idle work must never degrade the service quality of online business.

    Implementing this pattern in the cloud typically combines a container platform running preemptible instances, object storage holding checkpoints and intermediate results, a message queue distributing task shards, and logging plus monitoring and alerting to track failure rates and throughput. This combination is general engineering practice and is not tied to any particular vendor.

    5. Engineering Lessons

    First, an algorithmic advantage only pays off once it is realized in engineering. Even the best algorithm is just a paper result if it cannot run efficiently on the target hardware.

    Second, the bottleneck in heterogeneous acceleration is often data layout, not compute. GPUs are not a cure-all; order-of-magnitude gains only appear when memory access is regular and branching is controllable.

    Third, AI coding tools are becoming a lever for legacy system modernization. Cross-language porting, dependency replacement, and test backfilling are exactly the kind of dirty work they handle best, with manageable risk.

    Fourth, compute operations should pay attention to fragmented resources. Productizing idle windows requires mature checkpointing, scheduling, and isolation mechanisms, not simply throwing jobs into a queue.

    6. Objective Boundaries

    A rational view is needed: this kind of result does not mean cryptosystems have been broadly broken. A 270-digit decimal number is roughly equivalent to 895 binary bits, well below the security strength recommended by current mainstream public-key algorithms. In addition, this success depended heavily on large-scale heterogeneous compute and customized engineering work, which ordinary teams cannot easily replicate.

    The genuinely transferable experience is the methodology: use AI coding tools to lower the barrier to heterogeneous porting, use fragmented compute to spread out costs, and use strict verification to keep results trustworthy. For teams already working on compute optimization and legacy system refactoring, this path has clear reference value.