Menu

Tree [r4] /
 History

HTTPS access


File Date Author Commit
 CONTRIBUTORS 2021-08-11 egghead-lab [r1] Better than L(1/3, 2) complexity, not exactly m...
 Complex.cpp 2021-08-11 egghead-lab [r1] Better than L(1/3, 2) complexity, not exactly m...
 Complex.h 2021-08-11 egghead-lab [r1] Better than L(1/3, 2) complexity, not exactly m...
 Extractor.cpp 2021-08-14 egghead-lab [r2] node indexing bug fix
 Extractor.h 2021-08-20 egghead-lab [r3] unit tests on CExtractor
 Factorization.cpp 2021-08-20 egghead-lab [r3] unit tests on CExtractor
 Factorization.h 2021-08-20 egghead-lab [r3] unit tests on CExtractor
 Fourier.cpp 2021-08-11 egghead-lab [r1] Better than L(1/3, 2) complexity, not exactly m...
 Fourier.h 2021-08-11 egghead-lab [r1] Better than L(1/3, 2) complexity, not exactly m...
 LICENSE 2021-08-11 egghead-lab [r1] Better than L(1/3, 2) complexity, not exactly m...
 Primes.cpp 2021-08-14 egghead-lab [r2] node indexing bug fix
 Primes.h 2021-08-14 egghead-lab [r2] node indexing bug fix
 README.md 2021-08-20 egghead-lab [r3] unit tests on CExtractor
 Random.cpp 2021-08-11 egghead-lab [r1] Better than L(1/3, 2) complexity, not exactly m...
 Random.h 2021-08-11 egghead-lab [r1] Better than L(1/3, 2) complexity, not exactly m...
 Research.cpp 2021-08-11 egghead-lab [r1] Better than L(1/3, 2) complexity, not exactly m...
 Research.h 2021-08-11 egghead-lab [r1] Better than L(1/3, 2) complexity, not exactly m...
 Sieve.cpp 2021-08-14 egghead-lab [r2] node indexing bug fix
 Sieve.h 2021-08-20 egghead-lab [r4] minor change
 SmoothCounter.cpp 2021-08-20 egghead-lab [r3] unit tests on CExtractor
 StdAfx.cpp 2021-08-11 egghead-lab [r1] Better than L(1/3, 2) complexity, not exactly m...
 StdAfx.h 2021-08-11 egghead-lab [r1] Better than L(1/3, 2) complexity, not exactly m...
 Tmgmnt.cpp 2021-08-14 egghead-lab [r2] node indexing bug fix
 Tmgmnt.h 2021-08-14 egghead-lab [r2] node indexing bug fix
 UnitTests.cpp 2021-08-20 egghead-lab [r3] unit tests on CExtractor
 UnitTests.h 2021-08-11 egghead-lab [r1] Better than L(1/3, 2) complexity, not exactly m...
 intop.cpp 2021-08-14 egghead-lab [r2] node indexing bug fix
 intop.h 2021-08-14 egghead-lab [r2] node indexing bug fix
 intstr.cpp 2021-08-14 egghead-lab [r2] node indexing bug fix
 intstr.h 2021-08-14 egghead-lab [r2] node indexing bug fix

Read Me

no-factor-base (NFB) factorization

Factorization C/C++ NFB lib, the no-factor-base sub-exponential general purpose algorithm

In number theory, integer factorization is the decomposition of a composite number into a product of
smaller integers. The hardest instances of factorization problems (for currently known techniques) are semiprimes, the
product of two prime numbers, when they are both large, randomly chosen, and about the same size (but not too close).

There is a class of sub-exponential algorithms (e.g. Dixon algorithm, General number field sieve, Quadratic sieve) that
are based on the congruence of squares method. These methods search for a set of quadratic residues mod N which are B-smooth,
i.e. all prime factors of the quadratic residues are less than some bound B. To check if the quadratic residue mod N is
B-smooth, one needs to perform trial divisions of this residue by all primes less than B. These primes constitute the factor
base for a factorization algorithm.

There are some issues about using factor base:
- some quadratic residues may be useful for factorization, but they are excluded as not B-smooth
- one cannot know in advance which factors in a factor base are useful, i.e. which of them can divide at least one quadratic
residue mod N. With this information, one would rather use a greater than B prime which is a common divisor of quadratic
residues mod N than spend time on trial divisions by all primes less than B.

The use of factor base was introduced in 70s to run factorization under severe limitations in RAM. Now this idea seems obsolete, but
it still shapes the algorithms and even the concepts of the number theory.

The no-factor-base (NFB) method uses GCD function to find common divisors of the quadratic residues modulo n. As a result,
the heuristic complexity of L(1/2, x) algorithms like Dixon's algorithm or quadratic sieve algorithm improves to L(2/5, 2),
and the complexity of L(1/3, x) algorithms improves to L(4/15, 2).

The code includes an example of a simple strategy of searching quadratic residues mod N that are not B-smooth but can
be effectively used for factorization. The example exhibits L(4/15, 2) complexity.

author

(a) pavelmalyshkin

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.