In FACTOR, the central mining challenge is not finding a hash below a target. It is finding a qualifying semiprime near a block-derived pseudorandom integer and providing a valid factor. The expensive search and comparatively inexpensive verification create a computational asymmetry that can support decentralized consensus.

Reference snapshot: 2026-12-02.

Editorial update, 2026-12-03 UTC: the original snapshot below is retained. See the engineering update at the end for corrected factor-width rules and current references.

Mathematical foundations

Integer factorization is the problem of finding nontrivial integer divisors of an integer N. Complete prime factorization expresses N as a product of primes, with multiplicities. For a semiprime N = p*q, where p and q are prime, a nontrivial divisor p gives q = N/p.

For positive N, define its bit length as L(N) = floor(log2(N)) + 1. The project uses the term strong semiprime for a semiprime with factors of equal bit length in its original design; this should not be confused with the separate cryptographic term strong prime.

Factoring sufficiently large, suitably chosen semiprimes can require substantial computation using known classical algorithms. Checking a candidate factor is much cheaper: evaluate exact divisibility, reconstruct the complementary factor and apply the necessary primality and structural tests. This computational asymmetry is central to FACTOR's consensus design.

The difficulty of integer factorization is not known to be NP-complete. No unconditional superpolynomial lower bound for general integer factoring is known. The usefulness and security of the protocol depend on actual computational costs, not a theorem that factoring must remain hard forever.

The General Number Field Sieve (GNFS) is the leading known classical general-purpose algorithm for sufficiently large unstructured integers. Its heuristic asymptotic running time is expressed as L_N[1/3,(64/9)^(1/3)], where L_N[alpha,c] = exp((c+o(1))(ln N)^alpha(ln ln N)^(1-alpha)). This is an asymptotic model, not an empirical timing guarantee for any particular integer, implementation or hardware.

Proof-of-work: challenge generation and verification

A blockchain proof must be bound to candidate block data. A trusted generator that constructs N by multiplying secret primes would already possess the solution, which would be undesirable for an open mining competition.

FACTOR instead derives a pseudorandom integer W from candidate block-header information using a construction named gHash. A miner can look for an eligible composite in a bounded neighborhood of W and submit a factor that meets consensus requirements. Miners can explore different candidate block inputs to obtain new neighborhoods.

For the reviewed main-branch CheckProofOfWork implementation, let d = nBits, the required candidate integer bit length, and delta = wOffset. The mathematical acceptance conditions include:

  • 1 <= d <= 1023 at the proof-checking function level; contextual difficulty rules impose additional constraints.
  • N = W + delta.
  • abs(delta) <= 16*d.
  • L(N) = d.
  • The submitted factor p is nonzero and L(p) = ceil(d/2).
  • q is reconstructed by integer division and p*q must equal N exactly.
  • p <= q.
  • Both p and q must pass the configured probable-primality checks.

The resulting factors are used to verify the proof, while all other applicable block-validation and chain-selection rules must also be satisfied. This is a description of the inspected implementation, not a substitute for the consensus code.

Example (illustrative only, not a real mining challenge): N = 77, p = 7, q = 11. Exact multiplication verifies the proposed factorization. This small example illustrates factor verification, but does not meet the equal-bit-length conditions of a FACTOR mining proof at d = 7.

Hash functions have not been removed from the blockchain. They remain important for block and transaction identification, cryptographic commitments and challenge derivation. Integer factoring replaces hash-target searching as the defining expensive computational component of consensus.

Source: https://github.com/ProjectFactor/FACTOR/blob/main/src/pow.cpp

Consensus, difficulty adjustment and network security

FACTOR inherits substantial elements of the Bitcoin Core architecture, while modifying consensus to accommodate mathematical proof of work. Compatibility with the Bitcoin Core design does not imply identical consensus rules, chain history, monetary policy or network interoperability.

The reviewed mainnet configuration targets a block interval of 1,800 seconds (30 minutes). Individual block intervals are stochastic and can depart substantially from the target. The source also contains network-specific configurations; testnet and other networks need not use mainnet parameters.

Difficulty adjustment attempts to keep block production near its target as factorization capacity changes. The v6.0.43 release describes a custom ASERT-inspired adjustment mechanism. In the reviewed implementation, the algorithm works in a precomputed log2(compute) space and maps estimated computational difficulty to allowable even nBits values. A simplified representation of the adjustment before table quantization is:

log2(C_target) = log2(C_anchor) + (h*T - t)/H

where C is modeled computational cost, h is the block-height difference from the anchor, T is the target interval, t is elapsed time relative to the anchor and H is the configured half-life. Main-branch mainnet parameters specify H = 172,800 seconds (two days). Blocks arriving ahead of schedule increase modeled difficulty; blocks behind schedule decrease it. The code also includes bounds and a protective halt condition for difficulty beyond its supported maximum. Consult the exact implementation and active deployment state before relying on this formula operationally.

A software release or a deployment start time does not establish that a consensus upgrade has activated on mainnet. Activation depends on the relevant versioned rules and observed network state.

As with any PoW chain, security depends on the distribution of effective computational capacity, validation behavior, network conditions and the incentives of participants. Factorization progress could change the threat model. Network decentralization, resistance to reorganizations and attack costs require empirical assessment; the mathematical puzzle alone does not guarantee these properties.

Sources: https://github.com/ProjectFactor/FACTOR/blob/main/src/pow.cpp ; https://github.com/ProjectFactor/FACTOR/blob/main/src/chainparams.cpp ; https://github.com/ProjectFactor/FACTOR/releases

Conclusion

A valid factorization is necessary but not sufficient for a valid block. The complete consensus rules determine block validity, difficulty and chain selection. Always consult the applicable version of the node code for exact behavior.

Engineering update — 2026-12-03 (UTC)

The historical equal-bit-length wording above is incomplete as a universal acceptance rule. In reviewed CheckProofOfWork, p has b = ceil(d/2) bits; odd d forces q to have b bits, but even d allows b or b + 1. The structural illustration 253 = 11 × 23 has unequal widths at d = 8; it is not a real block or gHash vector. The 77 example fails the submitted p-width check at d = 7.

The exact header is 218 bytes. gHash excludes the factor and offset from its challenge inputs; native-endian operations require care in independent implementations. Chainwork is an ECM-inspired score, not block count or measured electricity. ASERT's committed compute table, parent-relative arithmetic and above-ceiling rejected nBits = 1024 must be distinguished from observed mainnet activation.

Engineering references: consensus, difficulty, pinned implementation, and the updated public consensus explanation.